I used to do a lot of progamming in the dark ages, I know Basic pretty well, and recently began writing in VB.NET. So, I'm far from a novice, but new to this language.
Anyway, I have a prgram in whcih I run a loop until the capslock key is detected to be on. The problem is, the loop blows past the test and I am convinced I am losing keyboard focus somewhere. I read that I might be better off running the loop and creating a timer that checks for the event and, if found, sets a variable to false that will end the loop.
So, I literally clipped the sample code from the help topic in VB 2008 Express and put it in my program and it won't compile. I get this error:
Handles clause requires a WithEvents variable defined in the containing type or one of its base types. I cannot understand from the help system what I need to do.
Alternatively, why would a simple loop cause me to lose the ability to see the keyboard? I don;t change forms, I simply grab a message off a web page and copy it to a textbox. Over and over as the message changes.
I'm all too happy to share the code.
Thx!
RW
Anyway, I have a prgram in whcih I run a loop until the capslock key is detected to be on. The problem is, the loop blows past the test and I am convinced I am losing keyboard focus somewhere. I read that I might be better off running the loop and creating a timer that checks for the event and, if found, sets a variable to false that will end the loop.
So, I literally clipped the sample code from the help topic in VB 2008 Express and put it in my program and it won't compile. I get this error:
Handles clause requires a WithEvents variable defined in the containing type or one of its base types. I cannot understand from the help system what I need to do.
Alternatively, why would a simple loop cause me to lose the ability to see the keyboard? I don;t change forms, I simply grab a message off a web page and copy it to a textbox. Over and over as the message changes.
I'm all too happy to share the code.
Thx!
RW