views:

33

answers:

2

I used to know vb6 and I need to make a quick application. I hope someone can help me with how to send keys to a minimized window in vb.net

thanks

A: 

Normally you can send keys with the SendMessage API function, but I'm not sure if it would be affected in any way by the window being minimized, I don't think so but I haven't tried.
To use a Windows API function from VB.Net you need to use PInvoke to call it, you can find information about how to do that on this page.

The MSDN page for SendMessage might also be useful for information about how it works.

Btw, you probably want to use the WM_CHAR message which is 0x0102.

ho1
A: 

Use SendKeys

http://msdn.microsoft.com/en-us/library/system.windows.forms.sendkeys.aspx

SendKeys.SendWait()
Sein Kraft