Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB.NET / October 2004

Tip: Looking for answers? Try searching our database.

LostFocus Firing on PageLoad

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Wayne  Wengert - 27 Oct 2004 00:09 GMT
I have a form that has a cbo set to TabIndex 0 (it is the only item set to
tabindex 0). On page Load if I step through the code that cbo LostFocus
event fires after other initializations are completed and after the
LostFocus event completes, that cbo gets focus and the form opens? Why is
that LostFocus event firing? Any hints on how to debug this?

Wayne
Tom John - 27 Oct 2004 10:07 GMT
>I have a form that has a cbo set to TabIndex 0 (it is the only item set to
>tabindex 0). On page Load if I step through the code that cbo LostFocus
[quoted text clipped - 3 lines]
>
>Wayne

Did you say it was happening when you step through the code? If that's
the case, is the form not loosing focus when the VS IDE gets focus for
you to step through the code?

Hope this helps

Tom.
Wayne  Wengert - 27 Oct 2004 10:51 GMT
When I step through the code I see the following:

1. The PageLoad event fires and that code runs - initializes some cboBox
lists and such
2. When PageLoad exits the LostFocus event immediately fires for the cbo
with tabindex 0
3. The form opens with that cbo having focus (the GotFocus event never
fires?)

Wayne

> >I have a form that has a cbo set to TabIndex 0 (it is the only item set to
> >tabindex 0). On page Load if I step through the code that cbo LostFocus
[quoted text clipped - 11 lines]
>
> Tom.
Tom John - 27 Oct 2004 11:07 GMT
>When I step through the code I see the following:
>
[quoted text clipped - 4 lines]
>3. The form opens with that cbo having focus (the GotFocus event never
>fires?)

Can you post a code snippet that illustrates this please?

Thanks

Tom
Wayne  Wengert - 27 Oct 2004 18:24 GMT
Tom;

What code is needed?  Basically, The Page Load Event Fires and then the Lost
Focus event for the cbo with tabindex = 0 fires. There is not really any
"code" involved. I tried it with minimal code in page load (initialize a
textbox) and lost focus (change background color).

Wayne

> >When I step through the code I see the following:
> >
[quoted text clipped - 10 lines]
>
> Tom

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.