473,626 Members | 3,322 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.EventArg s) Handles cmdLogin.Leave
If TabControl1.Sel ectedIndex = 0 Then
TabControl1.Sel ectedTab = TabPage2
txtOPCD.Focus()
ElseIf TabControl1.Sel ectedIndex = 1 Then
TabControl1.Sel ectedTab = 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.Sel ectedTab = TabPage2 and
TabControl1.Sel ectedTab = 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 720

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

Similar topics

8
2417
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 below is a test form I created to demo the problem. It has a single text box and a command button with the code below. It's function is to determine if a particular folder exists or not. Please note that this code has worked just fine for...
3
3638
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 page, 2) Breakpoint in the Page_Load, 3) debug the web page and click the submit button, 4) "step into" under debug several times, 5) The debugger does not stop at any of the statements in the click event handler. A breakpoint is needed in each...
1
1278
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 run this and output the string to the trace information, I get the following value:
0
1194
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 failed accessing the private key of the certificate and as we tried to figure out what is the problem we came across the following Microsoft Article: http://support.microsoft.com/d­efault.aspx?scid=kb;en-us;3275­87
1
1799
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 that is broken out into two sections. One section is where a user enters the main infomation around a financial outlook record and the second section is dynamic content that generates a table of values based on the infromation entered in the first...
1
2290
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 value of s is "test2.icon1.ico". This program will compile and run just fine from visual studio .net 2003 using .net 1.1 and also will compile and run just fine using csc form1.cs /resource:icon1.ico. Now, I created a new string called s2 and...
4
1256
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 order within a level. On Windows 2000 Server everything works fine. When I put it on the 2003 Server, everything worked exactly the same except for changing the order of nodes within a level. If this were an error in code, I'd expect it to not work...
6
2259
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 the same method (aka delegate?). I use the Tag property within this method to determine what user action is taking place. Very simple: When adding toolbar button: tbButton.Click += new...
3
2424
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 that I can't explain. One of the desired affects was to provide the ability to change the background color on images that were selected, as well as setting the background color back to its original color after the image had been deselected. To...
0
8265
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8196
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8705
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8364
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8504
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6125
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5574
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4197
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1511
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.