About using keybd_event to send "Tab" problem.
-
When i use keybd_event to send "Tab"(VK_TAB 0x09) key, it doesn't work in mobile. But other keys can work. Thanks a lot. ;P
You should be able to send the Tab key, but you will run into problems if you want to actually handle it with a KeyEventHandler. If you can't use another key for whatever application you are working on, see this MSDN magazine article (it specifically addresses the Tab key issue): Add Keyboard Support to Compact Framework Apps by Trapping Windows Messages[^] Disclaimer: the article is a few years old now and I have not tried out the code myself -- it looks to be fairly involved.
Blog: http://windowsclientdevelopment.spaces.live.com FAQs: http://windowspresentationfoundation.wikispaces.com http://windowsmobile.wikispaces.com http://vsto.wikispaces.com
-
When i use keybd_event to send "Tab"(VK_TAB 0x09) key, it doesn't work in mobile. But other keys can work. Thanks a lot. ;P
Actually, it looks like you can handle the Tab key if you are running on a device with .NET CF 2 or 3.5. In your Form constructor, set this.KeyPreview to true. You can now use the Form's KeyDown event to check for the Tab key. Of course, I am making a number of assumptions about what you are trying to do and what the problem is (besides it doesn't work).
Blog: http://windowsclientdevelopment.spaces.live.com FAQs: http://windowspresentationfoundation.wikispaces.com http://windowsmobile.wikispaces.com http://vsto.wikispaces.com