Copyright © 1998-2010 MultiMedia Soft

How to use the control as a Picture control

Previous pageReturn to chapter overviewNext page

A Picture control (also known as PictureBox control) can display a graphic contained inside a file. It usually clips the graphic if the control isn't large enough to display the entire image.

With 3D Active Button Magic you can now add a graphical look to this kind of control. Not only that, but you can add animations as well!



First, set the Style property value to STYLE_PICTURE.  (For more details on button styles, see How to change the button style. For more details on setting button properties, see How to use the control in your projects)

For more information on animations, see How to display bitmaps and animations

First we add formatted text to the control at the top left and lower left positions.  (Details about adding texts to the control can be found inside the How to put text over the button section.)





When the control is used to display an animation, you manage the animation itself through the following set of methods:










An effective technique is to create a control whose background serves as the background for other 3D Active Button Magic controls.


The three Checkboxes you can see on the image above are nothing more than three instances of 3D Active Button Magic with the Style property set to STYLE_CHECKBOX_STD; the same result could be obtained setting the Style property to STYLE_RADIOBUTTON_STD.

In order to support this kind of transparency, the three checkboxes must know exactly which portion of the underlying picture they are currently covering: how can they know this information? That's not a problem: simply set their SurfaceTransparentFactor property to 1 (or higher value) and they will automatically render using the underlying picture portion.

IMPORTANT NOTE: when using this kind of transparency, avoid using picture files whose vertical and horizontal dimensions in pixels are far bigger that the control dimensions because this causes useless memory overhead that could slow down your application: always use pictures whose dimensions are very near to the Picture control dimensions.


Note that, starting from its version 8, 3D Active Button Magic acts as a real control container: simply set its Style property to one of the container-compatible styles (STYLE_LABEL, STYLE_FRAME and STYLE_PICTURE) and start inserting contained controls.