|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Form FocusHi,
I have a VB.NET form with a bunch of controls in it . The focus is in one of the controls , (i.e. a textbox), is there any way to click on the form itself and make the textbox lose focus and have the form gain the focus , so that no control on the form has the focus ? Thanks, Hang It sounds like the textbox is the defualt item & is highlighted still when
the form is clicked Click VIEW menu TAB ORDER & change it there, but you won't be able to set the form as tab order The Textbox also has a boolean tabstop property which by default is set to true I hope that helps, Show quoteHide quote "Scott Lam" <Scott***@discussions.microsoft.com> wrote in message news:F4AC6289-5CFC-4F4F-BADD-2DE961FC9FEF@microsoft.com... > Hi, > > I have a VB.NET form with a bunch of controls in it . > The focus is in one of the controls , (i.e. a textbox), is there any way to > click on the form itself and make the textbox lose focus and have the form > gain the focus , > so that no control on the form has the focus ? > > Thanks, > Hang my problem is that i want all controls in my form to lose focus when a user
clicks on the form ... does anybody know if that's possible ? thanks, Show quoteHide quote "Newbie Coder" wrote: > It sounds like the textbox is the defualt item & is highlighted still when > the form is clicked > > Click VIEW menu TAB ORDER & change it there, but you won't be able to set > the form as tab order > > The Textbox also has a boolean tabstop property which by default is set to > true > > I hope that helps, > > "Scott Lam" <Scott***@discussions.microsoft.com> wrote in message > news:F4AC6289-5CFC-4F4F-BADD-2DE961FC9FEF@microsoft.com... > > Hi, > > > > I have a VB.NET form with a bunch of controls in it . > > The focus is in one of the controls , (i.e. a textbox), is there any way > to > > click on the form itself and make the textbox lose focus and have the form > > gain the focus , > > so that no control on the form has the focus ? > > > > Thanks, > > Hang > > > If you click the form then all the controls will lose focus because the form
will have the focus Show quoteHide quote "Scott Lam" <Scott***@discussions.microsoft.com> wrote in message news:47165337-2011-4B0D-84AD-5704844F30EC@microsoft.com... > my problem is that i want all controls in my form to lose focus when a user > clicks on the form ... > does anybody know if that's possible ? > > thanks, > > "Newbie Coder" wrote: > > > It sounds like the textbox is the defualt item & is highlighted still when > > the form is clicked > > > > Click VIEW menu TAB ORDER & change it there, but you won't be able to set > > the form as tab order > > > > The Textbox also has a boolean tabstop property which by default is set to > > true > > > > I hope that helps, > > > > "Scott Lam" <Scott***@discussions.microsoft.com> wrote in message > > news:F4AC6289-5CFC-4F4F-BADD-2DE961FC9FEF@microsoft.com... > > > Hi, > > > > > > I have a VB.NET form with a bunch of controls in it . > > > The focus is in one of the controls , (i.e. a textbox), is there any way > > to > > > click on the form itself and make the textbox lose focus and have the form > > > gain the focus , > > > so that no control on the form has the focus ? > > > > > > Thanks, > > > Hang > > > > > > i tried that ... i thought the same thing but it doesn't work ... it works on
web pages but not on Windows form, or am i missing something ? give it a try and see if you get the same thing ... Show quoteHide quote "Newbie Coder" wrote: > If you click the form then all the controls will lose focus because the form > will have the focus > > > "Scott Lam" <Scott***@discussions.microsoft.com> wrote in message > news:47165337-2011-4B0D-84AD-5704844F30EC@microsoft.com... > > my problem is that i want all controls in my form to lose focus when a > user > > clicks on the form ... > > does anybody know if that's possible ? > > > > thanks, > > > > "Newbie Coder" wrote: > > > > > It sounds like the textbox is the defualt item & is highlighted still > when > > > the form is clicked > > > > > > Click VIEW menu TAB ORDER & change it there, but you won't be able to > set > > > the form as tab order > > > > > > The Textbox also has a boolean tabstop property which by default is set > to > > > true > > > > > > I hope that helps, > > > > > > "Scott Lam" <Scott***@discussions.microsoft.com> wrote in message > > > news:F4AC6289-5CFC-4F4F-BADD-2DE961FC9FEF@microsoft.com... > > > > Hi, > > > > > > > > I have a VB.NET form with a bunch of controls in it . > > > > The focus is in one of the controls , (i.e. a textbox), is there any > way > > > to > > > > click on the form itself and make the textbox lose focus and have the > form > > > > gain the focus , > > > > so that no control on the form has the focus ? > > > > > > > > Thanks, > > > > Hang > > > > > > > > > > > > No, I don't get the same
If you use Outlook Express for posting messages then zip the project & add to your post then it can be downloaded or just past the entire forms class in here Newbie Coder I got the answer from another board, in case somebody else runs into the same
problem, here is what I used: in the Form_click event, add : Form1.ActiveControl = nothing Thanks for all your reponses, hang Show quoteHide quote "Newbie Coder" wrote: > No, I don't get the same > > If you use Outlook Express for posting messages then zip the project & add > to your post then it can be downloaded or just past the entire forms class > in here > > Newbie Coder > > > Aha - nice one
Show quoteHide quote "Scott Lam" <Scott***@discussions.microsoft.com> wrote in message news:1EA337D3-53EF-4567-8449-5CF826F89AFC@microsoft.com... > I got the answer from another board, in case somebody else runs into the same > problem, here is what I used: > > in the Form_click event, add : > Form1.ActiveControl = nothing > > Thanks for all your reponses, > hang > > "Newbie Coder" wrote: > > > No, I don't get the same > > > > If you use Outlook Express for posting messages then zip the project & add > > to your post then it can be downloaded or just past the entire forms class > > in here > > > > Newbie Coder > > > > > >
Binary Read Method?
cut, copy, and paste Multithreading with DirectoryServices pseudo spin-lock design help DirectoryServices Cast Error? can send data to sql 2005, can not read data from sql 2005 with vb Strange RaiseEvent Problem What Happened To F5 Stopping Windows Service with Thread Console Application - run in hidden mode |
|||||||||||||||||||||||