GDI+ Support

In order to support transparency, alpha-blending, and gradient coloring, ActiveBar 3.0 now employs GDI+. GDI+ is  the successor to the Windows® Graphics Device Interface (GDI) utilized in versions of Windows® prior to Windows® XP and Windows® 2003 Server. GDI+ provides functionality for two-dimensional vector graphics, imaging, and typography. 

You can utilize transparency, alpha-blending, and gradient coloring in your applications with ActiveBar 3.0. GDI+ uses 32-bits overall for graphics rendering and 8-bits per red, green, blue, and alpha channels respectively to indicate the transparency and color of an object. Like the levels of color in a color channel, the alpha channel represents 256 levels of transparency, from 0 (fully transparent) to 255 (fully opaque). 

In ActiveBar 3.0, selecting the ddTSOffice2003 or ddTSVisualStudio2005 constant values for the ToolbarStyle property enables the bands in your applications to posess the sleek gradient tone spectrum and rounded corners found in Office 2003 applications. The following example shows how you can use the ToolbarStyle property to add a distinct Visual Studio 2005 look and feel to a Menu Bar.

Private Sub Form_Load() With ActiveBar31 ' Sets the ActiveBar band style. .ToolbarStyle = ddTSVisualStudio2005 ' Aligns the ActiveBar control to form. .AlignToForm = True End With Dim standardBand As Band Set standardBand = ActiveBar31.Bands.Add("standardToolbar") With standardBand .Type = ddBTNormal .Flags = ddBFStretch End With End Sub

 

Using the FloatingToolbarFadeDelay property in your applications takes advantage of GDI+ alpha blending to control the opacity of a Floating Toolbar, allowing you to signify to your users the active and inactive states of a Floating Toolbar. The following example demonstrates how to use the FloatingToolbarFadeDelay property.

Private Sub Form_Load() With ActiveBar31 .AlignToForm = True .ToolbarStyle = ddTSOffice2003

' Sets the fade delay on the band when floating. ' The valid values for the FloatingingToolbarFadeDelay property are

' between 0 and 100000 milliseconds. .FloatingToolbarFadeDelay = 100000 End With Dim standardBand As Band Set standardBand = ActiveBar31.Bands.Add("standardToolbar") With standardBand .Type = ddBTNormal .Flags = ddBFStretch Or ddBFFloat Or ddBFDetach _ Or ddBFDockLeft Or ddBFDockRight Or ddBFDockTop Or ddBFDockBottom End With End Sub

 

The Band object Opacity property allows you to control the opacity of popup bands used in your applications. The following example demonstrates how to use the Opacity property.

Set popupBand = ActiveBar31.Bands.Add("fileMenu") popupBand.Type = ddBTPopup

' Sets Popup band opacity to %50. popupBand.Opacity = 50 Set buttonTool = ActiveBar31.Bands("standardToolbar").Tools.Add(101, "fileButton") buttonTool.Caption = "&File" buttonTool.SubBand = "fileMenu"

 

Microsoft Office 2003 and Visual Studio 2005 Look and Feel | Designing Bands

 

 


Copyright © 2006 Data Dynamics, Ltd. All Rights Reserved.