ArtinSoft's Blogs

Software Migration Experts
Welcome to ArtinSoft's Blogs Sign in | Join | Help
in Search

Jose Aguilar's Blog

All things migrations, software and technology

Interesting Behavior of TabIndex in Migrated Applications

While working on a migration project recently, we found a very particular behavior of the TabIndex property when migrating from Visual Basic 6.0 to .NET. It is as follows:

In VB6, we have the following form: (TabIndexes in Red)

Note that TabIndex 0 and 10 correspond to the Frames Frame1 and Frame2. If you stand on the textbox Text1, and start pressing the tab key, it will go through all the controls in the following order (based on the TabIndex): 1->2->3->4->5->6->-7>8->9.

After the migration, we have the same form but in .NET. We still keep the same TabIndex for the components, as shown below:

In this case TabIndex 0 and 10 correspond to the GroupBox Frame1 and Frame2. When going through the control in .NET, however, if you start pressing the tab key, it will use the following order: 1->2->3->7>8->9->4->5->6. As you can see, it first goes through the buttons (7, 8 and 9) instead of going through the textboxes. This requires an incredibly easy fix (just changing the TabIndex on the GroupBox) to replicate the behavior from VB6, but I thought it would be interesting to throw this one out there. This is one of the scenarios where there is not much that the VBUC can do (it is setting the properties correctly on the migration). It is just a difference in behavior between VB6 and .NET for which a manual change IS necessary.

Published Nov 05 2008, 10:14 PM by Jaguilar
Filed under: ,

Comments

 

Sarah said:

I recently came across your blog and have been reading along. I thought I would leave my first comment. I don't know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.

Sarah

http://adoptpet.info

April 7, 2009 8:01 PM

Leave a Comment

(required) 
(optional)
(required) 
Submit

About Jaguilar

Jose A. Aguilar has been working at ArtinSoft for more than 6 years, starting out with Informix to Java migrations and moving on to VB6 to .NET conversions using the Visual Basic Upgrade Companion. He currently works as both Senior Software Migration Consultant and Program Manager for the Visual Basic Upgrade Companion, helping clients to leverage their existing investments in VB6 by moving them to .NET Framework.

This Blog

Syndication

Powered by Community Server (Non-Commercial Edition), by Telligent Systems