borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Chat And Server)Next Topic (How to do acheive this ?) New Topic New Poll Post Reply
AndreaVB Forum : VB General : Coolbar Control
Poster Message
paulaa
Level: Professor


Registered: 10-08-2003
Posts: 97

icon Coolbar Control

I'm trying to create a form atm which uses the Coolbar control so that it's got a nice GUI.

The problem i'm having is:
i don't know how to add buttons etc to the coolbar.

HOW!??!?

thanks in advance.

____________________________
My Homepage

12-06-2004 at 12:15 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
Goran
Level: Moderator

Registered: 16-05-2002
Posts: 1681
icon Re: Coolbar Control

CoolBar control is a container control, able to host child controls. It consists of a collection of one or more resizable regions known as bands. Each band can host a single child control.

Using the CoolBar control is the same as using most other ActiveX controls, with the following exceptions.

Adding Controls to a CoolBar

The method for adding child controls to a CoolBar control is slightly different from that of adding controls to other containers. The control must first be associated with a Band object; there is a limit of one child control per band.

To add a control to a CoolBar: with the CoolBar control selected, select a control from the ToolBox and draw it on the CoolBar. Open the Property Page for the CoolBar and select the Bands tab. Use the Index buttons to select the index of the Band object on which you want the control to appear. Select the control from the Child list. The child control will then move and resize along with the Band object at run time.

If you simply add a control without associating it to a band, it will appear as a floating control over the CoolBar at run time. To avoid this situation, set the Visible property of the control to False.

You can have additional controls contained on a CoolBar and swap them in and out at run time using the Child property of the Band object.

Displaying Pictures on a CoolBar

The CoolBar control provides several properties that allow a great deal of flexibility in displaying pictures.

When you assign an image to the Picture property of the CoolBar control, that image will be tiled seamlessly across all bands, behind any child controls. By setting the FixedBackground property of a Band object to False, the Image will be tiled within that band.

The Band object has a Picture property that allows you to display a different background picture when the UseCoolbarPicture property is set to False. The Band object also has an Image property which can be used to display an icon to the right of the move handle.

The EmbossPicture property can be used to force an image to be displayed in two colors, similar to the Internet Explorer toolbar. The two colors to be used are determined by the EmbossHighlight and EmbossShadow properties.

When the EmbossPicture property is set to True, the image assigned to the Picture property will be dithered to the EmbossHighlight and EmbossShadow colors. The dithering process uses a fixed threshold to determine which colors in the image will be mapped to the highlight and shadow colors. Choose images with a good definition between dark and light colors for best results.

Using Other Controls with the CoolBar

There are certain limitations to the controls that can be used as child controls on a CoolBar control.

The CoolBar control can only host controls which expose a Window handle. Lightweight controls such as Label, Image, and Shape controls don't expose a Window handle and can't be used. Although you can place these controls on the CoolBar, they won't appear at run time and won't be listed in the Child list box on the Property Page.

Although each band in the CoolBar control can only host a single child control, you can get around this limitation by placing a container control (such as a PictureBox) on the band and hosting additional controls within that container. Keep in mind that if you do this, you will need to create the code to resize the nested controls in response to changes in the CoolBar.

Some controls may not behave as expected when contained within a CoolBar control. For example, a contained Toolbar control won’t paint properly when its Wrappable property is set to True and the CoolBar is resized. To avoid this problem, set the Wrappable property to False.

____________________________
If you find the answer helpful, please mark this topic as solved.

12-06-2004 at 01:13 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : VB General : Coolbar Control
Previous Topic (Chat And Server)Next Topic (How to do acheive this ?) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder