aewarnick Posted November 29, 2003 Posted November 29, 2003 Is there a way to remove focus from a control or window with code? Quote C#
Leaders Iceplug Posted November 30, 2003 Leaders Posted November 30, 2003 It might lose focus if you disable it and then reenable it. :)Otherwise, where would you want the focus to go? Quote Iceplug, USN One of my coworkers thinks that I believe that drawing bullets is the most efficient way of drawing bullets. Whatever!!! :-(
Moderators Robby Posted November 30, 2003 Moderators Posted November 30, 2003 you can simply set focus on any other control, and if there's only one control on the form then focus on the form itself... me.focus() Quote Visit...Bassic Software
aewarnick Posted November 30, 2003 Author Posted November 30, 2003 Ok, I'll explain exactly what I am doing. I have a Form that I use to test my code, I create it initially, then keep a pointer to the hwnd. From then on, I use the handle to access the Form's TextBox where I display variables values of the Form that I am testing. The problem is that when I change the text on the text box, it steals the focus from the form I am testing. Quote C#
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.