473,500 Members | 1,929 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Strange event behavior under VS.Net 2003

Hi,

I have VB.Net Windows forms code that's been running under
VS.Net 2002 for months and just now we are converting to
VS.Net 2003.

After the conversion, however, the following event handler
is broken:

Private Sub cmdLogin_Leave(ByVal sender As Object, ByVal e
As System.EventArgs) Handles cmdLogin.Leave
If TabControl1.SelectedIndex = 0 Then
TabControl1.SelectedTab = TabPage2
txtOPCD.Focus()
ElseIf TabControl1.SelectedIndex = 1 Then
TabControl1.SelectedTab = TabPage1
txtLogin.Focus()
End If
End Sub

As you can see, this is nothing more than a command
button's lost focus event handler that swith between two
tab pages and it worked fine until VS.Net 2003.

Now what happens is that, for some reason, the line
TabControl1.SelectedTab = TabPage2 and
TabControl1.SelectedTab = TabPage1 both fire up the
current event handler, cmdLogin_Leave. That causes this
method to be fired over and over again in a dead loop.

Why is that? What should I do to fix this?

Thanks a lot.

feng
Nov 20 '05 #1
0 713

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

Similar topics

8
2406
by: Lauren Wilson | last post by:
Hi Folks, We have a solid, five year old Access app that is suddenly behaving oddly after conversion to Access 2002/2003 format. Everything seems to run OK except for a few oddities. The code...
3
3625
by: R Millman | last post by:
under ASP.NET, single stepping in debug mode appears not to stop within event procedures. i.e. 1) Create web page with submit button and event procedure for the click event in the code behind...
1
1272
by: Justice Gray | last post by:
I have the following code encapsulated in an ascx page (user control): namespace MyCompany.Web.UserControls { string webform_namespace = this.GetType().Namespace.ToString(); } Now, when I...
0
1179
by: hagaiy | last post by:
Has anyone else come across this? We are building an ASP.Net application that uses a certificate and private key in the local machine store. (we are testing it both on windows 2000 & 2003) We...
1
1787
by: Mossman | last post by:
Hello, I will discuss at a high level what is happening on an ASP.NET web page I developed a year ago in ASP.NET using Visual Studio 2003 and currently support. I have an ASP.NET web page...
1
2271
by: hansolox1 | last post by:
The following program simply sets the icon of a form called form1. When I get the name of the embedded icon using GetManifestResourceNames(), I store the name in a string variable called s. The...
4
1244
by: Dovla | last post by:
Hi, I have the following problem. I have a project that uses the Treeview control. The code supports drag-drop functionality for moving nodes between different levels and for changing their...
6
2250
by: Joseph Geretz | last post by:
Writing an Outlook AddIn with C#. For the user interface within Outlook I'm adding matching pairs of Toolbar buttons and Menu items. All of the buttons and menu items are wired up to send events to...
3
2416
by: senfo | last post by:
I developed a Windows control in VS 2005 that inherits from the PictureBox Control that adds the ability to select images in a Windows application. It is, however, experiencing a strange issue...
0
7018
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...
1
6906
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
5490
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,...
1
4923
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
3110
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3106
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1430
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
672
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
316
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.