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
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
.
Use SendKeys
http://msdn.microsoft.com/en-us/library/system.windows.forms.sendkeys.aspx
SendKeys.SendWait()
精彩评论