473,408 Members | 1,809 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,408 software developers and data experts.

textbox enter or GotFocus

Dear All,

What is the different between Enter and GotFocus events?

Best reagrds,
Boki.

Apr 20 '06 #1
2 7747
>From the docs :

The GotFocus and LostFocus events are low-level focus events that are
tied to the WM_KILLFOCUS and WM_SETFOCUS Windows messages. Typically,
the GotFocus and LostFocus events are only used when updating UICues.

The Enter and Leave events should be used for all controls except the
Form class, which uses the Activated and Deactivate events.

Regards,

Cerebrus.

Apr 20 '06 #2
Boki wrote:
What is the different between Enter and GotFocus events?


GotFocus and LostFocus are "low-level" events that Our Friends in
Redmond would prefer us not to use any more.
Enter and Leave are their respective replacements.

Also, bear in mind the caution tone of this MSDN article:

http://msdn2.microsoft.com/en-us/lib...us(VS.80).aspx
specifically

"Do not attempt to set focus from within the LostFocus event handler.
Doing so can cause your application or the operating system to stop
responding ..."

8-o

Regards,
Phill W.
Apr 20 '06 #3

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

Similar topics

3
by: | last post by:
Hi , I did ask before but got no replies. I have a series of textboxes, In Enter event I need to set the focus to a different textbox I am having problems when I set focus within the Textbox...
2
by: Gopal Krishna Tengli | last post by:
Hi, I want to impliment the textbox's gotfocus event. Its not a intrincic event. So not listed in the editor. Waiting for an innovative reply... Gopal Krishna
1
by: Larry Woods | last post by:
Hi, Can't figure out how to highlight text in a textbox for reentry of input. Used to do it with SelectLength and SelectStart but this doesn't seem to work with .NET. Ideas? TIA,
6
by: Bruce D | last post by:
I have a datagrid (uggg) that I use and create the columns programmatically...see below. objCol = New DataGridTextBoxColumn objCol.MappingName = "amount" objCol.HeaderText = "Amount"...
1
by: teo | last post by:
Hallo, I'd like to write in a Textbox1, press Enter on the keybord, and fire the Click event of a Button (unique Button control on the web form). Now: if a second Textbox2 is present on the...
5
by: =?Utf-8?B?QmVuIFIu?= | last post by:
Hi, In a .NET 2.0 winforms application, I've got a textbox that, when updated, uses the validated event to cascade the change to another textbox (along with another value). This works well if...
1
by: Alex | last post by:
Hi. I have... well.... not very many computer-literate users to my web- site. For the textbox which expects an email address, for instance, I had to enter a default text like "Email..."...
10
by: engteng | last post by:
When textbox properties enable = False the font in the textbox become gray color. How do I change the gray color to black color ? Regards, Tee
8
by: lenniekuah | last post by:
Hi Good Guys, I need your help. Please Help me and share your knowledge of sample coding with me. The WEBFORM1.ASPX is working well and I am very Puzzle by the data entry TEXTBOX. Each time after...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.