 |
 |

10-12-2002, 04:08 PM
|
|
|
Adding additional tabs
|
I was wondering how one could add tabs to my VB program I am in the process of designing for a program dossier I am doing for my Computer IBS class. The attachment shows what I am talking about- the tabs at the top that allows one to switch between "Alpabetic" and "Categorized." If you could tell me how to allow me to create those tabs, I would greatly appreciate it, thank you.
|
|

10-12-2002, 04:24 PM
|
|
|
|
Right click on the toolbox and select Components... in the menu that pops up. In the new window, scroll down to "Microsoft Windows Common Controls 6.0 (SP4)" and check the box to the left of that line. Click OK and you will see some new controls in the toolbox. One of them looks like the tabs you want. (It should be the first new control added.)
|
|

10-12-2002, 04:24 PM
|
|
Original Contributor
Retired Moderator * Guru *
|
|
Join Date: Jan 2001
Location: Watch Window
Posts: 2,781
|
|
|
You could use the Tabstrip control.
Right click the tool box -> Select components -> Scrool down and select Microsoft Windows Common Controls 6.0 -> Click OK
Now drag the tab control from the tool box and place it on the form and add your favorite coding style to it.
|
__________________
JDT
|

10-12-2002, 04:38 PM
|
|
|
|
Okay I have the tabStrip there, thanks.
Sorry, a few more questions (havn't used VB in a while, forgot a lot about it =\)...
a) How would I be able to do what is in the attachment above? I.e. have the two tabs, but on a wider scale, with one tab having a large textbox and the other having a texbox and an image section, with both parts occupying half of the space?
b) Is it possible in VB to be able to click on a Picture or Image Box, bring up a "load file" prompt, be able to select a gif or jpg already stored, and then load the image into the Pic/Image Box?
|
|

10-13-2002, 11:21 AM
|
|
|
The image no longer loads for me, but as I recall, it was the properties window forthe VB6 IDE.
a) Assuming you mean something like the Picture property line.. In the resize event of the parent, divide the width of the parent by two and adjust the two textboxes accordingly. In the right textbox, put a command button, or image over the right side of it.
b) In the Click event of the picture or image, pop up the common dialog control to get the path to an image. To load the image:
Code:
picBoat.Picture = LoadPicture("C:\Boats\minnow.bmp")
'or
imgBoat.Picture = LoadPicture("C:\Boats\minnow.bmp")
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
|
|
 |
|