Copyright © 1998-2006 MultiMedia Soft 
Return to index  
 
How to display bitmaps and animations 
The simplest way to change the bitmaps and animations is to use, inside 3D Button Visual Editor, the Graphics tab. Additionally, you can set all of these settings at run-time by referencing the corresponding property. 
Supported picture formats are: 
  • BMP 
  • ICO 
  • JPG 
  • GIF 
  • PNG 
  • TIF 
  • Supported animation formats are: 
  • AVI 
  • GIF 
  • Note: The image below has hot links to each topic shown in the graphic. 
    -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  
     
     
    Item name
    Description
    Corresponding property
     
     
     
     
     
    Picture/animation for normal state
    The picture or animation file displayed on the control surface when the button is in Normal state.
     
    Picture/animation for pressed state
    The picture or animation file displayed on the control surface when the button is in Pressed state.
     
    Picture/animation for mouse over state
    The picture or animation file displayed on the control surface when the mouse is over the button area.
     
    Picture for disabled state
    The picture file displayed on the control surface when the button is in Disabled state.
     
    Move picture on press
    Determines the picture's behaviour when the button is pressed.
     
    Keep aspect ratio
    Determines if the aspect ratio should be kept for a picture whose size is bigger than the button size.
     
    Transparent factor
    Apply alpha channel transparency to the loaded pictures
     
    Color to render as transparent 
    Predefined color
    Sets the button's transparent color based on the PictureTranspColor property setting.
     
    Color to render as transparent 
    Picture Left Top pixel color
    Sets the top left pixel as the transparent color.
     
    Predefined transparent color
    The color that will be rendered as transparent when the PictureTranspMode is set to TRANSPMODE_USECOLOR
     
    "..." color editing button
    This button will open the color choice dialog box.
     
     
    Current picture left top pixel color
    The color found inside the current picture left top pixel color.
     
     
    Position
    Changes the picture or animation position over the control.
     
    Tile
    If the picture size is smaller than the button size the picture is tiled in order to completely cover the button surface.
     
    Stretch
    If the picture size is different from the button size the picture is stretched in order to fit exactly the button surface.
     
    Size to content
    Resizes the button to the same size of the picture. 
    This setting is available only when the Style property is set to STYLE_PICTURE.
     
    Offset X
    The horizontal offset to fine-tune the picture or animation position over the control.
     
    Offset Y
    The vertical offset to fine-tune the picture or animation position over the control.
     
    Browse button
    Browses the current PC folders for a picture.
     
     
    Delete button
    Deletes the current picture.
     
     
    Preview
    Preview of the loaded picture.
     
     
    At Run-time pictures and animations are loaded using the following methods: 
  • SetPictureFromHandle method to change one of the button pictures using a bitmap loaded in memory, identified by a bitmap handle.  
  • SetPictureFromMemory method to change one of the button pictures using a bitmap loaded in memory.  
  • SetPictureFromNet method to change one of the button pictures using a bitmap loaded from an Internet URL. 
  • SetAnimFromMemory method to change one of the button animations using an animation loaded in memory.  
  • SetAnimFromNet method to change one of the button animations using an animation loaded from the Internet.  
  •  
    The picture currently on the button can be hidden/displayed using the PictureVisible property. 
    If the Style property of the control is set to STYLE_PICTURE, you can manage a loaded animation through the following methods: 
  • AnimSetFramesRate: sets the new rate of the animation. 
  • AnimGetFramesRate: returns the current rate of the animation. 
  • AnimGetFramesCount: returns the number of frames inside the animation. 
  • AnimShowFrame: shows a specific frame contained inside the animation. 
  • AnimPause: pauses the animation playing 
  • AnimResume: restart the animation playing after a pause. 
  • AnimInvertPlay: inverts the order used to display the frames contained inside the animation. 
  •  
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    Copyright © 1998-2006 MultiMedia Soft 
    Return to index