Home All Groups Group Topic Archive Search About
Author
22 Dec 2006 12:21 AM
Scott Lam
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

Author
22 Dec 2006 12:31 AM
Newbie Coder
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
Author
22 Dec 2006 2:42 AM
Scott Lam
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
>
>
>
Author
22 Dec 2006 2:48 AM
Newbie Coder
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
> >
> >
> >
Author
22 Dec 2006 3:01 AM
Scott Lam
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
> > >
> > >
> > >
>
>
>
Author
22 Dec 2006 3:29 AM
Newbie Coder
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
Author
22 Dec 2006 4:40 PM
Scott Lam
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
>
>
>
Author
22 Dec 2006 6:01 PM
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
> >
> >
> >