Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form does not have focus 1

Status
Not open for further replies.

SkennyR

Programmer
Mar 7, 2004
157
US
I have a program that does some behind the scenes things, then displays a form.
I have form's key preview set to true, maximised, control box false. The form should and does fill up the whole screen. I have windows taskbar set to autohide, so all I see on the screen is my form.
The form expects user to press ENTER key to do its thing.
Problem is that form displays how I want it to, but if there is another program in the taskbar, if I press ENTER, that other program sees the keypress. I have to mouse click on the form and then it will see the keypress.
I have searched for a way to give the form focus, but I cant find it. Me.SetFocus gives me an error.
Appreciate any help..
TIA.
 
Hey, I like that! I think it will work just fine.
Thanks!!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top