473,405 Members | 2,141 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Form Focus

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
Dec 22 '06 #1
6 2588
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" <Sc******@discussions.microsoft.comwrote in message
news:F4**********************************@microsof t.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

Dec 22 '06 #2
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" <Sc******@discussions.microsoft.comwrote in message
news:F4**********************************@microsof t.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


Dec 22 '06 #3
If you click the form then all the controls will lose focus because the form
will have the focus
"Scott Lam" <Sc******@discussions.microsoft.comwrote in message
news:47**********************************@microsof t.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" <Sc******@discussions.microsoft.comwrote in message
news:F4**********************************@microsof t.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

Dec 22 '06 #4
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 ...


"Newbie Coder" wrote:
If you click the form then all the controls will lose focus because the form
will have the focus
"Scott Lam" <Sc******@discussions.microsoft.comwrote in message
news:47**********************************@microsof t.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" <Sc******@discussions.microsoft.comwrote in message
news:F4**********************************@microsof t.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
>
>
>


Dec 22 '06 #5
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
Dec 22 '06 #6
Aha - nice one
"Scott Lam" <Sc******@discussions.microsoft.comwrote in message
news:1E**********************************@microsof t.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


Dec 22 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: JJ | last post by:
Hi All, When someone selects a value in a select on a form I want to show the same form with another select with certain values depending on first select. How can I do this? Should I keep...
7
by: AnnMarie | last post by:
My JavaScript Form Validation doesn't work at all in Netscape, but it works fine in IE. I made some of the suggested changes which enabled it to work in IE. I couldn't make all the changes...
15
by: Steve | last post by:
I have a form with about 25 fields. In the BeforeUpdate event of the form, I have code that sets the default value of each field to its current value. For a new record, I can put the focus in any...
13
by: Manuel Lopez | last post by:
I have a puzzling form timer problem that I didn't experience prior to Access 2003 (though I'm not sure access 2003 is to blame). Here's the situation: a computer has two access 2003 databases on...
17
by: Neil Ginsberg | last post by:
OK, this is a stupid thing, but I can't seem to get this to work. I have a form with a subform (in continuous form view). A combo box on the main form has code in the AfterUpdate event which adds a...
6
by: Ekim | last post by:
hy, I've got a quite simple application: one windows form that consists of a button, and as soon as the user hits the button a second form shall appear. The difficult thing about it is that I...
2
by: Sid Price | last post by:
Is there a way of stopping a form getting focus in VB.NET. The scenario I have is a main form and a form used for display only. There are no user controls on the display form and it does not ever...
2
by: SONIQ | last post by:
Using javascripts to validate this form. Basic operation, when a user clicks the submit order button, the javascript code must validate everything entered by the user. Please help finnish this...
2
by: Joergen Bech | last post by:
Hope someone has a solution or some suggestions for this. This cannot be right?!? Problem: I have multiple non-modal forms open at the same time. One or more of these forms have a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.