|
I have a problem that how to determine which key pressed by user. I have already used 'Keys' enumerator and 'Keycode' property of 'KeyEventArgs' class. It was returned key code only. if user pressed 'A' key, it returned 65. But how can i know that user pressed 'A' or 'a'. In this case i have disabled typing in Text box. Somebody have any idea.
|
|
|
|
|
I don't know which event you're handling, but the KeyEventArgs class has a Modifiers property which will tell you if the Ctrl, Shift, or Alt keys are down at the time the key was up or down.
|
|
|
|
|
You are probably going to have to be a bit more specific in what you are trying to do.
Pasan148 wrote: if user pressed 'A' key, it returned 65
That is correct since 65 is the ASCII code for A
Pasan148 wrote: how can i know that user pressed 'A' or 'a'
If the user entered a lower case 'a' the ASCII code would be 97.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
Help humanity, join the CodeProject grid computing team here
|
|
|
|
|
The KeyPress event passses a KeyPressEventArgs which holds the KeyChar, i.e. the char that the user intends when he types a key or key combination that produces some text. This is the event you should use to consume text input.
The KeyDown and KeyUp events also fire for key actions that don't produce visible text, such as the control key. They hold a KeyEventArgs that has all possible information about a key and the key modifiers. These are the events you could use to filter keyboard input.
BTW: Control.ModifierKeys is always up to date, but seldom needed.
PS: is something wrong with the documentation? did Google break down? Read up on the classes you use!
|
|
|
|
|
Hi !
I have two DLLs (VB.NET converted from VB6 COM).
First of them is instantiated in the test windows executable.
Then the method of this DLL is called, that in turn has to instantiate the second
DLL and to call it's method.
On two computers it works, on the third - fails with error in subject on instantiating second assembly.
The only difference between these computers is the VS2008. On the first two it is
installed, on the third - not.
I've tried all that I could find in the Internet and that looks more or less close to my problem. With no luck.
Can somebody please help me to solve this problem and to understand - why this happens.
The issue is very urgent.
Thanks in advance.
Regards,
Gennady
My English is permanently under construction. Be patient !!
|
|
|
|
|
Error 53 is "network path not found". Is this second .DLL locally installed on the machine and does it reside in the .EXE's folder or one of the folders listed in the PATH environment variable?
|
|
|
|
|
All DLLs and .exe are in the same folder.
Thanks.
Regards,
Gennady
My English is permanently under construction. Be patient !!
|
|
|
|
|
What about framework versions? VS2008 can build against 2.0, 3.0 or 3.5 I believe.
Check which version your dlls were compiled against and check what is installed on the third machine.
|
|
|
|
|
Good point. I'll check it tomorrow morning (it's 20:45 now).
I suppose that 3.5 on the target computer is installed, but it's worth to check.
Thanks.
Regards,
Gennady
My English is permanently under construction. Be patient !!
|
|
|
|
|
I've checked it. Versions 2.0,3.0 and 3.5 are installed on all three machines.
Regards,
Gennady
My English is permanently under construction. Be patient !!
|
|
|
|
|
Hi !
Finally the problem solved. Thanks to Ben Peterson and his
A .NET assembly viewer[^] !!
Among Referenced Assemblies I've found the ADODB assembly, that is absent on the third machine.
Now all works as expected.
Thanks to everyone who tried to help me.
Regards,
Gennady
My English is permanently under construction. Be patient !!
|
|
|
|
|
Hi every body:
first: excuseme for my incompelet qustion that I send it almost one week ago. realy it was not my fault, I was on in this site and syddenly internet disconnected.
and now my question:
How I can find ALL the functions in vb.Net and explanation for all of them, I use MSDN. but i want a pdf file or something like that.
if sombody has somthing like that, I need it.
thank you
|
|
|
|
|
What good would that be?? How are you going to work with a file of that size?
|
|
|
|
|
negar karimi wrote: i want a pdf file
I highly doubt anyone has anything remotely close to that.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
Help humanity, join the CodeProject grid computing team here
|
|
|
|
|
A PDF version of MSDN? It doesn't exist. It would be tens of thousands of pages long.
|
|
|
|
|
I don't want A PDF version of MSDN
|
|
|
|
|
Yes, you did:
How I can find ALL the functions in vb.Net and explanation for all of them,
|
|
|
|
|
Even just all the classes would be an unmanageable size list. That is just including the CLR. .NET can access far more that that so you could be reading for a few years, by which time they will bring out an update with even more classes and methods.
Most people learn the basics, then search for appropriate classes as the need arises.
|
|
|
|
|
Are you saying that you want an off-line version that you can read without being connected to the internet? Is that why you want a PDF?
|
|
|
|
|
I mean I want some of the most important and famouse functions.
|
|
|
|
|
There are relatively few functions built into VB.NET itself. The real "famous" stuff is in the .NET Framework and is tens of thousands of pages long.
There is a reason why subscribers get the MSDN documentation on a DVD and not in PDF format.
|
|
|
|
|
Hello.
I got a project in VB6 and I want to convert it to .NET.
This project also includes Crystal Reports and I am having hard time to convert it because nthg seems to work.
Is there anyway to convert this project form by form (one form in a time)
By your experience which is the simple way of converting without having the trouble of writing everything from the beginning.
Im mostly interested in converting forms because dont want want to recreate all the properties from the scratch.
Best regards
|
|
|
|
|
The simplest way is to open the old VB6 project file (.vbp) in Visual Studio .NET. It'll launch the conversion wizard and try and convert the project for you. This does not work in the Express Edition!
Warning! You'll probably have to fix up a bunch of the code. No conversion tool is going to do a perfect job.
|
|
|
|
|
|
HI EVERY BODY,
PLEASE PROVIDE BARCODE CODEING FOR BARCODE READER
THANKS
|
|
|
|