Visual Basic 6 program character input switches from English
I'm having a really quirky problem and I don't know where to start on how to fix the source code:
In a Visual Basic 6 program running under Windows 7, periodically (maybe once a week or so) the keyboard input seems to switch to another language (ie the '/' key becomes a 'É' instead) for text input fields.
Once the program is closed 开发者_开发百科and then re-opened, the keyboard input is correct once again.
The regional and keyboard settings for Windows itself are unchanged from English (US), and this sudden change occurs during runtime and not on startup.
I don't have a lot of experience with vb6 programs, but has anybody seen something like this before? I was thinking it could be some kind of memory issue.
Thanks.
It happens to me all the time...
After some investigation it was because by default, Windows XP (I don't know Windows 7), when it has more than one keyboard layout configured, it sets up two hot-keys to switch back and forth between them: LAlt+LShift and LAlt+RShift.
As it happened, I pressed this combination once in a while without even noticing. And, since the keyboard layout is, by default, local to the application, I had just the same behavior that you describe.
If this is your case, this feature is easily disabled from Control Panel / Regional settings, or whatever they call it in Windows 7.
精彩评论