Please excuse if this is not relevant to the topic. I just could not avoid
the temptation of asking a pro.
I want to develop a tabbed form , for eg. the network properties box in Windows
NT has tabs called 'identification','services','protocols','adapters', etc.Clicking
on any tab changes the appearance of the rest of the form to focus exclusively
on topic in the tab.
Any thoughts on how I could implement this as simply as possible in VB Enterprise
Thanks in advance
Re: tabbed forms
I cover the implementation you describe in The Visual Basic Style Guide, on
pages 321 through 323, with code samples. Basically, you want to add a TabStrip
conrol to your form (part of the "Microsoft Windows Common Controls 6.0"
component), configure its tabs through its Property Page, then add enough
PictureBox controls for each of the tabs you will have. Make all but the
first PictureBox invisible by default. I like to keep the border for the
PictureBoxes turned on during development, and tile them to make them easy
to work with. Then, in my Form_Load event, I turn off the border and reposition
them all to match the upper-left-most PictureBox. You can put the PictureBoxes
in a control array if you wish, or you can name the separately. Just be
sure to either give them meaningful names, or create a meaning set of constants/enum
for referencing the elements of the control array in code.
Once you have added your controls to your PictureBoxes, add the code to the
tabActive_Click event that correctly hides and shows the PictureBoxes based
on the value of the TabStrip's SelectedItem.Index property. You should also
add the appropriate code to the Form_KeyDown event to enable tab selection
via the Ctrl+Tab and Shift+Ctrl+Tab key combinations.
To make your user's life easier, make sure you correctly tab-order all controls
on all pages of your form. Set the TabStop property of the PictureBoxes
to False, and set the TabIndex of the TabStrip itself to appear last in the
tab order (after any OK or Cancel buttons you may have). As I mentioned
before, there are complete code samples in my book for this implementation.
VB6 also includes a "Microsoft Tabbed Dialog Control 6.0 (SP3)" component.
This version simplifies the process by allowing you to place controls directly
on the tab pages. However, you should use the Windows Common Control version
instead as it is more consistent with other applications.
Last Post: 08-19-2002, 09:03 PM
By William R. Cousert in forum .NET
Last Post: 02-21-2002, 06:28 AM
By Barend Esterhuizen in forum VB Classic
Last Post: 06-16-2000, 05:39 AM
By Brian Weiss in forum Enterprise
Last Post: 04-05-2000, 09:34 PM
By Ashu Mahajan in forum Web
Last Post: 03-30-2000, 02:53 PM
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL