|
Sir/Madam,
Thanks for ur kind attention.I am sorry to say that I am not getting what u want to say.Problem is still occuring there.I mean , I created a component file .Then in it's code behind file , I am writing
Inhetits system.windows.Form.Combobox.
Base class System.Windows.Forms.ComboBox specified for class completereadonlycombobox cannot be different from the base class System.ComponentModel.Component of one of it's partial types
Please help.
Thanks and regards
Pankaj
|
|
|
|
|
Not sure what else I can say. Your class is defined in two files, and they are deriving from different things.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
how to write code to allow only numerics
|
|
|
|
|
Place the following code in the text box's Keypress event:
Private Sub Text1_KeyPress(ByVal eventSender As System.Object, ByVal eventArgs As System.Windows.Forms.KeyPressEventArgs) Handles Text1.KeyPress
Dim KeyAscii As Short = Asc(eventArgs.KeyChar)
If KeyAscii = 13 Then KeyAscii = 0 'Prevents the system from beeping
If KeyAscii = 8 Then GoTo EventExitSub 'Allow use of backspace key
If KeyAscii < 48 Or KeyAscii > 57 Then KeyAscii = 0 'Ignore other keys
EventExitSub:
eventArgs.KeyChar = Chr(KeyAscii)
If KeyAscii = 0 Then
eventArgs.Handled = True
End If
End Sub
Eldie
|
|
|
|
|
Eldie's strategy is correct, but it can be done with a simple function that you can then use in any other textbox also:
Public Function TrapKey(ByVal KCode As String) As Boolean<br />
If (KCode < 48 Or KCode > 57) And KCode <> 46 And KCode <> 8 And KCode <> 44 Then TrapKey = True<br />
End Function
Next in a textbox's keypress event:
Private Sub MyTextBox_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles MyTextBox.KeyPress<br />
e.Handled = TrapKey(Asc(e.KeyChar))<br />
End Sub
The different numbers in the function (the same ones that Eldie uses) represent different characters:
48 to 57 are numbers and the others are things like tabs, points, commas, etc. You can add or remove these extra numbers from the function depending on what you need.
have fun with it,
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
Sir/Madam,
I downloaded a project named Complete read Only Combo Box..
I am facing problem in that dll(Dynamic Link Library), which I have included into the project using add reference.Now I want to know , Whether I can use that dll as a control in the toolbar or not.I mean that dll is not appearing in he ToolBar.How Can I make it appear as a control in the toolbar.Initialy , I included that project into that solution and the control appeared into the Toolbar.But i want to include the dll rather the project file into the solution.
Please help.
Thanks and Regards
Pankaj
(India)
|
|
|
|
|
i have a simple application in vb.net as follows:
i have a textbox called salary.i have to enter the total salary amount that an employee as taken.after entering the total amount in the textbox when i press enter key a form will be displayed in which it will ask for the monthly break up i.e in which month how much salary taken..similarly i ve some other field..now when i finally press the submit button the total amount along with the monthly break up will be inserted into the database...i am using vb.net & ms access.
its urgent please...
any help in this will be highly appreciated..
i m pradip kishore
|
|
|
|
|
Hi Pradip,
What exactly is the problem? I hope you have some code that isn't working, because you can forget about someone providing you with a ready made application, if that is what you were hoping for.
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
Hi Johan
thanks for your reply.but i just want the concept how to do it not the entire ready made solution.if you can help me in this regard then i ll be greatful to you.
pradip kishore
|
|
|
|
|
Hi Pradip,
Allright then, if I understand you correctly, you are opening two different forms (f.e. FrmSalary and FrmBreakDown), and you need to pass data from each form to the same table.
Basically you can use two approaches:
1. write the data from the Salary form to the table, either direct, or via a dataset, and include some sort of record key, pass the key to the second form, for example by public variable. Then, based on the key, pass the data from the Breakdown form to the table.
2. same as approach 1, but first pass the whole thing to a temporary table, validate all data, or integrate some sort of user-approval step (the whoops step), and then copy the data to the table.
Hope this helps you,
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
Sir/Madam,
I was programically trying to ascertain whether the particular table in the database exist or not.For that i am using the following Query.
SELECT COUNT(*) AS TABLE_EXISTS FROM MSysObjects WHERE Name = 'Forms'
But the problem is , When I am tring to implement it using VB.net 2005.It shows the following error.
Records cannot be read.No read permission on MSysObjects
I am using MS-Access
Please help.
Thanks and Regards
Pankaj
(India)
|
|
|
|
|
hi,
Please can anyone tell me the difference b/w object based & object oriented techonolgy?
Thanks,
Rahi
If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Where have you heard the terms ? What is it you're hoping to find out ?
I've never heard of object based technology. Have you tried google ? Do you know what OO is ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
hi,
i know what is object oriented technology. i saw this in important questionnare from xyz site.
"VB.NET is object oriented where VB is object based". how can we explain this statement?
thanks,
Rahi
If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
OK - the answer then is that VB is crap. Object based is a way to make excuses for the fact that it's not OO. It knows about objects, but it's not OO, because it wasn't fully designed right. There is no design trade off, no reason to want 'object based', it's just a name for why VB sucks so much
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
how to write code to allow only numerics in vb.net
thax
|
|
|
|
|
|
Handle the keypress event and if char.isnumeric and char.iscontrol are both false for the char passed in on the event, set handled on the eventargs to true
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Ask your question in a new thread instead of as a reply in someone elses thread.
---
Year happy = new Year(2007);
|
|
|
|
|
Hi
I have to print an html file, I want to rotate it by 90 degrees. I know how to take portrait and landscape reports.
I want to know how to rotate it by 90 degrees. Do you know how to do it????
(I should be resize I know that and I can do it)
Thanks!
jayasshc
|
|
|
|
|
Hello,
I’m working on a window application with visual studio 2005. Get the following error message.
Unable to copy file "obj\Debug\MyProject.exe" to "bin\Debug\ MyProject.exe". The process cannot access the file 'bin\Debug\ MyProject.exe' because it is being used by another process.
What I did is:
1. I just copied some staffs from another project. When I build it, the above message is displayed.
2. I restarted my computer and rebuild the project, the error disappears
3. I add more code on my project and build it, the error comes again
If you can give me any good suggestion, I will really appreciate it.
|
|
|
|
|
possibilities:
1) are you running the application outside the ide? check the taskmanager and make sure myproject.exe is not in the list before you do a build.
2) in the ide, run the app and stop it. does the task manager show anything of your app is still running? if so, then investigate why.
3) do you have references to projects/dlls that other applications might be keeping them open?
Nathan
|
|
|
|
|
Nathan,
Thank you so much for your replay. Your reply is really helpful for me.
I think my case is the second one you mentioned. Once I run my project, I found a myproject.exe is running in task manager. After I kill it, my project can be build. Even I close visual studio with my project. MyProject.exe is still running. Do you think what is the possible reason? How to avoid it?
Jane
|
|
|
|
|
1) do you have any loops? maybe you have a condition where you can't get out of one?
2) are you "cleaning up after yourself", release all objects properly.
3) any "shared" or "global" objects not being released when you shutdown your main form?
|
|
|
|
|
How to get the unique Serial number on usb flash drive()vb.net2005
I need your help, please! Thanks all..
gladys
|
|
|
|