liquid8 Posted March 23, 2003 Posted March 23, 2003 I am launching another application using microsoft.visualbasic.shell, and I am using a hotkey control that will register when a key is pressed. Now I need to return focus to my application when that key is pressed. The hotkey event does fire when the key is pressed but does not return focus to my application. How can I do this? I am using VB.Net if that makes a difference in code. Thanks, LiQuiD8 Quote
liquid8 Posted March 24, 2003 Author Posted March 24, 2003 got it.. all i had to do was [form].activate, although for anyone that needs it, i did have to check if the form was minimized, otherwise changing focus back to it crashed out. So I just did this: If CurrentForm.WindowState = Windows.Forms.FormWindowState.Minimized Then CurrentForm.WindowState = Windows.Forms.FormWindowState.Normal End If CurrentForm.Activate() LiQuiD8 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.