# SftButton/OCX 4.0 — API Reference > Complete A-Z reference for SftButton/OCX 4.0. The guide and feature documentation is in https://softelvdm.com/Vault/Softelvdm.com/llms/SftButton-OCX-4.0.txt Online documentation: https://softelvdm.com/Documentation/SftButton%20OCX%204%200 ## Objects *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy* All objects shown in this table are used with SftButton/OCX. These objects (and the respective interfaces) are used to access properties and methods exposed by each object. The [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton) represents the SftButton/OCX control. Through its properties, additional objects can be accessed. ![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/hier/sftbutton.gif) [![\](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/hier/events.gif)](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButtonEvents) [![\](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/hier/sftpictureobject.gif)](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject) [![\](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/hier/dataobject.gif)](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_DataObject) ![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/hier/vline2.gif)[![\](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/hier/dataobjectfiles.gif)](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_DataObjectFiles) | Object | Interface | Description | | --- | --- | --- | | SftButton | ISftButton | The SftButton/OCX control object. | | | ISftButtonVTable | The SftButton/OCX control object (used with the Direct property). | | SftButton Events | - | Events generated by a SftButton object. | | | | | | SftPictureObject | ISftPictureObject | Describes a graphic consisting of a bitmap, icon, metafile, [GDI+](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_gdiplus) image, ImageList, built-in image or [color sample](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_SetColorSample). | | DataObject | IVDMDataObject | Used to specify formats and data during [OLE drag & drop](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_oledragdrop) operations | | DataObjectFiles | IVDMDataObjectFiles | A collection of filenames used by the DataObject object (sftCFFiles format only) | ## SftButton Object (ISftButton Interface) *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton* The SftButton object is the main object describing the SftButton/OCX button control. Through its properties, additional [objects](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) can be accessed. | Property/Method | Description | | --- | --- | | [_Version](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton__Version) | Returns the product's exact version. | | [AboutBox](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_AboutBox) | Displays product, contact and copyright information. | | [AllowFocus](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_AllowFocus) | Defines whether the control can receive the input focus. | | [AutoSize](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_AutoSize) | Defines how the control is resized based on its contents. | | [AVIPlay](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_AVIPlay) | Defines the animation used as a button picture component. | | [AVIPlayResource](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_AVIPlayResource) | Defines the animation used as a button picture component. | | [AVITransparent](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_AVITransparent) | Defines whether animations are transparent. | | [BackColor](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColor) | Defines the control's background color. | | [BackColorEnd](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorEnd) | Defines the control's gradient fill background color (combined with [BackColorStart](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorStart)). | | [BackColorFocus](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorFocus) | Defines the control's background color when it has the input focus. | | [BackColorFocusEnd](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorFocusEnd) | Defines the control's gradient fill background color when it has the input focus (combined with [BackColorFocusStart](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorFocusStart)). | | BackColorFocusStart | Defines the control's gradient fill background color when it has the input focus (combined with BackColorFocusEnd). | | [BackColorHover](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorHover) | Defines the control's background color when the mouse cursor hovers over the control. | | [BackColorHoverEnd](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorHoverEnd) | Defines the control's gradient fill background color when the mouse cursor hovers over the control (combined with [BackColorHoverStart](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorHoverStart)). | | BackColorHoverStart | Defines the control's gradient fill background color when the mouse cursor hovers over the control (combined with BackColorHoverEnd). | | [BackColorOutside](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorOutside) | Defines the control's background color around the outer perimeter (using [Windows themes](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_themes) only). | | [BackColorPressed](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorPressed) | Defines the control's background color when pressed. | | BackColorStart | Defines the control's gradient fill background color (combined with BackColorEnd). | | [BorderAlways](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BorderAlways) | Defines whether the control border is always displayed. | | [BorderStyle](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BorderStyle) | Defines the control's border style. | | [Bounce](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Bounce) | Defines the control's visual response to a mouse click. | | [ButtonStyle](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ButtonStyle) | Defines the [button style](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_button). | | [CancelMode](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_CancelMode) | Cancels current processing modes. | | [ClickInterval](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ClickInterval) | Defines the auto-repeat interval between [Click](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_Click) events while the button is pressed. | | [ClickStyle](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ClickStyle) | Defines how the control responds to mouse clicks. | | [CustomCode](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_CustomCode) | Defines optional product customization. | | [DarkEdgeColor](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_DarkEdgeColor) | Defines the control's color for dark edges. | | [DarkMode](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_DarkMode) | Defines the [dark mode](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_darkmode) setting (off, on, or following the Windows setting). | | [DarkModeActive](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_DarkModeActive) | Returns whether dark mode is currently active. | | [Direct](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Direct) | Returns an ISftButtonVTable interface pointer. | | [DPI](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_DPI) | Returns the effective [DPI](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_dpi) for the control's current monitor. | | [DropDownDownClick](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_DropDownDownClick) | Defines whether the [drop down button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_dropdown) fires the [DropDownClick](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_DropDownClick) event when the mouse button is either pressed or released. | | [DropDownFollows](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_DropDownFollows) | Defines whether the drop down button follows button clicks. | | [DropDownPressed](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_DropDownPressed) | Defines whether the drop down button is pressed ([toggle button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_toggle) only). | | DropDownStyle | Defines the width of the drop down button. | | DropDownToggle | Defines whether the drop down button is a toggle button. | | [Enabled](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Enabled) | Defines whether the control responds to user-generated events. | | [FillOrientation](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_FillOrientation) | Defines the gradient fill orientation. | | [Follows](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Follows) | Defines whether the button follows drop down button clicks. | | [Font](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Font) | Defines the font used to display text. | | [ForeColor](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ForeColor) | Defines the control's text color. | | [ForeColorDownArrow](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ForeColorDownArrow) | Defines the foreground color for the drop down arrow. | | [ForeColorGrayed](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ForeColorGrayed) | Defines the control's text color when disabled. | | [ForeColorPressed](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ForeColorPressed) | Defines the control's text color when pressed. | | [GDIPlusSupport](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_GDIPlusSupport) | Returns whether [GDI+](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_gdiplus) support is available. | | [GetPosition](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_GetPosition) | Returns the position and dimensions of an area of the control. | | [GetPositionPix](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_GetPositionPix) | Returns the position and dimensions of an area of the control. | | [GetPositionV](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_GetPositionV) | Returns the position and dimensions of an area of the control. | | [HighContrastActive](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HighContrastActive) | Returns whether [high contrast](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_highcontrast) is currently active. | | [HighContrastMode](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HighContrastMode) | Defines the high contrast setting (off, on, or following the Windows setting). | | [HitTest](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HitTest) | Determines the area at a given location. | | [HitTestPix](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HitTestPix) | Determines the area at a given location. | | [HitTestV](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HitTestV) | Determines the area at a given location. | | [HoverOnControl](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HoverOnControl) | The mouse cursor is located on the control. | | [HoverOnImage1](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HoverOnImage1) | The mouse cursor is located on the first image of the control. | | [HoverOnImage2](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HoverOnImage2) | The mouse cursor is located on the second image of the control. | | [HoverOnText](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HoverOnText) | The mouse cursor is located on the text portion of the control. | | [HoverStyle](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HoverStyle) | Defines how images respond to mouse cursor positions. | | [hWnd](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_hWnd) | Returns the control's window handle. | | [Image1](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1) | Defines the first graphic. | | [Image1AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignHorz) | Defines the horizontal alignment of the first graphic. | | [Image1AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignVert) | Defines the vertical alignment of the first graphic. | | [Image1Disabled](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1Disabled) | Defines the first graphic when the button is disabled. | | [Image1Hover](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1Hover) | Defines the first graphic when the mouse cursor is located on the control. | | [Image1Pressed](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1Pressed) | Defines the first graphic when the button is pressed. | | [Image2](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2) | Defines the second graphic. | | [Image2AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignHorz) | Defines the horizontal alignment of the second graphic. | | [Image2AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignVert) | Defines the vertical alignment of the second graphic. | | [Image2Disabled](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2Disabled) | Defines the second graphic when the button is disabled. | | [Image2Hover](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2Hover) | Defines the second graphic when the mouse cursor is located on the control. | | [Image2Pressed](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2Pressed) | Defines the second graphic when the button is pressed. | | [ImageBackground](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ImageBackground) | Defines the [background image](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_backgroundimage). | | [ImageBackgroundDisabled](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ImageBackgroundDisabled) | Defines the background image when the button is disabled. | | [ImageBackgroundHover](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ImageBackgroundHover) | Defines the background image when the mouse cursor is located on the control. | | [ImageBackgroundPressed](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ImageBackgroundPressed) | Defines the background image when the button is pressed. | | [ImageScaling](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ImageScaling) | Defines whether the images supplied to the control are scaled to the current DPI. | | [License](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_License) | Returns the product's license number. | | [LightEdgeColor](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_LightEdgeColor) | Defines the control's color for light edges. | | [LoadPicture](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_LoadPicture) | Loads a picture from a file/URL. | | [MouseIcon](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_MouseIcon) | Defines a custom mouse icon. | | [MouseIconH](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_MouseIconH) | Defines a custom mouse icon. | | [MousePointer](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_MousePointer) | Defines the mouse pointer used. | | [OLEDrag](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_OLEDrag) | Initiates an [OLE drag & drop](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_oledragdrop) operation. | | [OLEDragMode](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_OLEDragMode) | Defines OLE drag support. | | [OLEDropMode](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_OLEDropMode) | Defines OLE drop support. | | [OptimalHeight](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_OptimalHeight) | Returns the control's optimal height. | | [OptimalWidth](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_OptimalWidth) | Returns the control's optimal width. | | [Orientation](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Orientation) | Defines the text and picture orientation. | | [Picture1](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Picture1) | Defines the first graphic. | | [Picture1AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Picture1AlignHorz) | Defines the horizontal alignment of the first graphic. | | [Picture1AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Picture1AlignVert) | Defines the vertical alignment of the first graphic. | | [Picture2](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Picture2) | Defines the second graphic. | | [Picture2AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Picture2AlignHorz) | Defines the horizontal alignment of the second graphic. | | [Picture2AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Picture2AlignVert) | Defines the vertical alignment of the second graphic. | | [Pressed](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Pressed) | Defines whether the button is pressed (toggle button only). | | [Refresh](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Refresh) | Repaints the entire control. | | [RightToLeft](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_RightToLeft) | Defines the display direction and visual appearance on a bidirectional system. | | [ShadowEdgeColor](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ShadowEdgeColor) | Defines the control's color for shadow edges. | | [ShowDropDown](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ShowDropDown) | Defines whether the drop down button is displayed. | | [ShowFocus](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ShowFocus) | Defines whether the control displays a focus rectangle when it has the input focus. | | [Text](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Text) | Defines the control's caption. | | [TextAlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_TextAlignHorz) | Defines the horizontal alignment of the text. | | [TextAlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_TextAlignVert) | Defines the vertical alignment of the text. | | [Toggle](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Toggle) | Defines whether the button is a toggle button. | | [UseThemes](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_UseThemes) | Defines whether Windows themes can be used. | | [Version](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Version) | Returns the product's exact version. | | [WebLicense](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_WebLicense) | Defines the license information for use on one web site. | | [WhiteEdgeColor](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_WhiteEdgeColor) | Defines the control's color for white edges. | | [Window](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Window) | Returns the control's window handle. | See Also Object Hierarchy ## DataObject Object (IVDMDataObject Interface) *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_DataObject* The DataObject object is used to define data formats and data during an [OLE drag & drop](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_oledragdrop) operation. | Property/Method | Description | | --- | --- | | [Clear](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/DataObject_Clear) | Clears all data and formats in a DataObject object. | | [Files](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/DataObject_Files) | A collection of filenames used by the sftCFFiles format. | | [GetData](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/DataObject_GetData) | Retrieves data of a specified format from a DataObject object. | | [GetFormat](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/DataObject_GetFormat) | Determines if a specified clipboard format is supported by the DataObject object. | | [SetData](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/DataObject_SetData) | Adds a supported format and possibly its data to a DataObject object. | See Also [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## DataObjectFiles Object (IVDMDataObjectFiles Interface) *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_DataObjectFiles* The DataObjectFiles object is used by a [DataObject](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_DataObject) object to define file names during an [OLE drag & drop](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_oledragdrop) operation. | Property/Method | Description | | --- | --- | | [Add](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/DataObjectFiles_Add) | Adds a filename to the [Files](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/DataObject_Files) collection of a DataObject object (sftCFFiles format only). | | [Clear](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/DataObjectFiles_Clear) | Clears all filenames stored in the Files collection of a DataObject object (sftCFFiles format only). | | [Count](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/DataObjectFiles_Count) | Returns the number of filenames in the Files collection of a DataObject object (sftCFFiles format only). | | [Item](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/DataObjectFiles_Item) | Returns a specific filename by index from the Files collection of a DataObject object (sftCFFiles format only). | | [Remove](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/DataObjectFiles_Remove) | Removes a filename from the Files collection of a DataObject object (sftCFFiles format only). | See Also [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## SftPictureObject Object (ISftPictureObject Interface) *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject* The SftPictureObject object describes a graphic consisting of a bitmap, icon, metafile, ImageList, [GDI+](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_gdiplus) image, built-in image or [color sample](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_SetColorSample). | Property/Method | Description | | --- | --- | | [ActualHeight](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_ActualHeight) | Returns the actual height of the image. | | [ActualWidth](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_ActualWidth) | Returns the actual width of the image. | | [Appearance](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Appearance) | Defines the image object using a built-in, special purpose image. | | [BitmapHandle](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_BitmapHandle) | Defines the image object using a bitmap handle. | | [Clear](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Clear) | Clears the image object. | | [FrameColor](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_FrameColor) | Defines the border color of the color sample. | | [GetColorSample](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_GetColorSample) | Retrieves the picture object attributes defined as a color sample. | | [GetImage](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_GetImage) | Retrieves the picture object attributes defined as a GDI+ image. | | [GetImageList](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_GetImageList) | Retrieves the picture object attributes defined as an ImageList image. | | [GetImageListH](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_GetImageListH) | Retrieves the picture object attributes defined as an ImageList image. | | [Height](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Height) | Defines the desired image height. | | [IconHandle](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_IconHandle) | Defines the image object using an icon handle. | | [Image](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Image) | Defines the image object using a GDI+ image. | | [IsEmpty](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_IsEmpty) | Returns whether the image object is empty. | | [LoadImage](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_LoadImage) | Loads an image from a file as a GDI+ image. | | [LoadImageFromHBITMAP](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_LoadImageFromHBITMAP) | Loads an image from a bitmap handle as a GDI+ image. | | [LoadImageFromResource](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_LoadImageFromResource) | Loads an image from a resource as a GDI+ image. | | [NETImageObject](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_NETImageObject) | Defines the image object using a .NET image object (IUnknown interface). | | [Picture](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Picture) | Defines the image object using an OLE Picture object (IPictureDisp interface). | | [PictureH](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_PictureH) | Defines the image object as an OLE Picture object (using a bitmap/icon handle). | | [SampleColor](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_SampleColor) | Defines the picture object as a color sample. | | SetColorSample | Defines the picture object as a color sample. | | [SetImage](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_SetImage) | Defines the picture object attributes defined as a GDI+ image. | | [SetImageList](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_SetImageList) | Defines the picture object as an ImageList image. | | [SetImageListH](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_SetImageListH) | Defines the picture object as an ImageList image. | | [Type](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Type) | Returns the defined image type. | | [Width](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Width) | Defines the desired image width. | See Also [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Events *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButtonEvents* The SftButton/OCX control generates these events: | Event | Description | | --- | --- | | [Click](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_Click) | The button is clicked. | | [DarkModeChange](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_DarkModeChange) | The effective [dark mode](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_darkmode) state has changed (Automatic dark mode only). | | [DblClick](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_DblClick) | The button is double-clicked. | | [DPIChanged](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_DPIChanged) | The control moved to a monitor with a different [DPI](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_dpi) (per-monitor-v2 hosts). | | [DropDownClick](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_DropDownClick) | The [drop down button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_dropdown) is clicked. | | [DropDownDblClick](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_DropDownDblClick) | The drop down button is double-clicked. | | [FocusIn](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_FocusIn) | The control receives the input focus. | | [FocusOut](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_FocusOut) | The control loses the input focus. | | [HighContrastChange](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_HighContrastChange) | The effective [high contrast](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_highcontrast) state has changed (Automatic high contrast only). | | [HoverOff](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_HoverOff) | The mouse cursor is moved outside the control. | | [HoverOn](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_HoverOn) | The mouse cursor is moved into the control. | | [KeyDown](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_KeyDown) | A key is pressed. | | [KeyPress](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_KeyPress) | An ANSI key is pressed. | | [KeyUp](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_KeyUp) | A key is released. | | [MouseDblClk](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_MouseDblClk) | A mouse button is double-clicked. | | [MouseDown](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_MouseDown) | A mouse button is pressed. | | [MouseMove](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_MouseMove) | The mouse is moved. | | [MouseUp](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_MouseUp) | A mouse button is released. | | [OLECompleteDrag](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_OLECompleteDrag) | Source object is notified that the [OLE drag & drop](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_oledragdrop) operation is ending. | | [OLEDragDrop](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_OLEDragDrop) | An object is dropped on the control. | | [OLEDragOver](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_OLEDragOver) | An object is dragged over the control. | | [OLEGiveFeedback](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_OLEGiveFeedback) | Source object can provide visual feedback during OLE drag & drop. | | [OLESetData](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_OLESetData) | Source object can provide data and/or data formats. | | [OLEStartDrag](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_OLEStartDrag) | Source object is starting an OLE drag & drop operation. | See Also [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## SftButtonAlignConstants *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonAlignConstants* Alignment constants. | Name | Value | Description | | --- | --- | --- | | alignSftButtonCenter | 0 | Center | | alignSftButtonLeft | 1 | Left | | alignSftButtonRight | 2 | Right | See Also [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## SftButtonAlignVertConstants *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonAlignVertConstants* Alignment constants. | Name | Value | Description | | --- | --- | --- | | alignSftButtonVCenter | 0 | Center | | alignSftButtonTop | 1 | Top | | alignSftButtonBottom | 2 | Bottom | See Also [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## SftButtonAreaConstants *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonAreaConstants* Area constants. | Name | Value | Description | | --- | --- | --- | | areaSftButtonButton | 0 | Button | | areaSftButtonDropDown | 1 | DropDown | See Also [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## SftButtonAutoSizeConstants *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonAutoSizeConstants* Auto-sizing constants. | Name | Value | Description | | --- | --- | --- | | autosizeSftButtonNone | 0 | None | | autosizeSftButtonTopLeft | 1 | Top/Left Corner | | autosizeSftButtonTopRight | 2 | Top/Right Corner | | autosizeSftButtonBottomLeft | 3 | Bottom/Left Corner | | autosizeSftButtonBottomRight | 4 | Bottom/Right Corner | | autosizeSftButtonTopCenter | 5 | Top Center | | autosizeSftButtonBottomCenter | 6 | Bottom Center | | autosizeSftButtonLeftCenter | 7 | Left Side Center | | autosizeSftButtonRightCenter | 8 | Right Side Center | | autosizeSftButtonCenter | 9 | Center | See Also [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## SftButtonBorderStyleConstants *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonBorderStyleConstants* Border style constants. | Name | Value | Description | | --- | --- | --- | | borderSftButtonThin | 0 | Thin | | borderSftButtonStandard | 1 | Standard | | borderSftButtonPixel1 | 2 | Pixel1 | See Also [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## SftButtonBounceStyleConstants *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonBounceStyleConstants* Button bounce style constants. | Name | Value | Description | | --- | --- | --- | | bounceSftButtonDefault | 0 | Default | | bounceSftButtonYes | 1 | Yes | | bounceSftButtonNo | 2 | No | See Also [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## SftButtonButtonConstants *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonButtonConstants* Mouse button constants. | Name | Value | Description | | --- | --- | --- | | constSftButtonLeftButton | 1 | Left button | | constSftButtonRightButton | 2 | Right button | | constSftButtonMiddleButton | 4 | Middle button | See Also [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## SftButtonClickStyleConstants *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonClickStyleConstants* Click style constants. | Name | Value | Description | | --- | --- | --- | | clickstyleSftButtonControl | 0 | Control | | clickstyleSftButtonExact | 1 | Exact (Pictures or Text) | | clickstyleSftButtonPictures | 2 | Pictures Only | | clickstyleSftButtonText | 3 | Text Only | See Also [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## SftButtonDarkModeConstants *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonDarkModeConstants* [Dark mode](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_darkmode) constants. | Name | Value | Description | | --- | --- | --- | | darkSftButtonOff | 0 | Off (always light) | | darkSftButtonOn | 1 | On (always dark) | | darkSftButtonAuto | 2 | Automatic (follow Windows setting) | See Also [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) | Dark Mode ## SftButtonDropDownStyleConstants *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonDropDownStyleConstants* [Drop down button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_dropdown) style constants. | Name | Value | Description | | --- | --- | --- | | dropdownstyleSftButtonStandard | 0 | Standard | | dropdownstyleSftButtonNarrow1 | 1 | Narrow1 | | dropdownstyleSftButtonNarrow2 | 2 | Narrow2 | | dropdownstyleSftButtonNarrow3 | 3 | Narrow3 | | dropdownstyleSftButtonWide1 | 4 | Wide1 | See Also [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## SftButtonHighContrastConstants *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonHighContrastConstants* [High contrast](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_highcontrast) constants. | Name | Value | Description | | --- | --- | --- | | highContrastSftButtonOff | 0 | Off (ignore Windows high contrast) | | highContrastSftButtonOn | 1 | On (always use the system palette) | | highContrastSftButtonAuto | 2 | Automatic (follow Windows setting) - the default | See Also [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) | High Contrast ## SftButtonHoverStyleConstants *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonHoverStyleConstants* Hover style constants. | Name | Value | Description | | --- | --- | --- | | hoverstyleSftButtonControl | 0 | Control | | hoverstyleSftButtonExact | 1 | Exact | See Also [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## SftButtonKeyConstants *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonKeyConstants* Key constants. | Name | Value | Description | | --- | --- | --- | | constSftButtonShiftMask | 1 | Shift | | constSftButtonCtrlMask | 2 | Control | | constSftButtonAltMask | 4 | Alt | See Also [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## SftButtonOLEDragModeConstants *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonOLEDragModeConstants* OLE drag mode constants (used with [OLEDragMode](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_OLEDragMode) property). | Name | Value | Description | | --- | --- | --- | | OLEDragSftButtonNone | 0 | None | | OLEDragSftButtonManual | 1 | Manual | See Also [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## SftButtonOLEDragOverConstants *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonOLEDragOverConstants* OLEDragOver event constants. | Name | Value | Description | | --- | --- | --- | | enterSftButton | 0 | Enter | | leaveSftButton | 1 | Leave | | overSftButton | 2 | Over | See Also [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## SftButtonOLEDropModeConstants *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonOLEDropModeConstants* OLE drop mode constants (used with [OLEDropMode](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_OLEDropMode) property). | Name | Value | Description | | --- | --- | --- | | OLEDropSftButtonNone | 0 | None | | OLEDropSftButtonManual | 1 | Manual | See Also [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## SftButtonOrientationConstants *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonOrientationConstants* Orientation constants. | Name | Value | Description | | --- | --- | --- | | orientationSftButtonHorizontal | 0 | Horizontal | | orientationSftButtonVertical | 1 | Vertical | See Also [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## SftButtonScalingConstants *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonScalingConstants* [DPI](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_dpi) scaling constants. | Name | Value | Description | | --- | --- | --- | | scalingSftButtonAsIs | 0 | As is (native size) | | scalingSftButtonStretch | 1 | Stretch (scale by DPI) - the default | See Also [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) | Per-Monitor DPI and Scaling ## SftButtonStyleConstants *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonStyleConstants* [Button style](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_button) constants. | Name | Value | Description | | --- | --- | --- | | styleSftButtonButton | 0 | Button | | styleSftButtonDropDown | 1 | Button with [Drop Down Button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_dropdown) | | styleSftButtonNone | 2 | No Button Background | See Also [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## SftButtonThemesConstants *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonThemesConstants* [Windows Themes](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_themes) constants. | Name | Value | Description | | --- | --- | --- | | themesSftButtonNo | 0 | No | | themesSftButtonYes | 1 | Yes | | themesSftButtonYesExcludeText | 2 | Yes (Exclude Text) | See Also [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## SftControlButtonConstants *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftControlButtonConstants* Mouse button constants. | Name | Value | Description | | --- | --- | --- | | constSftControlLeftButton | 1 | Left button | | constSftControlRightButton | 2 | Right button | | constSftControlMiddleButton | 4 | Middle button | See Also [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## SftControlKeyConstants *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftControlKeyConstants* Key constants. | Name | Value | Description | | --- | --- | --- | | constSftControlShiftMask | 1 | Shift | | constSftControlCtrlMask | 2 | Control | | constSftControlAltMask | 4 | Alt | See Also [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## SftControlOLEDragModeConstants *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftControlOLEDragModeConstants* OLE drag mode constants (used with OLEDragMode property). | Name | Value | Description | | --- | --- | --- | | OLEDragSftControlNone | 0 | None | | OLEDragSftControlManual | 1 | Manual | | OLEDragSftControlAutomatic | 2 | Automatic | See Also [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## SftControlOLEDragOverConstants *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftControlOLEDragOverConstants* OLEDragOver event constants. | Name | Value | Description | | --- | --- | --- | | enterSftControl | 0 | Enter | | leaveSftControl | 1 | Leave | | overSftControl | 2 | Over | See Also [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## SftControlOLEDropModeConstants *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftControlOLEDropModeConstants* OLE drop mode constants (used with OLEDropMode property). | Name | Value | Description | | --- | --- | --- | | OLEDropSftControlNone | 0 | None | | OLEDropSftControlManual | 1 | Manual | | OLEDropSftControlAutomatic | 2 | Automatic | See Also [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## SftMousePointerConstants *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftMousePointerConstants* Predefined mouse icon constants (used with MousePointer property). | Name | Value | Description | | --- | --- | --- | | sftDefault | 0 | (Default) | | sftArrow | 1 | Arrow | | sftCross | 2 | Cross | | sftIBeam | 3 | IBeam | | sftIcon | 4 | Icon (Obsolete) | | sftSize | 5 | Size | | sftSizeNESW | 6 | Size NW SW | | sftSizeNS | 7 | Size N S | | sftSizeNWSE | 8 | Size NW SE | | sftSizeWE | 9 | Size W E | | sftUpArrow | 10 | Up Arrow | | sftHourglass | 11 | Hourglass | | sftNoDrop | 12 | No Drop | | sftArrowHourglass | 13 | Arrow and Hourglass | | sftArrowQuestion | 14 | Arrow and Question Mark | | sftSizeAll | 15 | Size All | | sftCustom | 99 | Custom | See Also [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## SftOLEClipboardConstants *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftOLEClipboardConstants* [OLE drag & drop](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_oledragdrop) format (clipboard) constants. | Name | Value | Description | | --- | --- | --- | | sftCFText | 1 | Text | | sftCFBitmap | 2 | Bitmap | | sftCFMetafile | 3 | Metafile | | sftCFDIB | 8 | DIB | | sftCFPalette | 9 | Palette | | sftCFEMetafile | 14 | EnhMetafile | | sftCFFiles | 15 | Files | | sftCFRTF | -16639 | RTF | See Also [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## SftPictureImageConstants *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftPictureImageConstants* Image constants. | Name | Value | Description | | --- | --- | --- | | sftImageNone | -1 | None | | sftImageCheckboxNo | 0 | Checkbox - No | | sftImageCheckboxYes | 1 | Checkbox - Yes | | sftImageCheckboxUnknown | 2 | Checkbox - Unknown | | sftImageCheckboxNoDisabled | 3 | Checkbox - No, Disabled | | sftImageCheckboxYesDisabled | 4 | Checkbox - Yes, Disabled | | sftImageCheckboxUnknownDisabled | 5 | Checkbox - Unknown, Disabled | | sftImageRadioButtonNo | 6 | RadioButton - No | | sftImageRadioButtonYes | 7 | RadioButton - Yes | | sftImageRadioButtonNoDisabled | 8 | RadioButton - No, Disabled | | sftImageRadioButtonYesDisabled | 9 | RadioButton - Yes, Disabled | | sftImageUp | 10 | Up | | sftImageUpDisabled | 11 | Up, Disabled | | sftImageDown | 12 | Down | | sftImageDownDisabled | 13 | Down, Disabled | | sftImageSortAsc | 14 | Sort Ascending | | sftImageSortAscDisabled | 15 | Sort Ascending, Disabled | | sftImageSortDesc | 16 | Sort Descending | | sftImageSortDescDisabled | 17 | Sort Descending, Disabled | See Also [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## SftPictureTypeConstants *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftPictureTypeConstants* Image type constants. | Name | Value | Description | | --- | --- | --- | | sftTypeNone | 0 | None | | sftTypeIDispatch | 1 | IDispatch | | sftTypeBitmap | 2 | Bitmap | | sftTypeIcon | 3 | Icon | | sftTypeImageList | 4 | ImageList | | sftTypeColorSample | 5 | [Color Sample](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_SetColorSample) | | sftTypeBuiltin | 6 | Built-In Appearance | | sftTypeImageListH | 7 | ImageListH | | sftTypeGDIPlus | 8 | GDIPlus | | sftTypeNET | 9 | .NET | See Also [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## AboutBox Method, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_AboutBox* Displays product, contact and copyright information. ### Syntax | | | | --- | --- | | VB.NET | *object*.**AboutBox**() | | VB | *object*.**AboutBox** | | C#.NET | **void** *object*.**AboutBox**(); | | VC++ | **HRESULT** *object*->**AboutBox**(); | | C | **HRESULT** *object*->raw_**AboutBox**(); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). ### Comments The AboutBox method displays product, contact and copyright information. If you require [product support](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_contactsoftel), please have the licensing information available when contacting Softel vdm, Inc. The licensing information can also be found on the SftButton/OCX installation media. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## ActualHeight Property, SftPictureObject Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_ActualHeight* Returns the actual height of the image. ### Syntax Get | | | | --- | --- | | VB.NET | *HPix* = *object*.**ActualHeight** **As Integer** | | VB | *HPix* = *object*.**ActualHeight** **As Long** | | C#.NET | **int** *HPix* = *object*.**ActualHeight**; | | VC++ | **long** *HPix* = *object*->**ActualHeight**;
**long** *HPix* = *object*->Get**ActualHeight**(); | | C | **HRESULT** *object*->get_**ActualHeight**(**long*** *HPix*); | object A [SftPictureObject object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject). HPix Returns the actual height of the image. ### Comments The ActualHeight property returns the actual height of the image. The SftPictureObject.[Height](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Height) property returns the desired image height, last defined by the application. The desired height is only used for certain image types (see SftPictureObject.[Type](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Type)). See Also SftPictureObject Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## ActualWidth Property, SftPictureObject Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_ActualWidth* Returns the actual width of the image. ### Syntax Get | | | | --- | --- | | VB.NET | *WPix* = *object*.**ActualWidth** **As Integer** | | VB | *WPix* = *object*.**ActualWidth** **As Long** | | C#.NET | **int** *WPix* = *object*.**ActualWidth**; | | VC++ | **long** *WPix* = *object*->**ActualWidth**;
**long** *WPix* = *object*->Get**ActualWidth**(); | | C | **HRESULT** *object*->get_**ActualWidth**(**long*** *WPix*); | object A [SftPictureObject object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject). WPix Returns the actual width of the image. ### Comments The ActualWidth property returns the actual width of the image. The SftPictureObject.[Width](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Width) property returns the desired image width, last defined by the application. The desired width is only used for certain image types (see SftPictureObject.[Type](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Type)). See Also SftPictureObject Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## AllowFocus Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_AllowFocus* Defines whether the control can receive the input focus. ### Syntax Get | | | | --- | --- | | VB.NET | *Boolean* = *object*.**AllowFocus** **As Boolean** | | VB | *Boolean* = *object*.**AllowFocus** **As Boolean** | | C#.NET | **bool** *Boolean* = *object*.**AllowFocus**; | | VC++ | **VARIANT_BOOL** *Boolean* = *object*->**AllowFocus**;
**VARIANT_BOOL** *Boolean* = *object*->Get**AllowFocus**(); | | C | **HRESULT** *object*->get_**AllowFocus**(**VARIANT_BOOL*** *Boolean*); | Put | | | | --- | --- | | VB.NET | *object*.**AllowFocus** = *Boolean* **As Boolean** | | VB | *object*.**AllowFocus** = *Boolean* **As Boolean** | | C#.NET | **bool** *object*.**AllowFocus** = *Boolean*; | | VC++ | **VARIANT_BOOL** *object*->**AllowFocus** = *Boolean*;
**void** *object*->Put**AllowFocus**(**VARIANT_BOOL** *Boolean*); | | C | **HRESULT** *object*->put_**AllowFocus**(**VARIANT_BOOL** *Boolean*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Boolean Defines whether the control can receive the input focus. | Boolean | Description | | --- | --- | | True | The control will receive the input focus when the user clicks on it. | | False | The control will not receive the input focus when the user clicks on it. | ### Comments The AllowFocus property defines whether the control can receive the input focus. > Setting AllowFocus to False has no effect when used with .NET. The [ShowFocus](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ShowFocus) property can be used to suppress the display of the focus rectangle instead. By setting this property to False, the control will not receive the input focus, even when the user clicks on the control. This is usually used for controls on tool bars or other modeless windows. To make sure that the control cannot be reached using the keyboard, the control cannot be a valid tab stop. For example, when using Visual Basic, the TabStop property should be set to False. Visual C++ users should make sure the WS_TABSTOP window style is not defined. If the AllowFocus property is set to False, the control does not support [accelerator keys](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_accel). See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Appearance Property, SftPictureObject Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Appearance* Defines the image object using a built-in, special purpose image. ### Syntax Get | | | | --- | --- | | VB.NET | *Style* = *object*.**Appearance** **As [SftPictureImageConstants](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftPictureImageConstants)** | | VB | *Style* = *object*.**Appearance** **As SftPictureImageConstants** | | C#.NET | **SftPictureImageConstants** *Style* = *object*.**Appearance**; | | VC++ | **enum SftPictureImageConstants** *Style* = *object*->**Appearance**;
**enum SftPictureImageConstants** *Style* = *object*->Get**Appearance**(); | | C | **HRESULT** *object*->get_**Appearance**(**enum SftPictureImageConstants*** *Style*); | Put | | | | --- | --- | | VB.NET | *object*.**Appearance** = *Style* **As SftPictureImageConstants** | | VB | *object*.**Appearance** = *Style* **As SftPictureImageConstants** | | C#.NET | **SftPictureImageConstants** *object*.**Appearance** = *Style*; | | VC++ | **enum SftPictureImageConstants** *object*->**Appearance** = *Style*;
**void** *object*->Put**Appearance**(**enum SftPictureImageConstants** *Style*); | | C | **HRESULT** *object*->put_**Appearance**(**enum SftPictureImageConstants** *Style*); | object A [SftPictureObject object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject). Style Defines the image object using a built-in, special purpose image. | Name | Value | Description | | --- | --- | --- | | sftImageNone | -1 | None | | sftImageCheckboxNo | 0 | Checkbox - No | | sftImageCheckboxYes | 1 | Checkbox - Yes | | sftImageCheckboxUnknown | 2 | Checkbox - Unknown | | sftImageCheckboxNoDisabled | 3 | Checkbox - No, Disabled | | sftImageCheckboxYesDisabled | 4 | Checkbox - Yes, Disabled | | sftImageCheckboxUnknownDisabled | 5 | Checkbox - Unknown, Disabled | | sftImageRadioButtonNo | 6 | RadioButton - No | | sftImageRadioButtonYes | 7 | RadioButton - Yes | | sftImageRadioButtonNoDisabled | 8 | RadioButton - No, Disabled | | sftImageRadioButtonYesDisabled | 9 | RadioButton - Yes, Disabled | | sftImageUp | 10 | Up | | sftImageUpDisabled | 11 | Up, Disabled | | sftImageDown | 12 | Down | | sftImageDownDisabled | 13 | Down, Disabled | | sftImageSortAsc | 14 | Sort Ascending | | sftImageSortAscDisabled | 15 | Sort Ascending, Disabled | | sftImageSortDesc | 16 | Sort Descending | | sftImageSortDescDisabled | 17 | Sort Descending, Disabled | ### Comments The Appearance property defines the image object using a built-in, special purpose image. The SftPictureObject.[Type](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Type) property is set to sftTypeBuiltin. The SftPictureObject.[Height](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Height) and SftPictureObject.[Width](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Width) properties should be used to define the requested image size. The SftPictureObject.[ActualHeight](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_ActualHeight) and SftPictureObject.[ActualWidth](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_ActualWidth) properties reflect the image dimensions. See Also SftPictureObject Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## AutoSize Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_AutoSize* Defines how the control is resized based on its contents. ### Syntax Get | | | | --- | --- | | VB.NET | *Style* = *object*.**AutoSize** **As [SftButtonAutoSizeConstants](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonAutoSizeConstants)**
*Style* = *object*.**CtlAutoSize** **As SftButtonAutoSizeConstants** | | VB | *Style* = *object*.**AutoSize** **As SftButtonAutoSizeConstants** | | C#.NET | **SftButtonAutoSizeConstants** *Style* = *object*.**AutoSize**;
**SftButtonAutoSizeConstants** *Style* = *object*.**CtlAutoSize**; | | VC++ | **enum SftButtonAutoSizeConstants** *Style* = *object*->**AutoSize**;
**enum SftButtonAutoSizeConstants** *Style* = *object*->Get**AutoSize**(); | | C | **HRESULT** *object*->get_**AutoSize**(**enum SftButtonAutoSizeConstants*** *Style*); | Put | | | | --- | --- | | VB.NET | *object*.**AutoSize** = *Style* **As SftButtonAutoSizeConstants**
*object*.**CtlAutoSize** = *Style* **As SftButtonAutoSizeConstants** | | VB | *object*.**AutoSize** = *Style* **As SftButtonAutoSizeConstants** | | C#.NET | **SftButtonAutoSizeConstants** *object*.**AutoSize** = *Style*;
**SftButtonAutoSizeConstants** *object*.**CtlAutoSize** = *Style*; | | VC++ | **enum SftButtonAutoSizeConstants** *object*->**AutoSize** = *Style*;
**void** *object*->Put**AutoSize**(**enum SftButtonAutoSizeConstants** *Style*); | | C | **HRESULT** *object*->put_**AutoSize**(**enum SftButtonAutoSizeConstants** *Style*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Style Defines how the control is resized based on its contents. | Name | Value | Description | | --- | --- | --- | | autosizeSftButtonNone | 0 | None - The control is not automatically resized. | | autosizeSftButtonTopLeft | 1 | Top/Left Corner - The control is automatically resized. The top, left corner remains at the same position as the control is resized. | | autosizeSftButtonTopRight | 2 | Top/Right Corner - The control is automatically resized. The top, right corner remains at the same position as the control is resized. | | autosizeSftButtonBottomLeft | 3 | Bottom/Left Corner - The control is automatically resized. The bottom, left corner remains at the same position as the control is resized. | | autosizeSftButtonBottomRight | 4 | Bottom/Right Corner - The control is automatically resized. The bottom, right corner remains at the same position as the control is resized. | | autosizeSftButtonTopCenter | 5 | Top Center - The control is automatically resized. The top, center location remains at the same position as the control is resized. | | autosizeSftButtonBottomCenter | 6 | Bottom Center - The control is automatically resized. The bottom, center location remains at the same position as the control is resized. | | autosizeSftButtonLeftCenter | 7 | Left Side Center - The control is automatically resized. The left, center location remains at the same position as the control is resized. | | autosizeSftButtonRightCenter | 8 | Right Side Center - The control is automatically resized. The right, center location remains at the same position as the control is resized. | | autosizeSftButtonCenter | 9 | Center - The control is automatically resized. The center of the control remains at the same position as the control is resized. | ### Comments The AutoSize property defines how the control is resized based on its contents. If AutoSize is set to a value other than autosizeSftButtonNone, the control is automatically resized whenever its contents change, so all graphics and text components fit without being clipped. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## AVIPlay Method, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_AVIPlay* Defines the animation used as a button picture component. ### Syntax | | | | --- | --- | | VB.NET | *Success* = *object*.**AVIPlay**(**ByVal** *PictureNumber* **As Short**, **ByVal** *Filename* **As String**, **ByVal** *StartFrame* **As Integer**, **ByVal** *EndFrame* **As Integer**) **As Boolean** | | VB | *Success* = *object*.**AVIPlay**(**ByVal** *PictureNumber* **As Integer**, **ByVal** *Filename* **As String**, **ByVal** *StartFrame* **As Long**, **ByVal** *EndFrame* **As Long**) **As Boolean** | | C#.NET | **bool** *Success* = *object*.**AVIPlay**(**short** *PictureNumber*, **string** *Filename*, **int** *StartFrame*, **int** *EndFrame*); | | VC++ | **VARIANT_BOOL** *Success* = *object*->**AVIPlay**(**short** *PictureNumber*, **_bstr_t** *Filename*, **long** *StartFrame*, **long** *EndFrame*); | | C | **HRESULT** *object*->raw_**AVIPlay**(**short** *PictureNumber*, **BSTR** *Filename*, **long** *StartFrame*, **long** *EndFrame*, **VARIANT_BOOL*** *Success*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). PictureNumber Describes the graphic position to be used to display the animation. | Value | Description | | --- | --- | | 0 | The first graphic is used. The graphic defined using the [Image1](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1) property is replaced by the animation. | | 1 | The second graphic is used. The graphic defined using the [Image2](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2) property is replaced by the animation. | Filename Specifies the filename of the file containing the AVI clip to display. To load an animation from a resource instead, use the [AVIPlayResource](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_AVIPlayResource) method. StartFrame Specifies the first frame number of the animation with which the display starts. EndFrame Specifies the last frame number of the animation with which the display ends. If -1 is specified, the animation runs continuously. Success Returns True if the animation is successfully loaded from the specified file *Filename*, otherwise False is returned. ### Comments The AVIPlay method defines the animation used as a button picture component. The AVIPlay method loads the animation from a file. AVIPlayResource can be used to load it from a module's resources. Animations can only be defined at run-time. If a file is used to load an animation, this file must be distributed with an application. The [AVITransparent](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_AVITransparent) property can be used to define the transparency of the animation. The Windows Animation control is used (SysAnimate32) so only silent AVI clips without sound can be used. If an AVI clip contains sound, the AVIPlay and AVIPlayResource methods will fail and return False. The layout of the [button label](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_label) and the position and alignment of the picture components are defined using the [Orientation](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Orientation), [Image1AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignHorz), [Image1AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignVert), [Image2AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignHorz) and [Image2AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignVert) properties. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## AVIPlayResource Method, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_AVIPlayResource* Defines the animation used as a button picture component. ### Syntax | | | | --- | --- | | VB.NET | *Success* = *object*.**AVIPlayResource**(**ByVal** *PictureNumber* **As Short**, **ByVal** *ResourceHandle* **As Integer**, **ByVal** *ResourceNumber* **As Integer**, **ByVal** *StartFrame* **As Integer**, **ByVal** *EndFrame* **As Integer**) **As Boolean** | | VB | *Success* = *object*.**AVIPlayResource**(**ByVal** *PictureNumber* **As Integer**, **ByVal** *ResourceHandle* **As Long**, **ByVal** *ResourceNumber* **As Long**, **ByVal** *StartFrame* **As Long**, **ByVal** *EndFrame* **As Long**) **As Boolean** | | C#.NET | **bool** *Success* = *object*.**AVIPlayResource**(**short** *PictureNumber*, **int** *ResourceHandle*, **int** *ResourceNumber*, **int** *StartFrame*, **int** *EndFrame*); | | VC++ | **VARIANT_BOOL** *Success* = *object*->**AVIPlayResource**(**short** *PictureNumber*, **long** *ResourceHandle*, **long** *ResourceNumber*, **long** *StartFrame*, **long** *EndFrame*); | | C | **HRESULT** *object*->raw_**AVIPlayResource**(**short** *PictureNumber*, **long** *ResourceHandle*, **long** *ResourceNumber*, **long** *StartFrame*, **long** *EndFrame*, **VARIANT_BOOL*** *Success*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). PictureNumber Describes the graphic position to be used to display the animation. | Value | Description | | --- | --- | | 0 | The first graphic is used. The graphic defined using the [Image1](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1) property is replaced by the animation. | | 1 | The second graphic is used. The graphic defined using the [Image2](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2) property is replaced by the animation. | ResourceHandle The module handle of the module containing the AVI clip resource *ResourceNumber. *To load an animation from a file instead, use the [AVIPlay](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_AVIPlay) method. ResourceNumber The resource number of the resource to load as button animation*. *To load an animation from a file instead, use the AVIPlay method. StartFrame Specifies the first frame number of the animation with which the display starts. EndFrame Specifies the last frame number of the animation with which the display ends. If -1 is specified, the animation runs continuously. Success Returns True if the animation is successfully loaded from the specified file *Filename*, otherwise False is returned. ### Comments The AVIPlayResource method defines the animation used as a button picture component. The AVIPlayResource method loads the animation from a module's resources. AVIPlay can be used to load it from a file. Animations can only be defined at run-time. If a file is used to load an animation, this file must be distributed with an application. The [AVITransparent](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_AVITransparent) property can be used to define the transparency of the animation. The Windows Animation control is used (SysAnimate32) so only silent AVI clips without sound can be used. If an AVI clip contains sound, the AVIPlay and AVIPlayResource methods will fail and return False. The layout of the [button label](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_label) and the position and alignment of the picture components are defined using the [Orientation](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Orientation), [Image1AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignHorz), [Image1AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignVert), [Image2AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignHorz) and [Image2AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignVert) properties. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## AVITransparent Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_AVITransparent* Defines whether animations are transparent. ### Syntax Get | | | | --- | --- | | VB.NET | *Boolean* = *object*.**AVITransparent** **As Boolean** | | VB | *Boolean* = *object*.**AVITransparent** **As Boolean** | | C#.NET | **bool** *Boolean* = *object*.**AVITransparent**; | | VC++ | **VARIANT_BOOL** *Boolean* = *object*->**AVITransparent**;
**VARIANT_BOOL** *Boolean* = *object*->Get**AVITransparent**(); | | C | **HRESULT** *object*->get_**AVITransparent**(**VARIANT_BOOL*** *Boolean*); | Put | | | | --- | --- | | VB.NET | *object*.**AVITransparent** = *Boolean* **As Boolean** | | VB | *object*.**AVITransparent** = *Boolean* **As Boolean** | | C#.NET | **bool** *object*.**AVITransparent** = *Boolean*; | | VC++ | **VARIANT_BOOL** *object*->**AVITransparent** = *Boolean*;
**void** *object*->Put**AVITransparent**(**VARIANT_BOOL** *Boolean*); | | C | **HRESULT** *object*->put_**AVITransparent**(**VARIANT_BOOL** *Boolean*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Boolean Defines whether animations are transparent. | Boolean | Description | | --- | --- | | True | Animations are transparent. The top, left pixel of the first frame of the animation defines the color which will be replaced by the actual background color (BackColor). Because the color is replaced by the defined background color, animations on gradient backgrounds (or themed background) will not be truly transparent. | | False | Animations are not transparent. | ### Comments The AVITransparent property defines whether animations are transparent. Transparency of animations is limited to the color defined using the [BackColor](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColor) property, the [BackColorPressed](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorPressed) property is not used for transparency. If gradient backgrounds or [Windows themes](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_themes) are used, animation transparency uses the defined background color BackColor which will not match the possibly textured background. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## BackColor Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColor* Defines the control's background color. ### Syntax Get | | | | --- | --- | | VB.NET | *Clr* = *object*.**BackColor** **As System.Drawing.Color[![\](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_dotnet)**
*Clr* = *object*.**CtlBackColor** **As System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** | | VB | *Clr* = *object*.**BackColor** **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *Clr* = *object*.**BackColor**;
**System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *Clr* = *object*.**CtlBackColor**; | | VC++ | **OLE_COLOR** *Clr* = *object*->**BackColor**;
**OLE_COLOR** *Clr* = *object*->Get**BackColor**(); | | C | **HRESULT** *object*->get_**BackColor**(**OLE_COLOR*** *Clr*); | Put | | | | --- | --- | | VB.NET | *object*.**BackColor** = *Clr* **As System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)**
*object*.**CtlBackColor** = *Clr* **As System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** | | VB | *object*.**BackColor** = *Clr* **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *object*.**BackColor** = *Clr*;
**System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *object*.**CtlBackColor** = *Clr*; | | VC++ | **OLE_COLOR** *object*->**BackColor** = *Clr*;
**void** *object*->Put**BackColor**(**OLE_COLOR** *Clr*); | | C | **HRESULT** *object*->put_**BackColor**(**OLE_COLOR** *Clr*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Clr Defines the control's background color. For information about color properties, please visit the applicable section "[Using SftButton/OCX with ...](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using)". ### Comments The BackColor property defines the control's background color. > This property has no effect if [Windows themes](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_themes) are used. The defined color is used for the entire control. If the button control has the input focus, the [BackColorFocus](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorFocus) color is used instead. If the button or [drop down button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_dropdown) is pressed, the [BackColorPressed](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorPressed) color is used instead for the pressed portion. If the mouse hovers over the control, the color defined using [BackColorHover](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorHover) is used. If both [BackColorStart](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorStart) and [BackColorEnd](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorEnd) define valid starting and ending colors, these take precedence and the BackColor property has no effect. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## BackColorEnd Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorEnd* Defines the control's gradient fill background color (combined with [BackColorStart](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorStart)). ### Syntax Get | | | | --- | --- | | VB.NET | *Clr* = *object*.**BackColorEnd** **As System.Drawing.Color[![\](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_dotnet)** | | VB | *Clr* = *object*.**BackColorEnd** **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *Clr* = *object*.**BackColorEnd**; | | VC++ | **OLE_COLOR** *Clr* = *object*->**BackColorEnd**;
**OLE_COLOR** *Clr* = *object*->Get**BackColorEnd**(); | | C | **HRESULT** *object*->get_**BackColorEnd**(**OLE_COLOR*** *Clr*); | Put | | | | --- | --- | | VB.NET | *object*.**BackColorEnd** = *Clr* **As System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** | | VB | *object*.**BackColorEnd** = *Clr* **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *object*.**BackColorEnd** = *Clr*; | | VC++ | **OLE_COLOR** *object*->**BackColorEnd** = *Clr*;
**void** *object*->Put**BackColorEnd**(**OLE_COLOR** *Clr*); | | C | **HRESULT** *object*->put_**BackColorEnd**(**OLE_COLOR** *Clr*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Clr Defines the control's gradient fill background color (combined with BackColorStart). For information about color properties, please visit the applicable section "[Using SftButton/OCX with ...](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using)". ### Comments The BackColorEnd property defines the control's gradient fill background color (combined with BackColorStart). > This property has no effect if [Windows themes](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_themes) are used. The [FillOrientation](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_FillOrientation) defines the gradient fill orientation. The BackColorEnd property is the ending color value (right or bottom). If both BackColorStart and BackColorEnd define valid starting and ending colors, these take precedence and the [BackColor](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColor) property has no effect. On display devices that do not support gradient fills or if fewer than 65K colors are available, the BackColor property is used instead. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## BackColorFocus Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorFocus* Defines the control's background color when it has the input focus. ### Syntax Get | | | | --- | --- | | VB.NET | *Clr* = *object*.**BackColorFocus** **As System.Drawing.Color[![\](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_dotnet)** | | VB | *Clr* = *object*.**BackColorFocus** **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *Clr* = *object*.**BackColorFocus**; | | VC++ | **OLE_COLOR** *Clr* = *object*->**BackColorFocus**;
**OLE_COLOR** *Clr* = *object*->Get**BackColorFocus**(); | | C | **HRESULT** *object*->get_**BackColorFocus**(**OLE_COLOR*** *Clr*); | Put | | | | --- | --- | | VB.NET | *object*.**BackColorFocus** = *Clr* **As System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** | | VB | *object*.**BackColorFocus** = *Clr* **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *object*.**BackColorFocus** = *Clr*; | | VC++ | **OLE_COLOR** *object*->**BackColorFocus** = *Clr*;
**void** *object*->Put**BackColorFocus**(**OLE_COLOR** *Clr*); | | C | **HRESULT** *object*->put_**BackColorFocus**(**OLE_COLOR** *Clr*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Clr Defines the control's background color when it has the input focus. For information about color properties, please visit the applicable section "[Using SftButton/OCX with ...](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using)". ### Comments The BackColorFocus property defines the control's background color when it has the input focus. > This property has no effect if [Windows themes](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_themes) are used. If both [BackColorFocusStart](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorFocusStart) and [BackColorFocusEnd](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorFocusEnd) define valid starting and ending colors, these take precedence and the BackColorFocus property has no effect. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## BackColorFocusEnd Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorFocusEnd* Defines the control's gradient fill background color when it has the input focus (combined with [BackColorFocusStart](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorFocusStart)). ### Syntax Get | | | | --- | --- | | VB.NET | *Clr* = *object*.**BackColorFocusEnd** **As System.Drawing.Color[![\](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_dotnet)** | | VB | *Clr* = *object*.**BackColorFocusEnd** **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *Clr* = *object*.**BackColorFocusEnd**; | | VC++ | **OLE_COLOR** *Clr* = *object*->**BackColorFocusEnd**;
**OLE_COLOR** *Clr* = *object*->Get**BackColorFocusEnd**(); | | C | **HRESULT** *object*->get_**BackColorFocusEnd**(**OLE_COLOR*** *Clr*); | Put | | | | --- | --- | | VB.NET | *object*.**BackColorFocusEnd** = *Clr* **As System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** | | VB | *object*.**BackColorFocusEnd** = *Clr* **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *object*.**BackColorFocusEnd** = *Clr*; | | VC++ | **OLE_COLOR** *object*->**BackColorFocusEnd** = *Clr*;
**void** *object*->Put**BackColorFocusEnd**(**OLE_COLOR** *Clr*); | | C | **HRESULT** *object*->put_**BackColorFocusEnd**(**OLE_COLOR** *Clr*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Clr Defines the control's gradient fill background color when it has the input focus (combined with BackColorFocusStart). For information about color properties, please visit the applicable section "[Using SftButton/OCX with ...](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using)". ### Comments The BackColorFocusEnd property defines the control's gradient fill background color when it has the input focus (combined with BackColorFocusStart). > This property has no effect if [Windows themes](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_themes) are used. The [FillOrientation](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_FillOrientation) defines the gradient fill orientation. The BackColorFocusEnd property is the ending color value (right or bottom). If both BackColorFocusStart and BackColorFocusEnd define valid starting and ending colors, these take precedence and the [BackColorFocus](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorFocus) property has no effect. On display devices that do not support gradient fills or if fewer than 65K colors are available, the BackColorFocus property is used instead. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## BackColorFocusStart Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorFocusStart* Defines the control's gradient fill background color when it has the input focus (combined with [BackColorFocusEnd](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorFocusEnd)). ### Syntax Get | | | | --- | --- | | VB.NET | *Clr* = *object*.**BackColorFocusStart** **As System.Drawing.Color[![\](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_dotnet)** | | VB | *Clr* = *object*.**BackColorFocusStart** **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *Clr* = *object*.**BackColorFocusStart**; | | VC++ | **OLE_COLOR** *Clr* = *object*->**BackColorFocusStart**;
**OLE_COLOR** *Clr* = *object*->Get**BackColorFocusStart**(); | | C | **HRESULT** *object*->get_**BackColorFocusStart**(**OLE_COLOR*** *Clr*); | Put | | | | --- | --- | | VB.NET | *object*.**BackColorFocusStart** = *Clr* **As System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** | | VB | *object*.**BackColorFocusStart** = *Clr* **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *object*.**BackColorFocusStart** = *Clr*; | | VC++ | **OLE_COLOR** *object*->**BackColorFocusStart** = *Clr*;
**void** *object*->Put**BackColorFocusStart**(**OLE_COLOR** *Clr*); | | C | **HRESULT** *object*->put_**BackColorFocusStart**(**OLE_COLOR** *Clr*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Clr Defines the control's gradient fill background color when it has the input focus (combined with BackColorFocusEnd). For information about color properties, please visit the applicable section "[Using SftButton/OCX with ...](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using)". ### Comments The BackColorFocusStart property defines the control's gradient fill background color when it has the input focus (combined with BackColorFocusEnd). > This property has no effect if [Windows themes](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_themes) are used. The [FillOrientation](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_FillOrientation) defines the gradient fill orientation. The BackColorFocusEnd property is the ending color value (right or bottom). If both BackColorFocusStart and BackColorFocusEnd define valid starting and ending colors, these take precedence and the [BackColorFocus](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorFocus) property has no effect. On display devices that do not support gradient fills or if fewer than 65K colors are available, the BackColorFocus property is used instead. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## BackColorHover Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorHover* Defines the control's background color when the mouse cursor hovers over the control. ### Syntax Get | | | | --- | --- | | VB.NET | *Clr* = *object*.**BackColorHover** **As System.Drawing.Color[![\](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_dotnet)** | | VB | *Clr* = *object*.**BackColorHover** **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *Clr* = *object*.**BackColorHover**; | | VC++ | **OLE_COLOR** *Clr* = *object*->**BackColorHover**;
**OLE_COLOR** *Clr* = *object*->Get**BackColorHover**(); | | C | **HRESULT** *object*->get_**BackColorHover**(**OLE_COLOR*** *Clr*); | Put | | | | --- | --- | | VB.NET | *object*.**BackColorHover** = *Clr* **As System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** | | VB | *object*.**BackColorHover** = *Clr* **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *object*.**BackColorHover** = *Clr*; | | VC++ | **OLE_COLOR** *object*->**BackColorHover** = *Clr*;
**void** *object*->Put**BackColorHover**(**OLE_COLOR** *Clr*); | | C | **HRESULT** *object*->put_**BackColorHover**(**OLE_COLOR** *Clr*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Clr Defines the control's background color when the mouse cursor hovers over the control. For information about color properties, please visit the applicable section "[Using SftButton/OCX with ...](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using)". ### Comments The BackColorHover property defines the control's background color when the mouse cursor hovers over the control. > This property has no effect if [Windows themes](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_themes) are used. If both [BackColorHoverStart](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorHoverStart) and [BackColorHoverEnd](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorHoverEnd) define valid starting and ending colors, these take precedence and the BackColorHover property has no effect. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## BackColorHoverEnd Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorHoverEnd* Defines the control's gradient fill background color when the mouse cursor hovers over the control (combined with [BackColorHoverStart](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorHoverStart)). ### Syntax Get | | | | --- | --- | | VB.NET | *Clr* = *object*.**BackColorHoverEnd** **As System.Drawing.Color[![\](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_dotnet)** | | VB | *Clr* = *object*.**BackColorHoverEnd** **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *Clr* = *object*.**BackColorHoverEnd**; | | VC++ | **OLE_COLOR** *Clr* = *object*->**BackColorHoverEnd**;
**OLE_COLOR** *Clr* = *object*->Get**BackColorHoverEnd**(); | | C | **HRESULT** *object*->get_**BackColorHoverEnd**(**OLE_COLOR*** *Clr*); | Put | | | | --- | --- | | VB.NET | *object*.**BackColorHoverEnd** = *Clr* **As System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** | | VB | *object*.**BackColorHoverEnd** = *Clr* **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *object*.**BackColorHoverEnd** = *Clr*; | | VC++ | **OLE_COLOR** *object*->**BackColorHoverEnd** = *Clr*;
**void** *object*->Put**BackColorHoverEnd**(**OLE_COLOR** *Clr*); | | C | **HRESULT** *object*->put_**BackColorHoverEnd**(**OLE_COLOR** *Clr*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Clr Defines the control's gradient fill background color when the mouse cursor hovers over the control (combined with BackColorHoverStart). For information about color properties, please visit the applicable section "[Using SftButton/OCX with ...](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using)". ### Comments The BackColorHoverEnd property defines the control's gradient fill background color when the mouse cursor hovers over the control (combined with BackColorHoverStart). > This property has no effect if [Windows themes](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_themes) are used. The [FillOrientation](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_FillOrientation) defines the gradient fill orientation. The BackColorHoverEnd property is the ending color value (right or bottom). If both BackColorHoverStart and BackColorHoverEnd define valid starting and ending colors, these take precedence and the [BackColorHover](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorHover) property has no effect. On display devices that do not support gradient fills or if fewer than 65K colors are available, the BackColorHover property is used instead. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## BackColorHoverStart Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorHoverStart* Defines the control's gradient fill background color when the mouse cursor hovers over the control (combined with [BackColorHoverEnd](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorHoverEnd)). ### Syntax Get | | | | --- | --- | | VB.NET | *Clr* = *object*.**BackColorHoverStart** **As System.Drawing.Color[![\](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_dotnet)** | | VB | *Clr* = *object*.**BackColorHoverStart** **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *Clr* = *object*.**BackColorHoverStart**; | | VC++ | **OLE_COLOR** *Clr* = *object*->**BackColorHoverStart**;
**OLE_COLOR** *Clr* = *object*->Get**BackColorHoverStart**(); | | C | **HRESULT** *object*->get_**BackColorHoverStart**(**OLE_COLOR*** *Clr*); | Put | | | | --- | --- | | VB.NET | *object*.**BackColorHoverStart** = *Clr* **As System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** | | VB | *object*.**BackColorHoverStart** = *Clr* **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *object*.**BackColorHoverStart** = *Clr*; | | VC++ | **OLE_COLOR** *object*->**BackColorHoverStart** = *Clr*;
**void** *object*->Put**BackColorHoverStart**(**OLE_COLOR** *Clr*); | | C | **HRESULT** *object*->put_**BackColorHoverStart**(**OLE_COLOR** *Clr*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Clr Defines the control's gradient fill background color when the mouse cursor hovers over the control (combined with BackColorHoverEnd). For information about color properties, please visit the applicable section "[Using SftButton/OCX with ...](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using)". ### Comments The BackColorHoverStart property defines the control's gradient fill background color when the mouse cursor hovers over the control (combined with BackColorHoverEnd). > This property has no effect if [Windows themes](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_themes) are used. The [FillOrientation](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_FillOrientation) defines the gradient fill orientation. The BackColorHoverEnd property is the ending color value (right or bottom). If both BackColorHoverStart and BackColorHoverEnd define valid starting and ending colors, these take precedence and the [BackColorHover](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorHover) property has no effect. On display devices that do not support gradient fills or if fewer than 65K colors are available, the BackColorHover property is used instead. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## BackColorOutside Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorOutside* Defines the control's background color around the outer perimeter (using [Windows themes](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_themes) only). ### Syntax Get | | | | --- | --- | | VB.NET | *Clr* = *object*.**BackColorOutside** **As System.Drawing.Color[![\](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_dotnet)** | | VB | *Clr* = *object*.**BackColorOutside** **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *Clr* = *object*.**BackColorOutside**; | | VC++ | **OLE_COLOR** *Clr* = *object*->**BackColorOutside**;
**OLE_COLOR** *Clr* = *object*->Get**BackColorOutside**(); | | C | **HRESULT** *object*->get_**BackColorOutside**(**OLE_COLOR*** *Clr*); | Put | | | | --- | --- | | VB.NET | *object*.**BackColorOutside** = *Clr* **As System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** | | VB | *object*.**BackColorOutside** = *Clr* **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *object*.**BackColorOutside** = *Clr*; | | VC++ | **OLE_COLOR** *object*->**BackColorOutside** = *Clr*;
**void** *object*->Put**BackColorOutside**(**OLE_COLOR** *Clr*); | | C | **HRESULT** *object*->put_**BackColorOutside**(**OLE_COLOR** *Clr*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Clr Defines the control's background color around the outer perimeter (using Windows themes only). ### Comments The BackColorOutside property defines the control's background color around the outer perimeter (using Windows themes only). See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## BackColorPressed Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorPressed* Defines the control's background color when pressed. ### Syntax Get | | | | --- | --- | | VB.NET | *Clr* = *object*.**BackColorPressed** **As System.Drawing.Color[![\](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_dotnet)** | | VB | *Clr* = *object*.**BackColorPressed** **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *Clr* = *object*.**BackColorPressed**; | | VC++ | **OLE_COLOR** *Clr* = *object*->**BackColorPressed**;
**OLE_COLOR** *Clr* = *object*->Get**BackColorPressed**(); | | C | **HRESULT** *object*->get_**BackColorPressed**(**OLE_COLOR*** *Clr*); | Put | | | | --- | --- | | VB.NET | *object*.**BackColorPressed** = *Clr* **As System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** | | VB | *object*.**BackColorPressed** = *Clr* **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *object*.**BackColorPressed** = *Clr*; | | VC++ | **OLE_COLOR** *object*->**BackColorPressed** = *Clr*;
**void** *object*->Put**BackColorPressed**(**OLE_COLOR** *Clr*); | | C | **HRESULT** *object*->put_**BackColorPressed**(**OLE_COLOR** *Clr*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Clr Defines the control's background color when pressed. For information about color properties, please visit the applicable section "[Using SftButton/OCX with ...](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using)". ### Comments The BackColorPressed property defines the control's background color when pressed. > This property has no effect if [Windows themes](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_themes) are used. The BackColorPressed property defines the control's background color of the button or [drop down button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_dropdown) when pressed. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## BackColorStart Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorStart* Defines the control's gradient fill background color (combined with [BackColorEnd](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorEnd)). ### Syntax Get | | | | --- | --- | | VB.NET | *Clr* = *object*.**BackColorStart** **As System.Drawing.Color[![\](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_dotnet)** | | VB | *Clr* = *object*.**BackColorStart** **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *Clr* = *object*.**BackColorStart**; | | VC++ | **OLE_COLOR** *Clr* = *object*->**BackColorStart**;
**OLE_COLOR** *Clr* = *object*->Get**BackColorStart**(); | | C | **HRESULT** *object*->get_**BackColorStart**(**OLE_COLOR*** *Clr*); | Put | | | | --- | --- | | VB.NET | *object*.**BackColorStart** = *Clr* **As System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** | | VB | *object*.**BackColorStart** = *Clr* **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *object*.**BackColorStart** = *Clr*; | | VC++ | **OLE_COLOR** *object*->**BackColorStart** = *Clr*;
**void** *object*->Put**BackColorStart**(**OLE_COLOR** *Clr*); | | C | **HRESULT** *object*->put_**BackColorStart**(**OLE_COLOR** *Clr*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Clr Defines the control's gradient fill background color (combined with BackColorEnd). For information about color properties, please visit the applicable section "[Using SftButton/OCX with ...](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using)". ### Comments The BackColorStart property defines the control's gradient fill background color (combined with BackColorEnd). > This property has no effect if [Windows themes](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_themes) are used. The [FillOrientation](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_FillOrientation) defines the gradient fill orientation. The [BackColorStart](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColorStart) property is the starting color value (left or top). If both BackColorStart and BackColorEnd define valid starting and ending colors, these take precedence and the BackColor property has no effect. On display devices that do not support gradient fills or if fewer than 65K colors are available, the [BackColor](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BackColor) property is used instead. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## BitmapHandle Property, SftPictureObject Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_BitmapHandle* Defines the image object using a bitmap handle. ### Syntax Get | | | | --- | --- | | VB.NET | *hBitmap* = *object*.**BitmapHandle** **As Integer** | | VB | *hBitmap* = *object*.**BitmapHandle** **As OLE_HANDLE** | | C#.NET | **int** *hBitmap* = *object*.**BitmapHandle**; | | VC++ | **OLE_HANDLE** *hBitmap* = *object*->**BitmapHandle**;
**OLE_HANDLE** *hBitmap* = *object*->Get**BitmapHandle**(); | | C | **HRESULT** *object*->get_**BitmapHandle**(**OLE_HANDLE*** *hBitmap*); | Put | | | | --- | --- | | VB.NET | *object*.**BitmapHandle** = *hBitmap* **As Integer** | | VB | *object*.**BitmapHandle** = *hBitmap* **As OLE_HANDLE** | | C#.NET | **int** *object*.**BitmapHandle** = *hBitmap*; | | VC++ | **OLE_HANDLE** *object*->**BitmapHandle** = *hBitmap*;
**void** *object*->Put**BitmapHandle**(**OLE_HANDLE** *hBitmap*); | | C | **HRESULT** *object*->put_**BitmapHandle**(**OLE_HANDLE** *hBitmap*); | object A [SftPictureObject object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject). hBitmap Defines the image object using a bitmap handle. The bitmap handle can be NULL, in which case the SftPictureObject object is cleared. ### Comments The BitmapHandle property defines the image object using a bitmap handle. Typically, .NET applications use the [NETImageObject](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_NETImageObject) property to define an image, C and C++ applications use BitmapHandle or [Image](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Image), VB6 and other COM applications use the [Picture](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Picture) property. The SftPictureObject.[Type](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Type) property is set to sftTypeBitmap. The SftPictureObject.[ActualHeight](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_ActualHeight) and SftPictureObject.[ActualWidth](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_ActualWidth) properties reflect the image size. See Also SftPictureObject Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## BorderAlways Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BorderAlways* Defines whether the control border is always displayed. ### Syntax Get | | | | --- | --- | | VB.NET | *Boolean* = *object*.**BorderAlways** **As Boolean** | | VB | *Boolean* = *object*.**BorderAlways** **As Boolean** | | C#.NET | **bool** *Boolean* = *object*.**BorderAlways**; | | VC++ | **VARIANT_BOOL** *Boolean* = *object*->**BorderAlways**;
**VARIANT_BOOL** *Boolean* = *object*->Get**BorderAlways**(); | | C | **HRESULT** *object*->get_**BorderAlways**(**VARIANT_BOOL*** *Boolean*); | Put | | | | --- | --- | | VB.NET | *object*.**BorderAlways** = *Boolean* **As Boolean** | | VB | *object*.**BorderAlways** = *Boolean* **As Boolean** | | C#.NET | **bool** *object*.**BorderAlways** = *Boolean*; | | VC++ | **VARIANT_BOOL** *object*->**BorderAlways** = *Boolean*;
**void** *object*->Put**BorderAlways**(**VARIANT_BOOL** *Boolean*); | | C | **HRESULT** *object*->put_**BorderAlways**(**VARIANT_BOOL** *Boolean*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Boolean Defines whether the control border is always displayed. | Boolean | Description | | --- | --- | | True | The control's border is always displayed. | | False | The control's border is only displayed if the control has the input focus, the control is the form's [default button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_default_button) or the mouse cursor is located above the control's client area. | ### Comments The BorderAlways property defines whether the control border is always displayed. If the BorderAlways property is set to True, the button control behaves like a standard Windows button control and the border is always displayed. If the BorderAlways property is set to False, the button's border is not visible, unless the control has the input focus, the control is the form's default button or the mouse cursor is located above the control's client area. This is usually used for controls on tool bars or other modeless windows. If the [ButtonStyle](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ButtonStyle) property is set to styleSftButtonNone, this property has no effect and is ignored. The border is never displayed. The control's border style is defined using the [BorderStyle](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BorderStyle) property. If [Windows themes](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_themes) are used, the BorderAlways property has a theme dependent effect. Usually it controls the appearance of the border and results in the entire button being transparent until the mouse cursor moves into the control. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## BorderStyle Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BorderStyle* Defines the control's border style. ### Syntax Get | | | | --- | --- | | VB.NET | *Style* = *object*.**BorderStyle** **As [SftButtonBorderStyleConstants](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonBorderStyleConstants)** | | VB | *Style* = *object*.**BorderStyle** **As SftButtonBorderStyleConstants** | | C#.NET | **SftButtonBorderStyleConstants** *Style* = *object*.**BorderStyle**; | | VC++ | **enum SftButtonBorderStyleConstants** *Style* = *object*->**BorderStyle**;
**enum SftButtonBorderStyleConstants** *Style* = *object*->Get**BorderStyle**(); | | C | **HRESULT** *object*->get_**BorderStyle**(**enum SftButtonBorderStyleConstants*** *Style*); | Put | | | | --- | --- | | VB.NET | *object*.**BorderStyle** = *Style* **As SftButtonBorderStyleConstants** | | VB | *object*.**BorderStyle** = *Style* **As SftButtonBorderStyleConstants** | | C#.NET | **SftButtonBorderStyleConstants** *object*.**BorderStyle** = *Style*; | | VC++ | **enum SftButtonBorderStyleConstants** *object*->**BorderStyle** = *Style*;
**void** *object*->Put**BorderStyle**(**enum SftButtonBorderStyleConstants** *Style*); | | C | **HRESULT** *object*->put_**BorderStyle**(**enum SftButtonBorderStyleConstants** *Style*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Style Defines the control's border style. | Name | Value | Description | | --- | --- | --- | | borderSftButtonThin | 0 | Thin - Displays a thin border around the control. | | borderSftButtonStandard | 1 | Standard - Displays a regular border around the control, in appearance similar to the standard Windows button control. | | borderSftButtonPixel1 | 2 | Pixel1 - Displays a single pixel border around the control. This value has no effect if [Windows themes](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_themes) are used. | ### Comments The BorderStyle property defines the control's border style. The display of the border may be further controlled using the [BorderAlways](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_BorderAlways) property. If the ButtonStyle property is set to styleSftButtonNone, this property has no effect and is ignored. The border is never displayed. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Bounce Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Bounce* Defines the control's visual response to a mouse click. ### Syntax Get | | | | --- | --- | | VB.NET | *Style* = *object*.**Bounce** **As [SftButtonBounceStyleConstants](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonBounceStyleConstants)** | | VB | *Style* = *object*.**Bounce** **As SftButtonBounceStyleConstants** | | C#.NET | **SftButtonBounceStyleConstants** *Style* = *object*.**Bounce**; | | VC++ | **enum SftButtonBounceStyleConstants** *Style* = *object*->**Bounce**;
**enum SftButtonBounceStyleConstants** *Style* = *object*->Get**Bounce**(); | | C | **HRESULT** *object*->get_**Bounce**(**enum SftButtonBounceStyleConstants*** *Style*); | Put | | | | --- | --- | | VB.NET | *object*.**Bounce** = *Style* **As SftButtonBounceStyleConstants** | | VB | *object*.**Bounce** = *Style* **As SftButtonBounceStyleConstants** | | C#.NET | **SftButtonBounceStyleConstants** *object*.**Bounce** = *Style*; | | VC++ | **enum SftButtonBounceStyleConstants** *object*->**Bounce** = *Style*;
**void** *object*->Put**Bounce**(**enum SftButtonBounceStyleConstants** *Style*); | | C | **HRESULT** *object*->put_**Bounce**(**enum SftButtonBounceStyleConstants** *Style*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Style Defines the control's visual response to a mouse click. | Name | Value | Description | | --- | --- | --- | | bounceSftButtonDefault | 0 | Default - If [Windows themes](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_themes) are in effect, bounceSftButtonNo applies. Otherwise, without Windows themes, bounceSftButtonYes applies. | | bounceSftButtonYes | 1 | Yes - The control reflects the mouse click by painting the control contents offset by one pixel while the mouse button is pressed. | | bounceSftButtonNo | 2 | No - A mouse click does not cause the control contents to be repainted. | ### Comments The Bounce property defines the control's visual response to a mouse click. The graphics components also reflect mouse clicks using the [Image1Pressed](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1Pressed) and [Image2Pressed](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2Pressed) properties (if defined). The Bounce property does not apply to the [drop down button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_dropdown). See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## ButtonStyle Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ButtonStyle* Defines the [button style](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_button). ### Syntax Get | | | | --- | --- | | VB.NET | *Style* = *object*.**ButtonStyle** **As [SftButtonStyleConstants](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonStyleConstants)** | | VB | *Style* = *object*.**ButtonStyle** **As SftButtonStyleConstants** | | C#.NET | **SftButtonStyleConstants** *Style* = *object*.**ButtonStyle**; | | VC++ | **enum SftButtonStyleConstants** *Style* = *object*->**ButtonStyle**;
**enum SftButtonStyleConstants** *Style* = *object*->Get**ButtonStyle**(); | | C | **HRESULT** *object*->get_**ButtonStyle**(**enum SftButtonStyleConstants*** *Style*); | Put | | | | --- | --- | | VB.NET | *object*.**ButtonStyle** = *Style* **As SftButtonStyleConstants** | | VB | *object*.**ButtonStyle** = *Style* **As SftButtonStyleConstants** | | C#.NET | **SftButtonStyleConstants** *object*.**ButtonStyle** = *Style*; | | VC++ | **enum SftButtonStyleConstants** *object*->**ButtonStyle** = *Style*;
**void** *object*->Put**ButtonStyle**(**enum SftButtonStyleConstants** *Style*); | | C | **HRESULT** *object*->put_**ButtonStyle**(**enum SftButtonStyleConstants** *Style*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Style Defines the button style. | Name | Value | Description | | --- | --- | --- | | styleSftButtonButton | 0 | Button | | styleSftButtonDropDown | 1 | Button with [drop down button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_dropdown) | | styleSftButtonNone | 2 | No Button Background - Only the graphics and text components are displayed. The control area is transparent (except at design time) and only the graphics and text components are rendered transparently on the containing window's background. | ### Comments The ButtonStyle property defines the button style. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## CancelMode Method, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_CancelMode* Cancels current processing modes. ### Syntax | | | | --- | --- | | VB.NET | *object*.**CancelMode**() | | VB | *object*.**CancelMode** | | C#.NET | **void** *object*.**CancelMode**(); | | VC++ | **HRESULT** *object*->**CancelMode**(); | | C | **HRESULT** *object*->raw_**CancelMode**(); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). ### Comments The CancelMode method cancels current processing modes. Applications may wish to respond to events such as [MouseDown](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_MouseDown). Many mouse related events may have built-in functions, particularly drag & drop operations may be started after these events are processed. If an application wants to suppress the built-in behavior, e.g. to display a context menu, the internal state of the control has to be cleared. This can be accomplished using the CancelMode method. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## DataObject.Clear Method *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/DataObject_Clear* Clears all data and formats in a [DataObject](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_DataObject) object. ### Syntax | | | | --- | --- | | VB.NET | *object*.**Clear**() | | VB | *object*.**Clear** | | C#.NET | **void** *object*.**Clear**(); | | VC++ | **HRESULT** *object*->**Clear**(); | | C | **HRESULT** *object*->raw_**Clear**(); | object A DataObject object. ### Comments The Clear method clears all data and formats in a DataObject object. This method is available only for OLE drag sources. If Clear is called from a drop target component, an error is generated. See Also DataObject Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Clear Method, SftPictureObject Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Clear* Clears the image object. ### Syntax | | | | --- | --- | | VB.NET | *object*.**Clear**() | | VB | *object*.**Clear** | | C#.NET | **void** *object*.**Clear**(); | | VC++ | **HRESULT** *object*->**Clear**(); | | C | **HRESULT** *object*->raw_**Clear**(); | object A [SftPictureObject object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject). ### Comments The Clear method clears the image object. See Also SftPictureObject Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Click Event, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_Click* The button is clicked. ### Syntax | | | | --- | --- | | VB.NET | **Private Sub** *object*_**ClickEvent**(**ByVal** *sender* **As Object**, **ByVal** *e* **As ***[EventArgumentType](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/r_EventArgumentType)*) **Handles** *object*.**ClickEvent** | | VB | **Private Sub** *object*_**Click**() | | C#.NET | **void** *object*_**ClickEvent**(**object** *sender*, *EventArgumentType e*); | | VC++ | **void** On**Click***object*(); | | C | **HRESULT** On**Click***object*(); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). ### Comments The Click event occurs when the button is clicked, when the user presses the space bar while the control has the input focus or the user presses the appropriate [accelerator key](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_accel) (Alt+*key*). This event may also occur if the button is defined as the [default button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_default_button) and the user presses the ENTER key. Using properties such as the [Pressed](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Pressed) property does not cause this event to occur. The [ClickStyle](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ClickStyle) property defines how the control responds to mouse clicks. The Click event is generated when the user releases the mouse button after clicking on the button using the left mouse button. If the user does not release the mouse button immediately, the [ClickInterval](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ClickInterval) property defines the interval between auto-repeat Click events. If the user double-clicks the button, the [DblClick](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_DblClick) event also occurs. The [DropDownClick](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_DropDownClick) event occurs when the [drop down button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_dropdown) is clicked. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## ClickInterval Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ClickInterval* Defines the auto-repeat interval between Click events while the button is pressed. ### Syntax Get | | | | --- | --- | | VB.NET | *Interval* = *object*.**ClickInterval** **As Integer** | | VB | *Interval* = *object*.**ClickInterval** **As Long** | | C#.NET | **int** *Interval* = *object*.**ClickInterval**; | | VC++ | **long** *Interval* = *object*->**ClickInterval**;
**long** *Interval* = *object*->Get**ClickInterval**(); | | C | **HRESULT** *object*->get_**ClickInterval**(**long*** *Interval*); | Put | | | | --- | --- | | VB.NET | *object*.**ClickInterval** = *Interval* **As Integer** | | VB | *object*.**ClickInterval** = *Interval* **As Long** | | C#.NET | **int** *object*.**ClickInterval** = *Interval*; | | VC++ | **long** *object*->**ClickInterval** = *Interval*;
**void** *object*->Put**ClickInterval**(**long** *Interval*); | | C | **HRESULT** *object*->put_**ClickInterval**(**long** *Interval*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Interval Defines the auto-repeat interval between [Click](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_Click) events while the button is pressed. If 0 is specified, auto-repeat of the Click event is not available. *Interval* can be between 0 and 10000. ### Comments The ClickInterval property defines the auto-repeat interval between Click events while the button is pressed. The Click event is generated when the user releases the mouse button after clicking on the button using the left mouse button. If the user does not release the mouse button immediately, Click events are generated every * Interval* milliseconds. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## ClickStyle Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ClickStyle* Defines how the control responds to mouse clicks. ### Syntax Get | | | | --- | --- | | VB.NET | *Style* = *object*.**ClickStyle** **As [SftButtonClickStyleConstants](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonClickStyleConstants)** | | VB | *Style* = *object*.**ClickStyle** **As SftButtonClickStyleConstants** | | C#.NET | **SftButtonClickStyleConstants** *Style* = *object*.**ClickStyle**; | | VC++ | **enum SftButtonClickStyleConstants** *Style* = *object*->**ClickStyle**;
**enum SftButtonClickStyleConstants** *Style* = *object*->Get**ClickStyle**(); | | C | **HRESULT** *object*->get_**ClickStyle**(**enum SftButtonClickStyleConstants*** *Style*); | Put | | | | --- | --- | | VB.NET | *object*.**ClickStyle** = *Style* **As SftButtonClickStyleConstants** | | VB | *object*.**ClickStyle** = *Style* **As SftButtonClickStyleConstants** | | C#.NET | **SftButtonClickStyleConstants** *object*.**ClickStyle** = *Style*; | | VC++ | **enum SftButtonClickStyleConstants** *object*->**ClickStyle** = *Style*;
**void** *object*->Put**ClickStyle**(**enum SftButtonClickStyleConstants** *Style*); | | C | **HRESULT** *object*->put_**ClickStyle**(**enum SftButtonClickStyleConstants** *Style*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Style Defines how the control responds to mouse clicks. | Name | Value | Description | | --- | --- | --- | | clickstyleSftButtonControl | 0 | Control - The [Click](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_Click) event occurs when the left mouse button is pressed anywhere on the control. | | clickstyleSftButtonExact | 1 | Exact (Pictures or Text) - The Click event occurs when the left mouse button is pressed on a graphics or text component of the control. | | clickstyleSftButtonPictures | 2 | Pictures Only - The Click event occurs when the left mouse button is pressed on a graphics component of the control. | | clickstyleSftButtonText | 3 | Text Only - The Click event occurs when the left mouse button is pressed on a text component of the control. | ### Comments The ClickStyle property defines how the control responds to mouse clicks. Limiting the Click event using the ClickStyle property is most useful when the [ButtonStyle](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ButtonStyle) property is set to styleSftButtonNone and only text or graphics components are visible. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## CustomCode Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_CustomCode* Defines optional product customization. ### Syntax Get | | | | --- | --- | | VB.NET | *Code* = *object*.**CustomCode** **As Integer** | | VB | *Code* = *object*.**CustomCode** **As Long** | | C#.NET | **int** *Code* = *object*.**CustomCode**; | | VC++ | **long** *Code* = *object*->**CustomCode**;
**long** *Code* = *object*->Get**CustomCode**(); | | C | **HRESULT** *object*->get_**CustomCode**(**long*** *Code*); | Put | | | | --- | --- | | VB.NET | *object*.**CustomCode** = *Code* **As Integer** | | VB | *object*.**CustomCode** = *Code* **As Long** | | C#.NET | **int** *object*.**CustomCode** = *Code*; | | VC++ | **long** *object*->**CustomCode** = *Code*;
**void** *object*->Put**CustomCode**(**long** *Code*); | | C | **HRESULT** *object*->put_**CustomCode**(**long** *Code*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Code Defines optional product customization. ### Comments The CustomCode property defines optional product customization. Valid *Code* values are made available by [Product Support](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_contactsoftel), in response to purchased enhancements, special features, etc. and are only available upon request. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## DarkEdgeColor Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_DarkEdgeColor* Defines the control's color for dark edges. ### Syntax Get | | | | --- | --- | | VB.NET | *Clr* = *object*.**DarkEdgeColor** **As System.Drawing.Color[![\](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_dotnet)** | | VB | *Clr* = *object*.**DarkEdgeColor** **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *Clr* = *object*.**DarkEdgeColor**; | | VC++ | **OLE_COLOR** *Clr* = *object*->**DarkEdgeColor**;
**OLE_COLOR** *Clr* = *object*->Get**DarkEdgeColor**(); | | C | **HRESULT** *object*->get_**DarkEdgeColor**(**OLE_COLOR*** *Clr*); | Put | | | | --- | --- | | VB.NET | *object*.**DarkEdgeColor** = *Clr* **As System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** | | VB | *object*.**DarkEdgeColor** = *Clr* **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *object*.**DarkEdgeColor** = *Clr*; | | VC++ | **OLE_COLOR** *object*->**DarkEdgeColor** = *Clr*;
**void** *object*->Put**DarkEdgeColor**(**OLE_COLOR** *Clr*); | | C | **HRESULT** *object*->put_**DarkEdgeColor**(**OLE_COLOR** *Clr*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Clr Defines the control's color for dark edges. For information about color properties, please visit the applicable section "[Using SftButton/OCX with ...](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using)". ### Comments The DarkEdgeColor property defines the control's color for dark edges. > This property has no effect if [Windows themes](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_themes) are used. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## DarkMode Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_DarkMode* Defines the [dark mode](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_darkmode) setting (off, on, or following the Windows setting). ### Syntax Get | | | | --- | --- | | VB.NET | *Mode* = *object*.**DarkMode** **As [SftButtonDarkModeConstants](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonDarkModeConstants)** | | VB | *Mode* = *object*.**DarkMode** **As SftButtonDarkModeConstants** | | C#.NET | **SftButtonDarkModeConstants** *Mode* = *object*.**DarkMode**; | | VC++ | **enum SftButtonDarkModeConstants** *Mode* = *object*->**DarkMode**;
**enum SftButtonDarkModeConstants** *Mode* = *object*->Get**DarkMode**(); | | C | **HRESULT** *object*->get_**DarkMode**(**enum SftButtonDarkModeConstants*** *Mode*); | Put | | | | --- | --- | | VB.NET | *object*.**DarkMode** = *Mode* **As SftButtonDarkModeConstants** | | VB | *object*.**DarkMode** = *Mode* **As SftButtonDarkModeConstants** | | C#.NET | **SftButtonDarkModeConstants** *object*.**DarkMode** = *Mode*; | | VC++ | **enum SftButtonDarkModeConstants** *object*->**DarkMode** = *Mode*;
**void** *object*->Put**DarkMode**(**enum SftButtonDarkModeConstants** *Mode*); | | C | **HRESULT** *object*->put_**DarkMode**(**enum SftButtonDarkModeConstants** *Mode*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Mode Defines the dark mode setting (off, on, or following the Windows setting). | Name | Value | Description | | --- | --- | --- | | darkSftButtonOff | 0 | Always light (the default). | | darkSftButtonOn | 1 | Always dark. | | darkSftButtonAuto | 2 | Follow the Windows dark mode setting. | ### Comments The DarkMode property defines the dark mode setting (off, on, or following the Windows setting). When set to darkSftButtonAuto, the control follows the Windows 10 'Choose your mode' setting and re-renders automatically when it changes; the [DarkModeChange](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_DarkModeChange) event is raised when the effective state changes. Use [DarkModeActive](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_DarkModeActive) to determine whether dark mode is currently active. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) | Dark Mode ## DarkModeActive Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_DarkModeActive* Returns whether [dark mode](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_darkmode) is currently active. ### Syntax Get | | | | --- | --- | | VB.NET | *Boolean* = *object*.**DarkModeActive** **As Boolean** | | VB | *Boolean* = *object*.**DarkModeActive** **As Boolean** | | C#.NET | **bool** *Boolean* = *object*.**DarkModeActive**; | | VC++ | **VARIANT_BOOL** *Boolean* = *object*->**DarkModeActive**;
**VARIANT_BOOL** *Boolean* = *object*->Get**DarkModeActive**(); | | C | **HRESULT** *object*->get_**DarkModeActive**(**VARIANT_BOOL*** *Boolean*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Boolean Returns whether dark mode is currently active. | Boolean | Description | | --- | --- | | True | Dark mode is currently active. | | False | Dark mode is not active. | ### Comments The DarkModeActive property returns whether dark mode is currently active. The dark mode setting is defined using the [DarkMode](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_DarkMode) property. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) | DarkMode | [DarkModeChange](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_DarkModeChange) | Dark Mode ## DarkModeChange Event, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_DarkModeChange* The effective [dark mode](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_darkmode) state has changed (Automatic dark mode only). ### Syntax | | | | --- | --- | | VB.NET | **Private Sub** *object*_**DarkModeChange**(**ByVal** *sender* **As Object**, **ByVal** *e* **As ***[EventArgumentType](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/r_EventArgumentType)*) **Handles** *object*.**DarkModeChange** | | VB | **Private Sub** *object*_**DarkModeChange**(**ByVal** *Active* **As Boolean**) | | C#.NET | **void** *object*_**DarkModeChange**(**object** *sender*, *EventArgumentType e*); | | VC++ | **void** On**DarkModeChange***object*(**VARIANT_BOOL** *Active*); | | C | **HRESULT** On**DarkModeChange***object*(**VARIANT_BOOL** *Active*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Active The new effective dark mode state (True if dark mode is now active). ### Comments The DarkModeChange event occurs when the effective dark mode state changes while [DarkMode](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_DarkMode) is set to [darkSftButtonAuto](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonDarkModeConstants) and the user changes the Windows setting. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) | DarkMode | [DarkModeActive](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_DarkModeActive) | Dark Mode ## DataObjectFiles.Add Method *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/DataObjectFiles_Add* Adds a filename to the [Files](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/DataObject_Files) collection of a [DataObject](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_DataObject) object (sftCFFiles format only). ### Syntax | | | | --- | --- | | VB.NET | *object*.**Add**(**ByVal** *Filename* **As String**, [ **ByVal** *ItemIndex* **As Object** ] ) | | VB | *object*.**Add**(**ByVal** *Filename* **As String**, [ **ByVal** *ItemIndex* **As Variant** ] ) | | C#.NET | **void** *object*.**Add**(**string** *Filename*, **object** *ItemIndex*); | | VC++ | **HRESULT** *object*->**Add**(**_bstr_t** *Filename*, **const _variant_t**&**** *ItemIndex* = **vtMissing**); | | C | **HRESULT** *object*->raw_**Add**(**BSTR** *Filename*, **VARIANT** *ItemIndex*); | object A [DataObjectFiles object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_DataObjectFiles). Filename The file name to be added to the collection. ItemIndex The one-based position where the file name is to be inserted. If *ItemIndex* is not specified, the new file name is added at the end of the collection. ### Comments The Add method adds a filename to the Files collection of a DataObject object (sftCFFiles format only). The Files collection is filled with file names only when the DataObject object contains data of type sftCFFiles. The DataObject object can contain several different types of data. You can iterate through the DataObject.Files collection to retrieve the list of file names. See Also DataObjectFiles Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## DataObjectFiles.Clear Method *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/DataObjectFiles_Clear* Clears all filenames stored in the [Files](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/DataObject_Files) collection of a [DataObject](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_DataObject) object (sftCFFiles format only). ### Syntax | | | | --- | --- | | VB.NET | *object*.**Clear**() | | VB | *object*.**Clear** | | C#.NET | **void** *object*.**Clear**(); | | VC++ | **HRESULT** *object*->**Clear**(); | | C | **HRESULT** *object*->raw_**Clear**(); | object A [DataObjectFiles object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_DataObjectFiles). ### Comments The Clear method clears all filenames stored in the Files collection of a DataObject object (sftCFFiles format only). To remove only one file name, use the [Remove](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/DataObjectFiles_Remove) method instead. See Also DataObjectFiles Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## DataObjectFiles.Count Property *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/DataObjectFiles_Count* Returns the number of filenames in the [Files](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/DataObject_Files) collection of a [DataObject](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_DataObject) object (sftCFFiles format only). ### Syntax Get | | | | --- | --- | | VB.NET | *Total* = *object*.**Count** **As Integer** | | VB | *Total* = *object*.**Count** **As Long** | | C#.NET | **int** *Total* = *object*.**Count**; | | VC++ | **long** *Total* = *object*->**Count**;
**long** *Total* = *object*->Get**Count**(); | | C | **HRESULT** *object*->get_**Count**(**long*** *Total*); | object A [DataObjectFiles object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_DataObjectFiles). Total Returns the number of filenames in the Files collection of a DataObject object (sftCFFiles format only). ### Comments The Count property returns the number of filenames in the Files collection of a DataObject object (sftCFFiles format only). This property can be used to iterate through all file names in the Files collection. See Also DataObjectFiles Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## DataObjectFiles.Item Property *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/DataObjectFiles_Item* Returns a specific filename by index from the [Files](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/DataObject_Files) collection of a [DataObject](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_DataObject) object (sftCFFiles format only). ### Syntax Get | | | | --- | --- | | VB.NET | *Item* = *object*.**Item**(**ByVal** *ItemIndex* **As Integer**) **As String** | | VB | *Item* = *object*.**Item**(**ByVal** *ItemIndex* **As Long**) **As String** | | C#.NET | **string** *Item* = *object***[****int** *ItemIndex***]**; | | VC++ | **_bstr_t** *Item* = *object*->**Item**[**long** *ItemIndex*];
**_bstr_t** *Item* = *object*->Get**Item**(**long** *ItemIndex*); | | C | **HRESULT** *object*->get_**Item**(**long** *ItemIndex*, **BSTR*** *Item*); | object A [DataObjectFiles object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_DataObjectFiles). ItemIndex The one-based position of the file name to be retrieved. Item Returns the file name at position *ItemIndex* in the Files collection of a DataObject object (sftCFFiles format only). ### Comments The Item property returns a specific filename by index from the Files collection of a DataObject object (sftCFFiles format only). This property can be used to retrieve file names from the Files collection. See Also DataObjectFiles Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## DataObjectFiles.Remove Method *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/DataObjectFiles_Remove* Removes a filename from the [Files](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/DataObject_Files) collection of a [DataObject](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_DataObject) object (sftCFFiles format only). ### Syntax | | | | --- | --- | | VB.NET | *object*.**Remove**(**ByVal** *ItemIndex* **As Object**) | | VB | *object*.**Remove**(**ByVal** *ItemIndex* **As Variant**) | | C#.NET | **void** *object*.**Remove**(**object** *ItemIndex*); | | VC++ | **HRESULT** *object*->**Remove**(**const _variant_t**&**** *ItemIndex*); | | C | **HRESULT** *object*->raw_**Remove**(**VARIANT** *ItemIndex*); | object A [DataObjectFiles object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_DataObjectFiles). ItemIndex The one-based position of the file name to be removed as an Integer or the filename to be removed as a String. ### Comments The Remove method removes a filename from the Files collection of a DataObject object (sftCFFiles format only). To remove all the file names from the Files collection, use the [Clear](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/DataObjectFiles_Clear) method. See Also DataObjectFiles Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## DblClick Event, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_DblClick* The button is double-clicked. ### Syntax | | | | --- | --- | | VB.NET | **Private Sub** *object*_**DblClick**(**ByVal** *sender* **As Object**, **ByVal** *e* **As ***[EventArgumentType](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/r_EventArgumentType)*) **Handles** *object*.**DblClick** | | VB | **Private Sub** *object*_**DblClick**() | | C#.NET | **void** *object*_**DblClick**(**object** *sender*, *EventArgumentType e*); | | VC++ | **void** On**DblClick***object*(); | | C | **HRESULT** On**DblClick***object*(); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). ### Comments The DblClick event occurs when the button is double-clicked. A [Click](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_Click) event always precedes the DblClick event. The [DropDownClick](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_DropDownClick) event occurs when the [drop down button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_dropdown) is clicked. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Direct Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Direct* Returns an [ISftButtonVTable](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton) interface pointer. ### Syntax Get | | | | --- | --- | | VB.NET | *refSftButtonVObj* = *object*.**Direct** **As ISftButtonVTable** | | VB | **Set** *refSftButtonVObj* = *object*.**Direct** **As SftButtonVTable** | | C#.NET | **ISftButtonVTable** *refSftButtonVObj* = *object*.**Direct**; | | VC++ | **ISftButtonVTable*** *refSftButtonVObj* = *object*->**Direct**;
**ISftButtonVTable*** *refSftButtonVObj* = *object*->Get**Direct**(); | | C | **HRESULT** *object*->get_**Direct**(**ISftButtonVTable**** *refSftButtonVObj*); | object A SftButton object. refSftButtonVObj Returns an ISftButtonVTable interface pointer. ### Comments The Direct property returns an ISftButtonVTable interface pointer. The ISftButtonVTable interface describes a SftButton object (i.e. the control itself). It is used in Visual Basic to insure that vtable binding is used. Visual Basic uses dispatch interface (early and late) binding when a SftButton object is used (i.e. the control). By retrieving the ISftButtonVTable interface, Visual Basic can use vtable binding which is significantly faster than any form of dispatch interface binding. Any SftButton/OCX control that is used with Visual Basic should use the ISftButtonVTable interface if performance is important. Visual Basic uses vtable binding for all other SftButton objects (such as [DataObject](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_DataObject), etc.). Visual Basic will however use dispatch interface binding for the control object (SftButton). The ISftButtonVTable interface exposes all properties and methods that are supported by the SftButton object. Other languages (such as C++) can use the SftButton object directly and do not need to retrieve the ISftButtonVTable interface. The ISftButton interface which implements the SftButton object is a dual interface. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## DPI Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_DPI* Returns the effective [DPI](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_dpi) for the control's current monitor. ### Syntax Get | | | | --- | --- | | VB.NET | *DPI* = *object*.**DPI** **As Integer** | | VB | *DPI* = *object*.**DPI** **As Long** | | C#.NET | **int** *DPI* = *object*.**DPI**; | | VC++ | **long** *DPI* = *object*->**DPI**;
**long** *DPI* = *object*->Get**DPI**(); | | C | **HRESULT** *object*->get_**DPI**(**long*** *DPI*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). DPI Returns the effective DPI for the control's current monitor. ### Comments The DPI property returns the effective DPI for the control's current monitor. On a per-monitor DPI-aware host, the value changes when the control moves to a monitor with a different DPI; the [DPIChanged](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_DPIChanged) event is raised when this happens. A value of 96 corresponds to 100% scaling. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) | Per-Monitor DPI and Scaling ## DPIChanged Event, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_DPIChanged* The control moved to a monitor with a different [DPI](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_dpi) (per-monitor-v2 hosts). ### Syntax | | | | --- | --- | | VB.NET | **Private Sub** *object*_**DPIChanged**(**ByVal** *sender* **As Object**, **ByVal** *e* **As ***[EventArgumentType](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/r_EventArgumentType)*) **Handles** *object*.**DPIChanged** | | VB | **Private Sub** *object*_**DPIChanged**(**ByVal** *DPI* **As Long**) | | C#.NET | **void** *object*_**DPIChanged**(**object** *sender*, *EventArgumentType e*); | | VC++ | **void** On**DPIChanged***object*(**long** *DPI*); | | C | **HRESULT** On**DPIChanged***object*(**long** *DPI*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). DPI The new effective DPI for the control's monitor. ### Comments The DPIChanged event occurs on a per-monitor DPI-aware host when the control moves to a monitor with a different DPI or the system DPI changes. Use [DPI](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_DPI) to query the current value at any time. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) | Per-Monitor DPI and Scaling ## DropDownClick Event, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_DropDownClick* The [drop down button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_dropdown) is clicked. ### Syntax | | | | --- | --- | | VB.NET | **Private Sub** *object*_**DropDownClick**(**ByVal** *sender* **As Object**, **ByVal** *e* **As ***[EventArgumentType](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/r_EventArgumentType)*) **Handles** *object*.**DropDownClick** | | VB | **Private Sub** *object*_**DropDownClick**() | | C#.NET | **void** *object*_**DropDownClick**(**object** *sender*, *EventArgumentType e*); | | VC++ | **void** On**DropDownClick***object*(); | | C | **HRESULT** On**DropDownClick***object*(); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). ### Comments The DropDownClick event occurs when the drop down button is clicked or when the user presses Alt+Down Arrow. Depending on the [DropDownDownClick](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_DropDownDownClick) property, the event occurs as the mouse button is pressed or released. Using properties such as the DropDownPressed property does not cause this event to occur. If the user double-clicks the drop down button, the [DropDownDblClick](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_DropDownDblClick) event also occurs. The [Click](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_Click) event occurs when the button is clicked. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## DropDownDblClick Event, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_DropDownDblClick* The [drop down button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_dropdown) is double-clicked. ### Syntax | | | | --- | --- | | VB.NET | **Private Sub** *object*_**DropDownDblClick**(**ByVal** *sender* **As Object**, **ByVal** *e* **As ***[EventArgumentType](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/r_EventArgumentType)*) **Handles** *object*.**DropDownDblClick** | | VB | **Private Sub** *object*_**DropDownDblClick**() | | C#.NET | **void** *object*_**DropDownDblClick**(**object** *sender*, *EventArgumentType e*); | | VC++ | **void** On**DropDownDblClick***object*(); | | C | **HRESULT** On**DropDownDblClick***object*(); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). ### Comments The DropDownDblClick event occurs when the drop down button is double-clicked. Depending on the [DropDownDownClick](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_DropDownDownClick) property, the event occurs as the mouse button is pressed or released. A [DropDownClick](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_DropDownClick) event always precedes the DropDownDblClick event. The [Click](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_Click) event occurs when the button is clicked. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## DropDownDownClick Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_DropDownDownClick* Defines whether the [drop down button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_dropdown) fires the [DropDownClick](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_DropDownClick) event when the mouse button is either pressed or released. ### Syntax Get | | | | --- | --- | | VB.NET | *Boolean* = *object*.**DropDownDownClick** **As Boolean** | | VB | *Boolean* = *object*.**DropDownDownClick** **As Boolean** | | C#.NET | **bool** *Boolean* = *object*.**DropDownDownClick**; | | VC++ | **VARIANT_BOOL** *Boolean* = *object*->**DropDownDownClick**;
**VARIANT_BOOL** *Boolean* = *object*->Get**DropDownDownClick**(); | | C | **HRESULT** *object*->get_**DropDownDownClick**(**VARIANT_BOOL*** *Boolean*); | Put | | | | --- | --- | | VB.NET | *object*.**DropDownDownClick** = *Boolean* **As Boolean** | | VB | *object*.**DropDownDownClick** = *Boolean* **As Boolean** | | C#.NET | **bool** *object*.**DropDownDownClick** = *Boolean*; | | VC++ | **VARIANT_BOOL** *object*->**DropDownDownClick** = *Boolean*;
**void** *object*->Put**DropDownDownClick**(**VARIANT_BOOL** *Boolean*); | | C | **HRESULT** *object*->put_**DropDownDownClick**(**VARIANT_BOOL** *Boolean*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Boolean Defines whether the drop down button fires the DropDownClick event when the mouse button is either pressed or released. | Boolean | Description | | --- | --- | | True | The DropDownClick event is fired as the mouse button is pressed. | | False | The DropDownClick event is fired as the mouse button is released. | ### Comments The DropDownDownClick property defines whether the drop down button fires the DropDownClick event when the mouse button is either pressed or released. The [DropDownDblClick](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_DropDownDblClick) event is also affected by this property. A button control (including a Windows button control) normally doesn't fire the [Click](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_Click) event until the mouse button is released. Using the DropDownDownClick property, this behavior can be changed for the drop down button. This is typically used when the drop down button displays a popup menu. Only the drop down button is affected by this property. There is no equivalent property for the button portion. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## DropDownFollows Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_DropDownFollows* Defines whether the [drop down button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_dropdown) follows button clicks. ### Syntax Get | | | | --- | --- | | VB.NET | *Boolean* = *object*.**DropDownFollows** **As Boolean** | | VB | *Boolean* = *object*.**DropDownFollows** **As Boolean** | | C#.NET | **bool** *Boolean* = *object*.**DropDownFollows**; | | VC++ | **VARIANT_BOOL** *Boolean* = *object*->**DropDownFollows**;
**VARIANT_BOOL** *Boolean* = *object*->Get**DropDownFollows**(); | | C | **HRESULT** *object*->get_**DropDownFollows****(**VARIANT_BOOL*** *Boolean*); | Put | | | | --- | --- | | VB.NET | *object*.**DropDownFollows** = *Boolean* **As Boolean** | | VB | *object*.**DropDownFollows** = *Boolean* **As Boolean** | | C#.NET | **bool** *object*.**DropDownFollows** = *Boolean*; | | VC++ | **VARIANT_BOOL** *object*->**DropDownFollows** = *Boolean*;
**void** *object*->Put**DropDownFollows**(**VARIANT_BOOL** *Boolean*); | | C | **HRESULT** *object*->put_**DropDownFollows****(**VARIANT_BOOL** *Boolean*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Boolean Defines whether the drop down button follows button clicks. | Boolean | Description | | --- | --- | | True | If the button is pressed or released, the drop down button is also displayed in the same position. | | False | If the button is pressed or released, this has no effect on the drop down button. | ### Comments The DropDownFollows property defines whether the drop down button follows button clicks. The button and drop down button portion are usually independent, but using the DropDownFollows or [Follows](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Follows) properties, one can mimic the state of the other. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## DropDownPressed Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_DropDownPressed* Defines whether the [drop down button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_dropdown) is pressed ([toggle button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_toggle) only). ### Syntax Get | | | | --- | --- | | VB.NET | *Boolean* = *object*.**DropDownPressed** **As Boolean** | | VB | *Boolean* = *object*.**DropDownPressed** **As Boolean** | | C#.NET | **bool** *Boolean* = *object*.**DropDownPressed**; | | VC++ | **VARIANT_BOOL** *Boolean* = *object*->**DropDownPressed**;
**VARIANT_BOOL** *Boolean* = *object*->Get**DropDownPressed**(); | | C | **HRESULT** *object*->get_**DropDownPressed**(**VARIANT_BOOL*** *Boolean*); | Put | | | | --- | --- | | VB.NET | *object*.**DropDownPressed** = *Boolean* **As Boolean** | | VB | *object*.**DropDownPressed** = *Boolean* **As Boolean** | | C#.NET | **bool** *object*.**DropDownPressed** = *Boolean*; | | VC++ | **VARIANT_BOOL** *object*->**DropDownPressed** = *Boolean*;
**void** *object*->Put**DropDownPressed**(**VARIANT_BOOL** *Boolean*); | | C | **HRESULT** *object*->put_**DropDownPressed**(**VARIANT_BOOL** *Boolean*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Boolean Defines whether the drop down button is pressed (toggle button only). | Boolean | Description | | --- | --- | | True | The drop down button is pressed. | | False | The drop down button is released. | ### Comments The DropDownPressed property defines whether the drop down button is pressed (toggle button only). When using the DropDownPressed property, the [DropDownClick](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_DropDownClick) event does not occur. The [DropDownToggle](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_DropDownToggle) property must be set to True for this property to take effect. The button portion is controlled by the equivalent [Pressed](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Pressed) property. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## DropDownStyle Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_DropDownStyle* Defines the width of the [drop down button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_dropdown). ### Syntax Get | | | | --- | --- | | VB.NET | *Style* = *object*.**DropDownStyle** **As [SftButtonDropDownStyleConstants](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonDropDownStyleConstants)** | | VB | *Style* = *object*.**DropDownStyle** **As SftButtonDropDownStyleConstants** | | C#.NET | **SftButtonDropDownStyleConstants** *Style* = *object*.**DropDownStyle**; | | VC++ | **enum SftButtonDropDownStyleConstants** *Style* = *object*->**DropDownStyle**;
**enum SftButtonDropDownStyleConstants** *Style* = *object*->Get**DropDownStyle**(); | | C | **HRESULT** *object*->get_**DropDownStyle**(**enum SftButtonDropDownStyleConstants*** *Style*); | Put | | | | --- | --- | | VB.NET | *object*.**DropDownStyle** = *Style* **As SftButtonDropDownStyleConstants** | | VB | *object*.**DropDownStyle** = *Style* **As SftButtonDropDownStyleConstants** | | C#.NET | **SftButtonDropDownStyleConstants** *object*.**DropDownStyle** = *Style*; | | VC++ | **enum SftButtonDropDownStyleConstants** *object*->**DropDownStyle** = *Style*;
**void** *object*->Put**DropDownStyle**(**enum SftButtonDropDownStyleConstants** *Style*); | | C | **HRESULT** *object*->put_**DropDownStyle**(**enum SftButtonDropDownStyleConstants** *Style*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Style Defines the width of the drop down button. | Name | Value | Description | | --- | --- | --- | | dropdownstyleSftButtonStandard | 0 | Standard - The width of the drop down button is equivalent to the width of a vertical scroll bar button. | | dropdownstyleSftButtonNarrow1 | 1 | Narrow1 - The width of the drop down button is 3/4 the width of a vertical scroll bar button. | | dropdownstyleSftButtonNarrow2 | 2 | Narrow2 - The width of the drop down button is 2/3 the width of a vertical scroll bar button. | | dropdownstyleSftButtonNarrow3 | 3 | Narrow3 - The width of the drop down button is 1/2 the width of a vertical scroll bar button. | | dropdownstyleSftButtonWide1 | 4 | Wide1 - The width of the drop down button is 50% wider than a vertical scroll bar button. | ### Comments The DropDownStyle property defines the width of the drop down button. The [ShowDropDown](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ShowDropDown) property defines whether the drop down button is displayed. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## DropDownToggle Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_DropDownToggle* Defines whether the [drop down button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_dropdown) is a [toggle button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_toggle). ### Syntax Get | | | | --- | --- | | VB.NET | *Boolean* = *object*.**DropDownToggle** **As Boolean** | | VB | *Boolean* = *object*.**DropDownToggle** **As Boolean** | | C#.NET | **bool** *Boolean* = *object*.**DropDownToggle**; | | VC++ | **VARIANT_BOOL** *Boolean* = *object*->**DropDownToggle**;
**VARIANT_BOOL** *Boolean* = *object*->Get**DropDownToggle**(); | | C | **HRESULT** *object*->get_**DropDownToggle**(**VARIANT_BOOL*** *Boolean*); | Put | | | | --- | --- | | VB.NET | *object*.**DropDownToggle** = *Boolean* **As Boolean** | | VB | *object*.**DropDownToggle** = *Boolean* **As Boolean** | | C#.NET | **bool** *object*.**DropDownToggle** = *Boolean*; | | VC++ | **VARIANT_BOOL** *object*->**DropDownToggle** = *Boolean*;
**void** *object*->Put**DropDownToggle**(**VARIANT_BOOL** *Boolean*); | | C | **HRESULT** *object*->put_**DropDownToggle**(**VARIANT_BOOL** *Boolean*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Boolean Defines whether the drop down button is a toggle button. | Boolean | Description | | --- | --- | | True | The drop down button is a toggle button. | | False | The drop down button is not a toggle button and automatically returns to its released state after being pressed. | ### Comments The DropDownToggle property defines whether the drop down button is a toggle button. Once the mouse button is released after clicking a button, a button usually returns to its released position (i.e., not pressed). By defining the drop down button as a toggle button using the DropDownToggle property, the drop down button can instead act as an on/off switch. Each mouse click will alternate between the pressed and released positions. The status of the drop down button can be defined using the [DropDownPressed](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_DropDownPressed) property. The button portion is controlled by the equivalent [Toggle](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Toggle) property. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Enabled Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Enabled* Defines whether the control responds to user-generated events. ### Syntax Get | | | | --- | --- | | VB.NET | *Boolean* = *object*.**Enabled** **As Boolean** | | VB | *Boolean* = *object*.**Enabled** **As Boolean** | | C#.NET | **bool** *Boolean* = *object*.**Enabled**; | | VC++ | **VARIANT_BOOL** *Boolean* = *object*->**Enabled**;
**VARIANT_BOOL** *Boolean* = *object*->Get**Enabled**(); | | C | **HRESULT** *object*->get_**Enabled**(**VARIANT_BOOL*** *Boolean*); | Put | | | | --- | --- | | VB.NET | *object*.**Enabled** = *Boolean* **As Boolean** | | VB | *object*.**Enabled** = *Boolean* **As Boolean** | | C#.NET | **bool** *object*.**Enabled** = *Boolean*; | | VC++ | **VARIANT_BOOL** *object*->**Enabled** = *Boolean*;
**void** *object*->Put**Enabled**(**VARIANT_BOOL** *Boolean*); | | C | **HRESULT** *object*->put_**Enabled**(**VARIANT_BOOL** *Boolean*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Boolean Defines whether the control responds to user-generated events. | Boolean | Description | | --- | --- | | True | The control responds to user-generated events. | | False | The control is disabled and does not respond to user-generated events. It is painted in a "grayed" style. | ### Comments The Enabled property defines whether the control responds to user-generated events. If the control is disabled, it uses the colors specified for the disabled state (usually containing the text "Grayed") and picture components defined using bitmaps are displayed in a grayed fashion. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## DataObject.Files Property *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/DataObject_Files* A collection of filenames used by the sftCFFiles format. ### Syntax Get | | | | --- | --- | | VB.NET | *Files* = *object*.**Files** **As [DataObjectFiles](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_DataObjectFiles)** | | VB | **Set** *Files* = *object*.**Files** **As DataObjectFiles** | | C#.NET | **DataObjectFiles** *Files* = *object*.**Files**; | | VC++ | **IVDMDataObjectFiles*** *Files* = *object*->**Files**;
**IVDMDataObjectFiles*** *Files* = *object*->Get**Files**(); | | C | **HRESULT** *object*->get_**Files**(**struct IVDMDataObjectFiles**** *Files*); | object A [DataObject object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_DataObject). Files Returns a DataObjectFiles object reference which can be used to access the file names in the collection. ### Comments The Files property contains a collection of filenames used by the sftCFFiles format. The Files collection is filled with file names only when the DataObject object contains data of type sftCFFiles. The DataObject object can contain several different types of data. You can iterate through the [Item](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/DataObjectFiles_Item) property to retrieve the list of file names. The Files collection can be filled to allow an application to act as a drag source for a list of files (similar to Windows Explorer). See Also DataObject Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## FillOrientation Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_FillOrientation* Defines the gradient fill orientation. ### Syntax Get | | | | --- | --- | | VB.NET | *FillOrientation* = *object*.**FillOrientation** **As [SftButtonOrientationConstants](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonOrientationConstants)** | | VB | *FillOrientation* = *object*.**FillOrientation** **As SftButtonOrientationConstants** | | C#.NET | **SftButtonOrientationConstants** *FillOrientation* = *object*.**FillOrientation**; | | VC++ | **enum SftButtonOrientationConstants** *FillOrientation* = *object*->**FillOrientation**;
**enum SftButtonOrientationConstants** *FillOrientation* = *object*->Get**FillOrientation**(); | | C | **HRESULT** *object*->get_**FillOrientation**(**enum SftButtonOrientationConstants*** *FillOrientation*); | Put | | | | --- | --- | | VB.NET | *object*.**FillOrientation** = *FillOrientation* **As SftButtonOrientationConstants** | | VB | *object*.**FillOrientation** = *FillOrientation* **As SftButtonOrientationConstants** | | C#.NET | **SftButtonOrientationConstants** *object*.**FillOrientation** = *FillOrientation*; | | VC++ | **enum SftButtonOrientationConstants** *object*->**FillOrientation** = *FillOrientation*;
**void** *object*->Put**FillOrientation**(**enum SftButtonOrientationConstants** *FillOrientation*); | | C | **HRESULT** *object*->put_**FillOrientation**(**enum SftButtonOrientationConstants** *FillOrientation*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). FillOrientation Defines the gradient fill orientation. | Name | Value | Description | | --- | --- | --- | | orientationSftButtonHorizontal | 0 | Horizontal - Areas are filled horizontally, left to right. | | orientationSftButtonVertical | 1 | Vertical - Areas are filled vertically, top to bottom. | ### Comments The FillOrientation property defines the gradient fill orientation. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## FocusIn Event, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_FocusIn* The control receives the input focus. ### Syntax | | | | --- | --- | | VB.NET | **Private Sub** *object*_**FocusIn**(**ByVal** *sender* **As Object**, **ByVal** *e* **As ***[EventArgumentType](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/r_EventArgumentType)*) **Handles** *object*.**FocusIn** | | VB | **Private Sub** *object*_**FocusIn**() | | C#.NET | **void** *object*_**FocusIn**(**object** *sender*, *EventArgumentType e*); | | VC++ | **void** On**FocusIn***object*(); | | C | **HRESULT** On**FocusIn***object*(); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). ### Comments The FocusIn event occurs when the control receives the input focus. Usually containers such as Visual Basic provide their own events which signal that a control receives or loses the input focus. .NET offers the Enter and Leave events, Visual Basic offers the GotFocus and LostFocus events. Visual C++ applications can handle the WM_SETFOCUS and WM_KILLFOCUS Windows messages (OnSetFocus and OnKillFocus). For containers where such a facility is not available, the FocusIn and [FocusOut](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_FocusOut) events can be used instead. It is preferable to use events or mechanisms offered by the container rather than the FocusIn or FocusOut events. Changing the input focus to another control or window while handling this event is not supported (including display of message boxes). See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## FocusOut Event, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_FocusOut* The control loses the input focus. ### Syntax | | | | --- | --- | | VB.NET | **Private Sub** *object*_**FocusOut**(**ByVal** *sender* **As Object**, **ByVal** *e* **As ***[EventArgumentType](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/r_EventArgumentType)*) **Handles** *object*.**FocusOut** | | VB | **Private Sub** *object*_**FocusOut**() | | C#.NET | **void** *object*_**FocusOut**(**object** *sender*, *EventArgumentType e*); | | VC++ | **void** On**FocusOut***object*(); | | C | **HRESULT** On**FocusOut***object*(); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). ### Comments The FocusOut event occurs when the control loses the input focus. Usually containers such as Visual Basic provide their own events which signal that a control receives or loses the input focus. .NET offers the Enter and Leave events, Visual Basic offers the GotFocus and LostFocus events. Visual C++ applications can handle the WM_SETFOCUS and WM_KILLFOCUS Windows messages (OnSetFocus and OnKillFocus). For containers where such a facility is not available, the [FocusIn](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_FocusIn) and FocusOut events can be used instead. It is preferable to use events or mechanisms offered by the container rather than the FocusIn or FocusOut events. Changing the input focus to another control or window while handling this event is not supported (including display of message boxes). See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Follows Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Follows* Defines whether the button follows [drop down button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_dropdown) clicks. ### Syntax Get | | | | --- | --- | | VB.NET | *Boolean* = *object*.**Follows** **As Boolean** | | VB | *Boolean* = *object*.**Follows** **As Boolean** | | C#.NET | **bool** *Boolean* = *object*.**Follows**; | | VC++ | **VARIANT_BOOL** *Boolean* = *object*->**Follows**;
**VARIANT_BOOL** *Boolean* = *object*->Get**Follows**(); | | C | **HRESULT** *object*->get_**Follows**(**VARIANT_BOOL*** *Boolean*); | Put | | | | --- | --- | | VB.NET | *object*.**Follows** = *Boolean* **As Boolean** | | VB | *object*.**Follows** = *Boolean* **As Boolean** | | C#.NET | **bool** *object*.**Follows** = *Boolean*; | | VC++ | **VARIANT_BOOL** *object*->**Follows** = *Boolean*;
**void** *object*->Put**Follows**(**VARIANT_BOOL** *Boolean*); | | C | **HRESULT** *object*->put_**Follows**(**VARIANT_BOOL** *Boolean*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Boolean Defines whether the button follows drop down button clicks. | Boolean | Description | | --- | --- | | True | If the drop down button is pressed or released, the button portion is also displayed in the same position. | | False | If the drop down button is pressed or released, this has no effect on the button portion. | ### Comments The Follows property defines whether the button follows drop down button clicks. The button and drop down button portion are usually independent, but using the Follows or [DropDownFollows](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_DropDownFollows) properties, one can mimic the state of the other. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Font Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Font* Defines the font used to display text. ### Syntax Get | | | | --- | --- | | VB.NET | *refFontObj* = *object*.**Font** **As System.Drawing.Font[![\](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_dotnet)** | | VB | **Set** *refFontObj* = *object*.**Font** **As IFontDisp** | | C#.NET | **System.Drawing.Font![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *refFontObj* = *object*.**Font**; | | VC++ | **IFontDisp*** *refFontObj* = *object*->Get**Font**(); | | C | **HRESULT** *object*->get_**Font**(**IFontDisp**** *refFontObj*); | Put | | | | --- | --- | | VB.NET | *object*.let_**Font**(**ByVal** *refFontObj* **As System.Drawing.Font![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)**) | | VB | *object*.**Font** = *refFontObj* **As IFontDisp** | | C#.NET | **void** *object*.let_**Font**(**System.Drawing.Font![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *refFontObj*); | | VC++ | **void** *object*->Put**Font**(**IFontDisp*** *refFontObj*); | | C | **HRESULT** *object*->put_**Font**(**IFontDisp*** *refFontObj*); | PutRef | | | | --- | --- | | VB.NET | *object*.**Font** = *refFontObj* **As System.Drawing.Font![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** | | VB | **Set** *object*.**Font** = *refFontObj* **As IFontDisp** | | C#.NET | **System.Drawing.Font![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *object*.**Font** = *refFontObj*; | | VC++ | **void** *object*->PutRef**Font**(**IFontDisp*** *refFontObj*); | | C | **HRESULT** *object*->putref_**Font**(**IFontDisp*** *refFontObj*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). refFontObj Defines the font used to display text. For information about font properties, please visit the applicable section "[Using SftButton/OCX with ...](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using)". ### Comments The Font property defines the font used to display text. Using *PutRef* (see *Syntax* above) the control will use the reference to the Font object. If the Font object is later changed, this will also affect the font used by the control. Using *Put* instead, causes the control to create a copy of the Font object. If the Font object is later changed, this will not affect the font used by the control as it uses a copy of the object. Because of the additional overhead and the increased resource use of *Put*, *PutRef* is the preferred method. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## ForeColor Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ForeColor* Defines the control's text color. ### Syntax Get | | | | --- | --- | | VB.NET | *Clr* = *object*.**ForeColor** **As System.Drawing.Color[![\](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_dotnet)**
*Clr* = *object*.**CtlForeColor** **As System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** | | VB | *Clr* = *object*.**ForeColor** **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *Clr* = *object*.**ForeColor**;
**System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *Clr* = *object*.**CtlForeColor**; | | VC++ | **OLE_COLOR** *Clr* = *object*->**ForeColor**;
**OLE_COLOR** *Clr* = *object*->Get**ForeColor**(); | | C | **HRESULT** *object*->get_**ForeColor**(**OLE_COLOR*** *Clr*); | Put | | | | --- | --- | | VB.NET | *object*.**ForeColor** = *Clr* **As System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)**
*object*.**CtlForeColor** = *Clr* **As System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** | | VB | *object*.**ForeColor** = *Clr* **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *object*.**ForeColor** = *Clr*;
**System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *object*.**CtlForeColor** = *Clr*; | | VC++ | **OLE_COLOR** *object*->**ForeColor** = *Clr*;
**void** *object*->Put**ForeColor**(**OLE_COLOR** *Clr*); | | C | **HRESULT** *object*->put_**ForeColor**(**OLE_COLOR** *Clr*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Clr Defines the control's text color. For information about color properties, please visit the applicable section "[Using SftButton/OCX with ...](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using)". ### Comments The ForeColor property defines the control's text color. > If [Windows themes](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_themes) are used, the ForeColor property has no effect, unless [UseThemes](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_UseThemes) is set to 2 - Yes (Exclude Text). The defined color is used to display the text defined using the [Text](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Text) property. If the button is pressed, the color [ForeColorPressed](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ForeColorPressed) is used instead. If the control is disabled (see [Enabled](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Enabled) property), the foreground color defined using the [ForeColorGrayed](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ForeColorGrayed) property is used instead. The foreground color of the drop down arrow is defined using the [ForeColorDownArrow](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ForeColorDownArrow) property. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## ForeColorDownArrow Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ForeColorDownArrow* Defines the foreground color for the drop down arrow. ### Syntax Get | | | | --- | --- | | VB.NET | *Clr* = *object*.**ForeColorDownArrow** **As System.Drawing.Color[![\](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_dotnet)** | | VB | *Clr* = *object*.**ForeColorDownArrow** **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *Clr* = *object*.**ForeColorDownArrow**; | | VC++ | **OLE_COLOR** *Clr* = *object*->**ForeColorDownArrow**;
**OLE_COLOR** *Clr* = *object*->Get**ForeColorDownArrow**(); | | C | **HRESULT** *object*->get_**ForeColorDownArrow**(**OLE_COLOR*** *Clr*); | Put | | | | --- | --- | | VB.NET | *object*.**ForeColorDownArrow** = *Clr* **As System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** | | VB | *object*.**ForeColorDownArrow** = *Clr* **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *object*.**ForeColorDownArrow** = *Clr*; | | VC++ | **OLE_COLOR** *object*->**ForeColorDownArrow** = *Clr*;
**void** *object*->Put**ForeColorDownArrow**(**OLE_COLOR** *Clr*); | | C | **HRESULT** *object*->put_**ForeColorDownArrow**(**OLE_COLOR** *Clr*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Clr Defines the foreground color for the drop down arrow. For information about color properties, please visit the applicable section "[Using SftButton/OCX with ...](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using)". ### Comments The ForeColorDownArrow property defines the foreground color for the drop down arrow. > This property has no effect if [Windows themes](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_themes) are used. If the control is disabled (see [Enabled](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Enabled) property), the foreground color defined using the [ForeColorGrayed](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ForeColorGrayed) property is used instead. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## ForeColorGrayed Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ForeColorGrayed* Defines the control's text color when disabled. ### Syntax Get | | | | --- | --- | | VB.NET | *Clr* = *object*.**ForeColorGrayed** **As System.Drawing.Color[![\](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_dotnet)** | | VB | *Clr* = *object*.**ForeColorGrayed** **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *Clr* = *object*.**ForeColorGrayed**; | | VC++ | **OLE_COLOR** *Clr* = *object*->**ForeColorGrayed**;
**OLE_COLOR** *Clr* = *object*->Get**ForeColorGrayed**(); | | C | **HRESULT** *object*->get_**ForeColorGrayed**(**OLE_COLOR*** *Clr*); | Put | | | | --- | --- | | VB.NET | *object*.**ForeColorGrayed** = *Clr* **As System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** | | VB | *object*.**ForeColorGrayed** = *Clr* **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *object*.**ForeColorGrayed** = *Clr*; | | VC++ | **OLE_COLOR** *object*->**ForeColorGrayed** = *Clr*;
**void** *object*->Put**ForeColorGrayed**(**OLE_COLOR** *Clr*); | | C | **HRESULT** *object*->put_**ForeColorGrayed**(**OLE_COLOR** *Clr*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Clr Defines the control's text color when disabled. For information about color properties, please visit the applicable section "[Using SftButton/OCX with ...](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using)". ### Comments The ForeColorGrayed property defines the control's text color when disabled. > If [Windows themes](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_themes) are used, the ForeColorGrayed property has no effect, unless [UseThemes](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_UseThemes) is set to 2 - Yes (Exclude Text). The defined color is used to display the text defined using the [Text](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Text) property and the drop down arrow. If the control is enabled, the foreground colors defined using the [ForeColor](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ForeColor) and [ForeColorDownArrow](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ForeColorDownArrow) properties are used instead. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## ForeColorPressed Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ForeColorPressed* Defines the control's text color when pressed. ### Syntax Get | | | | --- | --- | | VB.NET | *Clr* = *object*.**ForeColorPressed** **As System.Drawing.Color[![\](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_dotnet)** | | VB | *Clr* = *object*.**ForeColorPressed** **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *Clr* = *object*.**ForeColorPressed**; | | VC++ | **OLE_COLOR** *Clr* = *object*->**ForeColorPressed**;
**OLE_COLOR** *Clr* = *object*->Get**ForeColorPressed**(); | | C | **HRESULT** *object*->get_**ForeColorPressed**(**OLE_COLOR*** *Clr*); | Put | | | | --- | --- | | VB.NET | *object*.**ForeColorPressed** = *Clr* **As System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** | | VB | *object*.**ForeColorPressed** = *Clr* **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *object*.**ForeColorPressed** = *Clr*; | | VC++ | **OLE_COLOR** *object*->**ForeColorPressed** = *Clr*;
**void** *object*->Put**ForeColorPressed**(**OLE_COLOR** *Clr*); | | C | **HRESULT** *object*->put_**ForeColorPressed**(**OLE_COLOR** *Clr*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Clr Defines the control's text color when pressed. For information about color properties, please visit the applicable section "[Using SftButton/OCX with ...](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using)". ### Comments The ForeColorPressed property defines the control's text color when pressed. > If [Windows themes](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_themes) are used, the ForeColorPressed property has no effect, unless [UseThemes](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_UseThemes) is set to 2 - Yes (Exclude Text). The defined color is used to display the text defined using the [Text](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Text) property. If the button is released, the color [ForeColor](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ForeColor) is used instead. If the control is disabled (see [Enabled](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Enabled) property), the foreground color defined using the [ForeColorGrayed](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ForeColorGrayed) property is used instead. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## FrameColor Property, SftPictureObject Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_FrameColor* Defines the border color of the [color sample](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_SetColorSample). ### Syntax Get | | | | --- | --- | | VB.NET | *Clr* = *object*.**FrameColor** **As UInteger[![\](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_dotnet)** | | VB | *Clr* = *object*.**FrameColor** **As OLE_COLOR** | | C#.NET | **uint![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *Clr* = *object*.**FrameColor**; | | VC++ | **OLE_COLOR** *Clr* = *object*->**FrameColor**;
**OLE_COLOR** *Clr* = *object*->Get**FrameColor**(); | | C | **HRESULT** *object*->get_**FrameColor**(**OLE_COLOR*** *Clr*); | Put | | | | --- | --- | | VB.NET | *object*.**FrameColor** = *Clr* **As UInteger![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** | | VB | *object*.**FrameColor** = *Clr* **As OLE_COLOR** | | C#.NET | **uint![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *object*.**FrameColor** = *Clr*; | | VC++ | **OLE_COLOR** *object*->**FrameColor** = *Clr*;
**void** *object*->Put**FrameColor**(**OLE_COLOR** *Clr*); | | C | **HRESULT** *object*->put_**FrameColor**(**OLE_COLOR** *Clr*); | object A [SftPictureObject object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject). Clr Defines the border color of the color sample. Specify -1 to omit the border of the color sample. For information about color properties, please visit the applicable section "[Using SftButton/OCX with ...](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using)". ### Comments The FrameColor property defines the border color of the color sample. The SftPictureObject.[Type](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Type) property is set to sftTypeColorSample. The SftPictureObject.[Height](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Height) and SftPictureObject.[Width](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Width) properties should be used to define the requested image size. The SftPictureObject.[SampleColor](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_SampleColor) property can be used to define the sample color. See Also SftPictureObject Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## GetColorSample Method, SftPictureObject Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_GetColorSample* Retrieves the picture object attributes defined as a [color sample](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_SetColorSample). ### Syntax | | | | --- | --- | | VB.NET | *object*.**GetColorSample**(**ByRef** *SampleColor* **As UInteger[![\](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_dotnet)**, **ByRef** *FrameColor* **As UInteger![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)**) | | VB | *object*.**GetColorSample**(*SampleColor* **As OLE_COLOR**, *FrameColor* **As OLE_COLOR**) | | C#.NET | **void** *object*.**GetColorSample**(**out** **uint![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *SampleColor*, **out** **uint![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *FrameColor*); | | VC++ | **HRESULT** *object*->**GetColorSample**(**OLE_COLOR*** *SampleColor*, **OLE_COLOR*** *FrameColor*); | | C | **HRESULT** *object*->raw_**GetColorSample**(**OLE_COLOR*** *SampleColor*, **OLE_COLOR*** *FrameColor*); | object A [SftPictureObject object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject). SampleColor Returns the current sample color. For information about color properties, please visit the applicable section "[Using SftButton/OCX with ...](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using)". FrameColor Returns the current border color. For information about color properties, please visit the applicable section "Using SftButton/OCX with ...". ### Comments The GetColorSample method retrieves the picture object attributes defined as a color sample. If the current picture object is not a color sample (SftPictureObject.[Type](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Type) other than sftTypeColorSample), the returned color values are not valid. The color sample is defined using the SftPictureObject.[SampleColor](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_SampleColor), SftPictureObject.[FrameColor](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_FrameColor), SftPictureObject.[Width](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Width), SftPictureObject.[Height](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Height) properties or using the SftPictureObject.SetColorSample method. See Also SftPictureObject Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## DataObject.GetData Method *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/DataObject_GetData* Retrieves data of a specified format from a [DataObject](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_DataObject) object. ### Syntax | | | | --- | --- | | VB.NET | *Data* = *object*.**GetData**([ **ByVal** *Format* **As Object** ] ) **As Object** | | VB | *Data* = *object*.**GetData**([ **ByVal** *Format* **As Variant** ] ) **As Variant** | | C#.NET | **object** *Data* = *object*.**GetData**(**object** *Format*); | | VC++ | **_variant_t** *Data* = *object*->**GetData**(**const _variant_t**&**** *Format* = **vtMissing**); | | C | **HRESULT** *object*->raw_**GetData**(**VARIANT** *Format*, **VARIANT*** *Data*); | object A DataObject object. Format The data format requested. The *Format* argument is optional. If *Format* is not specified, GetData returns data in a suitable format. | Name | Value | Description | | --- | --- | --- | | sftCFText | 1 | Text (as String value) | | sftCFBitmap | 2 | Bitmap (as Picture object) | | sftCFMetafile | 3 | Metafile (as Picture object) | | sftCFDIB | 8 | Device independent bitmap (as Picture object) | | sftCFFiles | 15 | List of files. GetData cannot be used to retrieve this format. Use the Files collection instead. | | sftCFRTF | -16639 | Rich text format (as String value) | Data Retrieves data of a specified format from a DataObject object. ### Comments The GetData method retrieves data of a specified format from a DataObject object. It is possible for the GetData and [SetData](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/DataObject_SetData) methods to use data formats other than those listed as valid *Format* argument, including user-defined formats registered with Windows via the RegisterClipboardFormat() API function. The SetData method requires the data to be in the form of a byte array when it does not recognize the data format specified. The GetData method always returns data in a byte array when it is in a format that it doesn't recognize, although this may be transparently converted into other data types, such as strings. The byte array returned by GetData will be larger than the actual data when running on some operating systems, with arbitrary bytes at the end of the array. This allocation of memory is often larger than is actually required for the data. Therefore, there may be extraneous bytes near the end of the allocated memory segment. See Also DataObject Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## DataObject.GetFormat Method *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/DataObject_GetFormat* Determines if a specified clipboard format is supported by the [DataObject](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_DataObject) object. ### Syntax | | | | --- | --- | | VB.NET | *FormatSupported* = *object*.**GetFormat**(**ByVal** *Format* **As Short**) **As Boolean** | | VB | *FormatSupported* = *object*.**GetFormat**(**ByVal** *Format* **As Integer**) **As Boolean** | | C#.NET | **bool** *FormatSupported* = *object*.**GetFormat**(**short** *Format*); | | VC++ | **VARIANT_BOOL** *FormatSupported* = *object*->**GetFormat**(**short** *Format*); | | C | **HRESULT** *object*->raw_**GetFormat**(**short** *Format*, **VARIANT_BOOL*** *FormatSupported*); | object A DataObject object. Format The data format requested. | Name | Value | Description | | --- | --- | --- | | sftCFText | 1 | Text | | sftCFBitmap | 2 | Bitmap | | sftCFMetafile | 3 | Metafile | | sftCFDIB | 8 | Device independent bitmap | | sftCFFiles | 15 | List of files | | sftCFRTF | -16639 | Rich text format | FormatSupported The GetFormat method returns True if a data format in the DataObject object matches the specified format. Otherwise, it returns False. ### Comments The GetFormat method determines if a specified clipboard format is supported by the DataObject object. See Also DataObject Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## GetImage Method, SftPictureObject Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_GetImage* Retrieves the picture object attributes defined as a [GDI+](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_gdiplus) image. ### Syntax | | | | --- | --- | | VB.NET | *object*.**GetImage**(**ByRef** *GDIPlusImage* **As Integer**, **ByRef** *Owned* **As Boolean**) | | VB | *object*.**GetImage**(*GDIPlusImage* **As LONG_PTR**, *Owned* **As Boolean**) | | C#.NET | **void** *object*.**GetImage**(**out** **int** *GDIPlusImage*, **out** **bool** *Owned*); | | VC++ | **HRESULT** *object*->**GetImage**(**LONG_PTR*** *GDIPlusImage*, **VARIANT_BOOL*** *Owned*); | | C | **HRESULT** *object*->raw_**GetImage**(**LONG_PTR*** *GDIPlusImage*, **VARIANT_BOOL*** *Owned*); | object A [SftPictureObject object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject). GDIPlusImage Returns a pointer to a Gdiplus::Image object. Owned Returns True if the GDI+ image is owned by the control, False otherwise. ### Comments The GetImage method retrieves the picture object attributes defined as a GDI+ image. [SetImage](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_SetImage) can be used to assign ownership of a GDI+ image to the control, so it automatically deletes the object when it is no longer needed. This is typically only used by C++ applications that have direct access to GDI+ classes. If the current picture object is not based on an ImageList (SftPictureObject.[Type](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Type) other than sftTypeGDIPlus), the returned values are not valid. See Also SftPictureObject Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## GetImageList Method, SftPictureObject Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_GetImageList* Retrieves the picture object attributes defined as an ImageList image. ### Syntax | | | | --- | --- | | VB.NET | *object*.**GetImageList**(**ByRef** *ImageList* **As Object**, **ByRef** *ImageIndex* **As Short**) | | VB | *object*.**GetImageList**(*ImageList* **As Object**, *ImageIndex* **As Integer**) | | C#.NET | **void** *object*.**GetImageList**(**out** **object** *ImageList*, **out** **short** *ImageIndex*); | | VC++ | **HRESULT** *object*->**GetImageList**(**LPDISPATCH*** *ImageList*, **short*** *ImageIndex*); | | C | **HRESULT** *object*->raw_**GetImageList**(**LPDISPATCH*** *ImageList*, **short*** *ImageIndex*); | object A [SftPictureObject object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject). ImageList Returns the ImageList control. ImageIndex Returns the one-based index of the image in the ImageList control used as graphic. ### Comments The GetImageList method retrieves the picture object attributes defined as an ImageList image. GetImageList only supports ActiveX ImageList controls that offer an IImageList interface. [GetImageListH](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_GetImageListH) and [SetImageListH](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_SetImageListH) support a window handle based ImageList control (Common Controls). If the current picture object is not based on an ImageList (SftPictureObject.[Type](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Type) other than sftTypeImageList), the returned values are not valid. See Also SftPictureObject Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## GetImageListH Method, SftPictureObject Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_GetImageListH* Retrieves the picture object attributes defined as an ImageList image. ### Syntax | | | | --- | --- | | VB.NET | *object*.**GetImageListH**(**ByRef** *ImageListWindow* **As Integer**, **ByRef** *ImageIndex* **As Short**) | | VB | *object*.**GetImageListH**(*ImageListWindow* **As OLE_HANDLE**, *ImageIndex* **As Integer**) | | C#.NET | **void** *object*.**GetImageListH**(**out** **int** *ImageListWindow*, **out** **short** *ImageIndex*); | | VC++ | **HRESULT** *object*->**GetImageListH**(**OLE_HANDLE*** *ImageListWindow*, **short*** *ImageIndex*); | | C | **HRESULT** *object*->raw_**GetImageListH**(**OLE_HANDLE*** *ImageListWindow*, **short*** *ImageIndex*); | object A [SftPictureObject object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject). ImageListWindow Returns the ImageList control handle. ImageIndex Returns the one-based index of the image in the ImageList control used as graphic. ### Comments The GetImageListH method retrieves the picture object attributes defined as an ImageList image. If the current picture object is not based on an ImageList (SftPictureObject.[Type](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Type) other than sftTypeImageListH), the returned values are not valid. See Also SftPictureObject Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## GDIPlusSupport Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_GDIPlusSupport* Returns whether [GDI+](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_gdiplus) support is available. ### Syntax Get | | | | --- | --- | | VB.NET | *Boolean* = *object*.**GDIPlusSupport** **As Boolean** | | VB | *Boolean* = *object*.**GDIPlusSupport** **As Boolean** | | C#.NET | **bool** *Boolean* = *object*.**GDIPlusSupport**; | | VC++ | **VARIANT_BOOL** *Boolean* = *object*->**GDIPlusSupport**;
**VARIANT_BOOL** *Boolean* = *object*->Get**GDIPlusSupport**(); | | C | **HRESULT** *object*->get_**GDIPlusSupport**(**VARIANT_BOOL*** *Boolean*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Boolean Returns whether GDI+ support is available. | Boolean | Description | | --- | --- | | True | GDI+ support is available. | | False | GDI+ support is not available. | ### Comments The GDIPlusSupport property returns whether GDI+ support is available. The [SftPictureObject](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject).[Image](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Image) and [NETImageObject](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_NETImageObject) properties require GDI+ support. For information about [distributing](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_distributing) GDI+ with your application, please see "Distributing SftButton/OCX". An application can use the [GDIPlusSupport](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_GDIPlusSupport) property to determine at run-time whether GDI+ support is available and use advanced image features, based on the SftPictureObject Image property, if GDI+ is available. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## GetPosition Method, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_GetPosition* Returns the position and dimensions of an area of the control. ### Syntax | | | | --- | --- | | VB.NET | *object*.**GetPosition**(**ByVal** *Area* **As [SftButtonAreaConstants](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonAreaConstants)**, **ByRef** *Left* **As Single**, **ByRef** *Top* **As Single**, **ByRef** *Width* **As Single**, **ByRef** *Height* **As Single**) | | VB | *object*.**GetPosition**(**ByVal** *Area* **As SftButtonAreaConstants**, *Left* **As Single**, *Top* **As Single**, *Width* **As Single**, *Height* **As Single**) | | C#.NET | **void** *object*.**GetPosition**(**SftButtonAreaConstants** *Area*, **out** **float** *Left*, **out** **float** *Top*, **out** **float** *Width*, **out** **float** *Height*); | | VC++ | **HRESULT** *object*->**GetPosition**(**enum SftButtonAreaConstants** *Area*, **float*** *Left*, **float*** *Top*, **float*** *Width*, **float*** *Height*); | | C | **HRESULT** *object*->raw_**GetPosition**(**enum SftButtonAreaConstants** *Area*, **float*** *Left*, **float*** *Top*, **float*** *Width*, **float*** *Height*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Area Describes the area whose position is to be returned. | Name | Value | Description | | --- | --- | --- | | areaSftButtonButton | 0 | The position and dimensions of the button area are returned. | | areaSftButtonDropDown | 1 | The position and dimensions of the [drop down button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_dropdown) area are returned. | Left Returns the horizontal position of the desired *Area*, relative to the top, left corner of the control. The unit used depend on the container used (e.g., Visual Basic uses TWIPS by default, Visual C++ uses pixels). Top Returns the vertical position of the desired *Area*, relative to the top, left corner of the control. The unit used depend on the container used (e.g., Visual Basic uses TWIPS by default, Visual C++ uses pixels). Width Returns the width of the *Area*. The unit used depend on the container used (e.g., Visual Basic uses TWIPS by default, Visual C++ uses pixels). Height Returns the heightof the desired *Area*. The unit used depend on the container used (e.g., Visual Basic uses TWIPS by default, Visual C++ uses pixels). ### Comments The GetPosition method returns the position and dimensions of an area of the control. The exact position and size for a given area (described by *Area*) is returned. If an area is not available, the *Width* and *Height* values are 0. GetPosition uses the units native to the container application (e.g., Visual Basic uses TWIPS by default, Visual C++ uses pixels). [GetPositionPix](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_GetPositionPix) always uses pixels. [GetPositionV](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_GetPositionV) should be used when using Internet Explorer. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## GetPositionPix Method, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_GetPositionPix* Returns the position and dimensions of an area of the control. ### Syntax | | | | --- | --- | | VB.NET | *object*.**GetPositionPix**(**ByVal** *Area* **As [SftButtonAreaConstants](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonAreaConstants)**, **ByRef** *LeftPix* **As Integer**, **ByRef** *TopPix* **As Integer**, **ByRef** *WidthPix* **As Integer**, **ByRef** *HeightPix* **As Integer**) | | VB | *object*.**GetPositionPix**(**ByVal** *Area* **As SftButtonAreaConstants**, *LeftPix* **As Long**, *TopPix* **As Long**, *WidthPix* **As Long**, *HeightPix* **As Long**) | | C#.NET | **void** *object*.**GetPositionPix**(**SftButtonAreaConstants** *Area*, **out** **int** *LeftPix*, **out** **int** *TopPix*, **out** **int** *WidthPix*, **out** **int** *HeightPix*); | | VC++ | **HRESULT** *object*->**GetPositionPix**(**enum SftButtonAreaConstants** *Area*, **long*** *LeftPix*, **long*** *TopPix*, **long*** *WidthPix*, **long*** *HeightPix*); | | C | **HRESULT** *object*->raw_**GetPositionPix**(**enum SftButtonAreaConstants** *Area*, **long*** *LeftPix*, **long*** *TopPix*, **long*** *WidthPix*, **long*** *HeightPix*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Area Describes the area whose position is to be returned. | Name | Value | Description | | --- | --- | --- | | areaSftButtonButton | 0 | The position and dimensions of the button area are returned. | | areaSftButtonDropDown | 1 | The position and dimensions of the [drop down button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_dropdown) area are returned. | LeftPix Returns the horizontal position of the desired *Area* in pixels, relative to the top, left corner of the control. TopPix Returns the vertical position of the desired *Area* in pixels, relative to the top, left corner of the control. WidthPix Returns the width of the *Area* in pixels. HeightPix Returns the heightof the desired *Area* in pixels. ### Comments The GetPositionPix method returns the position and dimensions of an area of the control. The exact position and size for a given area (described by *Area*) is returned. If an area is not available, the *WidthPix* and *Height**Pix* values are 0. [GetPosition](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_GetPosition) uses the units native to the container application (e.g., Visual Basic uses TWIPS by default, Visual C++ uses pixels). GetPositionPix always uses pixels. [GetPositionV](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_GetPositionV) should be used when using Internet Explorer. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## GetPositionV Method, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_GetPositionV* Returns the position and dimensions of an area of the control. ### Syntax | | | | --- | --- | | VB.NET | *object*.**GetPositionV**(**ByVal** *Area* **As [SftButtonAreaConstants](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonAreaConstants)**, **ByRef** *Left* **As Object**, **ByRef** *Top* **As Object**, **ByRef** *Width* **As Object**, **ByRef** *Height* **As Object**) | | VB | *object*.**GetPositionV**(**ByVal** *Area* **As SftButtonAreaConstants**, *Left* **As Variant**, *Top* **As Variant**, *Width* **As Variant**, *Height* **As Variant**) | | C#.NET | **void** *object*.**GetPositionV**(**SftButtonAreaConstants** *Area*, **out** **object** *Left*, **out** **object** *Top*, **out** **object** *Width*, **out** **object** *Height*); | | VC++ | **HRESULT** *object*->**GetPositionV**(**enum SftButtonAreaConstants** *Area*, **const _variant_t**&***** *Left*, **const _variant_t**&***** *Top*, **const _variant_t**&***** *Width*, **const _variant_t**&***** *Height*); | | C | **HRESULT** *object*->raw_**GetPositionV**(**enum SftButtonAreaConstants** *Area*, **VARIANT*** *Left*, **VARIANT*** *Top*, **VARIANT*** *Width*, **VARIANT*** *Height*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Area Describes the area whose position is to be returned. | Name | Value | Description | | --- | --- | --- | | areaSftButtonButton | 0 | The position and dimensions of the button area are returned. | | areaSftButtonDropDown | 1 | The position and dimensions of the [drop down button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_dropdown) area are returned. | Left Returns the horizontal position of the desired *Area*, relative to the top, left corner of the control. The unit used depend on the container used (e.g., Visual Basic uses TWIPS by default, Visual C++ uses pixels). Top Returns the vertical position of the desired *Area*, relative to the top, left corner of the control. The unit used depend on the container used (e.g., Visual Basic uses TWIPS by default, Visual C++ uses pixels). Width Returns the width of the *Area*. The unit used depend on the container used (e.g., Visual Basic uses TWIPS by default, Visual C++ uses pixels). Height Returns the heightof the desired *Area*. The unit used depend on the container used (e.g., Visual Basic uses TWIPS by default, Visual C++ uses pixels). ### Comments The GetPositionV method returns the position and dimensions of an area of the control. The exact position and size for a given area (described by *Area*) is returned. If an area is not available, the *Width* and *Height* values are 0. [GetPosition](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_GetPosition) uses the units native to the container application (e.g., Visual Basic uses TWIPS by default, Visual C++ uses pixels). [GetPositionPix](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_GetPositionPix) always uses pixels. GetPositionV should be used when using Internet Explorer. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Height Property, SftPictureObject Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Height* Defines the desired image height. ### Syntax Get | | | | --- | --- | | VB.NET | *HPix* = *object*.**Height** **As Integer** | | VB | *HPix* = *object*.**Height** **As Long** | | C#.NET | **int** *HPix* = *object*.**Height**; | | VC++ | **long** *HPix* = *object*->**Height**;
**long** *HPix* = *object*->Get**Height**(); | | C | **HRESULT** *object*->get_**Height**(**long*** *HPix*); | Put | | | | --- | --- | | VB.NET | *object*.**Height** = *HPix* **As Integer** | | VB | *object*.**Height** = *HPix* **As Long** | | C#.NET | **int** *object*.**Height** = *HPix*; | | VC++ | **long** *object*->**Height** = *HPix*;
**void** *object*->Put**Height**(**long** *HPix*); | | C | **HRESULT** *object*->put_**Height**(**long** *HPix*); | object A [SftPictureObject object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject). HPix Defines the desired image height. ### Comments The Height property defines the desired image height. The desired image height is only used for built-in images (SftPictureObject.[Type](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Type) is sftTypeBuiltin) and [color samples](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_SetColorSample) (SftPictureObject.Type is sftTypeColorSample). For all image types, the SftPictureObject.[ActualHeight](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_ActualHeight) and SftPictureObject.[ActualWidth](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_ActualWidth) properties reflect the image dimensions. See Also SftPictureObject Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## HighContrastActive Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HighContrastActive* Returns whether [high contrast](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_highcontrast) is currently active. ### Syntax Get | | | | --- | --- | | VB.NET | *Boolean* = *object*.**HighContrastActive** **As Boolean** | | VB | *Boolean* = *object*.**HighContrastActive** **As Boolean** | | C#.NET | **bool** *Boolean* = *object*.**HighContrastActive**; | | VC++ | **VARIANT_BOOL** *Boolean* = *object*->**HighContrastActive**;
**VARIANT_BOOL** *Boolean* = *object*->Get**HighContrastActive**(); | | C | **HRESULT** *object*->get_**HighContrastActive**(**VARIANT_BOOL*** *Boolean*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Boolean Returns whether high contrast is currently active. | Boolean | Description | | --- | --- | | True | High contrast rendering is currently active. | | False | High contrast rendering is not active. | ### Comments The HighContrastActive property returns whether high contrast is currently active. The high contrast setting is defined using the [HighContrastMode](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HighContrastMode) property. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) | HighContrastMode | [HighContrastChange](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_HighContrastChange) | High Contrast ## HighContrastChange Event, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_HighContrastChange* The effective [high contrast](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_highcontrast) state has changed (Automatic high contrast only). ### Syntax | | | | --- | --- | | VB.NET | **Private Sub** *object*_**HighContrastChange**(**ByVal** *sender* **As Object**, **ByVal** *e* **As ***[EventArgumentType](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/r_EventArgumentType)*) **Handles** *object*.**HighContrastChange** | | VB | **Private Sub** *object*_**HighContrastChange**(**ByVal** *Active* **As Boolean**) | | C#.NET | **void** *object*_**HighContrastChange**(**object** *sender*, *EventArgumentType e*); | | VC++ | **void** On**HighContrastChange***object*(**VARIANT_BOOL** *Active*); | | C | **HRESULT** On**HighContrastChange***object*(**VARIANT_BOOL** *Active*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Active The new effective high contrast state (True if high contrast is now active). ### Comments The HighContrastChange event occurs when the effective high contrast state changes while [HighContrastMode](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HighContrastMode) is set to [highContrastSftButtonAuto](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonHighContrastConstants) and the user changes the Windows High Contrast setting. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) | HighContrastMode | [HighContrastActive](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HighContrastActive) | High Contrast ## HighContrastMode Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HighContrastMode* Defines the [high contrast](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_highcontrast) setting (off, on, or following the Windows setting). ### Syntax Get | | | | --- | --- | | VB.NET | *Mode* = *object*.**HighContrastMode** **As [SftButtonHighContrastConstants](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonHighContrastConstants)** | | VB | *Mode* = *object*.**HighContrastMode** **As SftButtonHighContrastConstants** | | C#.NET | **SftButtonHighContrastConstants** *Mode* = *object*.**HighContrastMode**; | | VC++ | **enum SftButtonHighContrastConstants** *Mode* = *object*->**HighContrastMode**;
**enum SftButtonHighContrastConstants** *Mode* = *object*->Get**HighContrastMode**(); | | C | **HRESULT** *object*->get_**HighContrastMode**(**enum SftButtonHighContrastConstants*** *Mode*); | Put | | | | --- | --- | | VB.NET | *object*.**HighContrastMode** = *Mode* **As SftButtonHighContrastConstants** | | VB | *object*.**HighContrastMode** = *Mode* **As SftButtonHighContrastConstants** | | C#.NET | **SftButtonHighContrastConstants** *object*.**HighContrastMode** = *Mode*; | | VC++ | **enum SftButtonHighContrastConstants** *object*->**HighContrastMode** = *Mode*;
**void** *object*->Put**HighContrastMode**(**enum SftButtonHighContrastConstants** *Mode*); | | C | **HRESULT** *object*->put_**HighContrastMode**(**enum SftButtonHighContrastConstants** *Mode*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Mode Defines the high contrast setting (off, on, or following the Windows setting). | Name | Value | Description | | --- | --- | --- | | highContrastSftButtonOff | 0 | Ignore the Windows High Contrast setting and render normally. | | highContrastSftButtonOn | 1 | Always use the system palette. | | highContrastSftButtonAuto | 2 | Follow the Windows High Contrast setting (the default). | ### Comments The HighContrastMode property defines the high contrast setting (off, on, or following the Windows setting). When set to highContrastSftButtonAuto, the control follows the Windows High Contrast [accessibility](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_accessibility) setting and re-renders automatically; the [HighContrastChange](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_HighContrastChange) event is raised when the effective state changes. Use [HighContrastActive](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HighContrastActive) to determine whether high contrast is currently active. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) | High Contrast ## HitTest Method, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HitTest* Determines the area at a given location. ### Syntax | | | | --- | --- | | VB.NET | *Success* = *object*.**HitTest**(**ByVal** *x* **As Single**, **ByVal** *y* **As Single**, **ByRef** *Area* **As [SftButtonAreaConstants](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonAreaConstants)**) **As Boolean** | | VB | *Success* = *object*.**HitTest**(**ByVal** *x* **As Single**, **ByVal** *y* **As Single**, *Area* **As SftButtonAreaConstants**) **As Boolean** | | C#.NET | **bool** *Success* = *object*.**HitTest**(**float** *x*, **float** *y*, **out** **SftButtonAreaConstants** *Area*); | | VC++ | **VARIANT_BOOL** *Success* = *object*->**HitTest**(**float** *x*, **float** *y*, **enum SftButtonAreaConstants*** *Area*); | | C | **HRESULT** *object*->raw_**HitTest**(**float** *x*, **float** *y*, **enum SftButtonAreaConstants*** *Area*, **VARIANT_BOOL*** *Success*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). x An expression that evaluates to the x-coordinate to be tested. The units used depend on the container used (e.g., Visual Basic uses TWIPS by default, Visual C++ uses pixels). y An expression that evaluates to the y-coordinate to be tested. The units used depend on the container used (e.g., Visual Basic uses TWIPS by default, Visual C++ uses pixels). Area Returns a value describing the area where the coordinates *x*, *y* are located. | Name | Value | Description | | --- | --- | --- | | areaSftButtonButton | 0 | The coordinates are located within the button portion. | | areaSftButtonDropDown | 1 | The coordinates are located within the [drop down button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_dropdown) portion. | Success Returns True if the coordinates *x*, *y* are located within the control. ### Comments The HitTest method determines the area at a given location. The general area where the coordinates, described by *x*, are located in the control (relative to the top, left corner of the control) is returned in Area. HitTest uses the units native to the container application (e.g., Visual Basic uses TWIPS by default, Visual C++ uses pixels). [HitTestPix](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HitTestPix) always uses pixels. [HitTestV](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HitTestV) should be used when using Internet Explorer. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## HitTestPix Method, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HitTestPix* Determines the area at a given location. ### Syntax | | | | --- | --- | | VB.NET | *Success* = *object*.**HitTestPix**(**ByVal** *xPix* **As Integer**, **ByVal** *yPix* **As Integer**, **ByRef** *Area* **As [SftButtonAreaConstants](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonAreaConstants)**) **As Boolean** | | VB | *Success* = *object*.**HitTestPix**(**ByVal** *xPix* **As Long**, **ByVal** *yPix* **As Long**, *Area* **As SftButtonAreaConstants**) **As Boolean** | | C#.NET | **bool** *Success* = *object*.**HitTestPix**(**int** *xPix*, **int** *yPix*, **out** **SftButtonAreaConstants** *Area*); | | VC++ | **VARIANT_BOOL** *Success* = *object*->**HitTestPix**(**long** *xPix*, **long** *yPix*, **enum SftButtonAreaConstants*** *Area*); | | C | **HRESULT** *object*->raw_**HitTestPix**(**long** *xPix*, **long** *yPix*, **enum SftButtonAreaConstants*** *Area*, **VARIANT_BOOL*** *Success*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). xPix An expression that evaluates to the x-coordinate to be tested. The units used are pixels. yPix An expression that evaluates to the y-coordinate to be tested. The units used are pixels. Area Returns a value describing the area where the coordinates *x*, *y* are located. | Name | Value | Description | | --- | --- | --- | | areaSftButtonButton | 0 | The coordinates are located within the button portion. | | areaSftButtonDropDown | 1 | The coordinates are located within the [drop down button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_dropdown) portion. | Success Returns True if the coordinates *xPix*, *yPix* are located within the control. ### Comments The HitTestPix method determines the area at a given location. The general area where the coordinates, described by *xPix*, *yPix*, are located in the control (relative to the top, left corner of the control) is returned in *Area*. [HitTest](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HitTest) uses the units native to the container application (e.g., Visual Basic uses TWIPS by default, Visual C++ uses pixels). HitTestPix always uses pixels. [HitTestV](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HitTestV) should be used when using Internet Explorer. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## HitTestV Method, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HitTestV* Determines the area at a given location. ### Syntax | | | | --- | --- | | VB.NET | *Success* = *object*.**HitTestV**(**ByVal** *x* **As Single**, **ByVal** *y* **As Single**, **ByRef** *Area* **As Object**) **As Boolean** | | VB | *Success* = *object*.**HitTestV**(**ByVal** *x* **As Single**, **ByVal** *y* **As Single**, *Area* **As Variant**) **As Boolean** | | C#.NET | **bool** *Success* = *object*.**HitTestV**(**float** *x*, **float** *y*, **out** **object** *Area*); | | VC++ | **VARIANT_BOOL** *Success* = *object*->**HitTestV**(**float** *x*, **float** *y*, **const _variant_t**&***** *Area*); | | C | **HRESULT** *object*->raw_**HitTestV**(**float** *x*, **float** *y*, **VARIANT*** *Area*, **VARIANT_BOOL*** *Success*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). x An expression that evaluates to the x-coordinate to be tested. The units used depend on the container used (e.g., Visual Basic uses TWIPS by default, Visual C++ uses pixels). y An expression that evaluates to the y-coordinate to be tested. The units used depend on the container used (e.g., Visual Basic uses TWIPS by default, Visual C++ uses pixels). Area Returns a value describing the area where the coordinates *x*, *y* are located. | Name | Value | Description | | --- | --- | --- | | areaSftButtonButton | 0 | The coordinates are located within the button portion. | | areaSftButtonDropDown | 1 | The coordinates are located within the [drop down button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_dropdown) portion. | Success Returns True if the coordinates *x*, *y* are located within the control. ### Comments The HitTestV method determines the area at a given location. The general area where the coordinates, described by *x*, are located in the control (relative to the top, left corner of the control) is returned in Area. [HitTest](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HitTest) uses the units native to the container application (e.g., Visual Basic uses TWIPS by default, Visual C++ uses pixels). [HitTestPix](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HitTestPix) always uses pixels. HitTestV should be used when using Internet Explorer. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## HoverOff Event, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_HoverOff* The mouse cursor is moved outside the control. ### Syntax | | | | --- | --- | | VB.NET | **Private Sub** *object*_**HoverOff**(**ByVal** *sender* **As Object**, **ByVal** *e* **As ***[EventArgumentType](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/r_EventArgumentType)*) **Handles** *object*.**HoverOff** | | VB | **Private Sub** *object*_**HoverOff**() | | C#.NET | **void** *object*_**HoverOff**(**object** *sender*, *EventArgumentType e*); | | VC++ | **void** On**HoverOff***object*(); | | C | **HRESULT** On**HoverOff***object*(); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). ### Comments The HoverOff event occurs when the mouse cursor is moved outside the control. The [HoverStyle](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HoverStyle) property defines how images respond to mouse cursor positions. The [HoverOn](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_HoverOn) event occurs when the mouse cursor is moved into the control. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## HoverOn Event, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_HoverOn* The mouse cursor is moved into the control. ### Syntax | | | | --- | --- | | VB.NET | **Private Sub** *object*_**HoverOn**(**ByVal** *sender* **As Object**, **ByVal** *e* **As ***[EventArgumentType](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/r_EventArgumentType)*) **Handles** *object*.**HoverOn** | | VB | **Private Sub** *object*_**HoverOn**() | | C#.NET | **void** *object*_**HoverOn**(**object** *sender*, *EventArgumentType e*); | | VC++ | **void** On**HoverOn***object*(); | | C | **HRESULT** On**HoverOn***object*(); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). ### Comments The HoverOn event occurs when the mouse cursor is moved into the control. The [HoverStyle](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HoverStyle) property defines how images respond to mouse cursor positions. The [HoverOff](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_HoverOff) event occurs when the mouse cursor is moved outside the control. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## HoverOnControl Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HoverOnControl* The mouse cursor is located on the control. ### Syntax Get | | | | --- | --- | | VB.NET | *Boolean* = *object*.**HoverOnControl** **As Boolean** | | VB | *Boolean* = *object*.**HoverOnControl** **As Boolean** | | C#.NET | **bool** *Boolean* = *object*.**HoverOnControl**; | | VC++ | **VARIANT_BOOL** *Boolean* = *object*->**HoverOnControl**;
**VARIANT_BOOL** *Boolean* = *object*->Get**HoverOnControl**(); | | C | **HRESULT** *object*->get_**HoverOnControl**(**VARIANT_BOOL*** *Boolean*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Boolean The mouse cursor is located on the control. | Boolean | Description | | --- | --- | | True | The mouse cursor is located on the control. | | False | The mouse cursor is not located on the control. | ### Comments The HoverOnControl property returns whether the mouse cursor is located on the control. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## HoverOnImage1 Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HoverOnImage1* The mouse cursor is located on the first image of the control. ### Syntax Get | | | | --- | --- | | VB.NET | *Boolean* = *object*.**HoverOnImage1** **As Boolean** | | VB | *Boolean* = *object*.**HoverOnImage1** **As Boolean** | | C#.NET | **bool** *Boolean* = *object*.**HoverOnImage1**; | | VC++ | **VARIANT_BOOL** *Boolean* = *object*->**HoverOnImage1**;
**VARIANT_BOOL** *Boolean* = *object*->Get**HoverOnImage1**(); | | C | **HRESULT** *object*->get_**HoverOnImage1**(**VARIANT_BOOL*** *Boolean*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Boolean The mouse cursor is located on the first image of the control. | Boolean | Description | | --- | --- | | True | The mouse cursor is located on the first image of the control ([Image1](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1)). | | False | The mouse cursor is not located on the first image of the control (Image1). | ### Comments The HoverOnImage1 property returns whether the mouse cursor is located on the first image of the control. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## HoverOnImage2 Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HoverOnImage2* The mouse cursor is located on the second image of the control. ### Syntax Get | | | | --- | --- | | VB.NET | *Boolean* = *object*.**HoverOnImage2** **As Boolean** | | VB | *Boolean* = *object*.**HoverOnImage2** **As Boolean** | | C#.NET | **bool** *Boolean* = *object*.**HoverOnImage2**; | | VC++ | **VARIANT_BOOL** *Boolean* = *object*->**HoverOnImage2**;
**VARIANT_BOOL** *Boolean* = *object*->Get**HoverOnImage2**(); | | C | **HRESULT** *object*->get_**HoverOnImage2**(**VARIANT_BOOL*** *Boolean*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Boolean The mouse cursor is located on the second image of the control. | Boolean | Description | | --- | --- | | True | The mouse cursor is located on the second image of the control ([Image2](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2)). | | False | The mouse cursor is not located on the second image of the control (Image2). | ### Comments The HoverOnImage2 property returns whether the mouse cursor is located on the second image of the control. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## HoverOnText Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HoverOnText* The mouse cursor is located on the text portion of the control. ### Syntax Get | | | | --- | --- | | VB.NET | *Boolean* = *object*.**HoverOnText** **As Boolean** | | VB | *Boolean* = *object*.**HoverOnText** **As Boolean** | | C#.NET | **bool** *Boolean* = *object*.**HoverOnText**; | | VC++ | **VARIANT_BOOL** *Boolean* = *object*->**HoverOnText**;
**VARIANT_BOOL** *Boolean* = *object*->Get**HoverOnText**(); | | C | **HRESULT** *object*->get_**HoverOnText**(**VARIANT_BOOL*** *Boolean*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Boolean The mouse cursor is located on the text portion of the control. | Boolean | Description | | --- | --- | | True | The mouse cursor is located on the text portion of the control ([Text](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Text)). | | False | The mouse cursor is not located on the text portion of the control (Text). | ### Comments The HoverOnText property returns whether the mouse cursor is located on the text portion of the control. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## HoverStyle Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HoverStyle* Defines how images respond to mouse cursor positions. ### Syntax Get | | | | --- | --- | | VB.NET | *Style* = *object*.**HoverStyle** **As [SftButtonHoverStyleConstants](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonHoverStyleConstants)** | | VB | *Style* = *object*.**HoverStyle** **As SftButtonHoverStyleConstants** | | C#.NET | **SftButtonHoverStyleConstants** *Style* = *object*.**HoverStyle**; | | VC++ | **enum SftButtonHoverStyleConstants** *Style* = *object*->**HoverStyle**;
**enum SftButtonHoverStyleConstants** *Style* = *object*->Get**HoverStyle**(); | | C | **HRESULT** *object*->get_**HoverStyle**(**enum SftButtonHoverStyleConstants*** *Style*); | Put | | | | --- | --- | | VB.NET | *object*.**HoverStyle** = *Style* **As SftButtonHoverStyleConstants** | | VB | *object*.**HoverStyle** = *Style* **As SftButtonHoverStyleConstants** | | C#.NET | **SftButtonHoverStyleConstants** *object*.**HoverStyle** = *Style*; | | VC++ | **enum SftButtonHoverStyleConstants** *object*->**HoverStyle** = *Style*;
**void** *object*->Put**HoverStyle**(**enum SftButtonHoverStyleConstants** *Style*); | | C | **HRESULT** *object*->put_**HoverStyle**(**enum SftButtonHoverStyleConstants** *Style*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Style Defines how images respond to mouse cursor positions. | Name | Value | Description | | --- | --- | --- | | hoverstyleSftButtonControl | 0 | Control - The pictures defined using the [Image1Hover](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1Hover) and [Image2Hover](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2Hover) properties are used as soon as the mouse cursor is over the control, not necessarily over the picture component itself. | | hoverstyleSftButtonExact | 1 | Exact - The pictures defined using the Image1Hover and Image2Hover properties are used only when the mouse cursor is over the picture component itself, otherwise the pictures defined using [Image1](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1) and [Image2](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2) are used. | ### Comments The HoverStyle property defines how images respond to mouse cursor positions. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## hWnd Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_hWnd* Returns the control's window handle. ### Syntax Get | | | | --- | --- | | VB.NET | *Handle* = *object*.**hWnd** **As Integer** | | VB | *Handle* = *object*.**hWnd** **As OLE_HANDLE** | | C#.NET | **int** *Handle* = *object*.**hWnd**; | | VC++ | **OLE_HANDLE** *Handle* = *object*->**hWnd**;
**OLE_HANDLE** *Handle* = *object*->Get**hWnd**(); | | C | **HRESULT** *object*->get_**hWnd**(**OLE_HANDLE*** *Handle*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Handle Returns the control's window handle. ### Comments The hWnd property returns the control's window handle. The hWnd property should not be used and may cause incompatibilities with future releases of SftButton/OCX. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## IconHandle Property, SftPictureObject Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_IconHandle* Defines the image object using an icon handle. ### Syntax Get | | | | --- | --- | | VB.NET | *hIcon* = *object*.**IconHandle** **As Integer** | | VB | *hIcon* = *object*.**IconHandle** **As OLE_HANDLE** | | C#.NET | **int** *hIcon* = *object*.**IconHandle**; | | VC++ | **OLE_HANDLE** *hIcon* = *object*->**IconHandle**;
**OLE_HANDLE** *hIcon* = *object*->Get**IconHandle**(); | | C | **HRESULT** *object*->get_**IconHandle**(**OLE_HANDLE*** *hIcon*); | Put | | | | --- | --- | | VB.NET | *object*.**IconHandle** = *hIcon* **As Integer** | | VB | *object*.**IconHandle** = *hIcon* **As OLE_HANDLE** | | C#.NET | **int** *object*.**IconHandle** = *hIcon*; | | VC++ | **OLE_HANDLE** *object*->**IconHandle** = *hIcon*;
**void** *object*->Put**IconHandle**(**OLE_HANDLE** *hIcon*); | | C | **HRESULT** *object*->put_**IconHandle**(**OLE_HANDLE** *hIcon*); | object A [SftPictureObject object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject). hIcon Defines the image object using an icon handle. The icon handle can be NULL, in which case the SftPictureObject object is cleared. ### Comments The IconHandle property defines the image object using an icon handle. The SftPictureObject.[Type](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Type) property is set to sftTypeIcon. The SftPictureObject.[ActualHeight](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_ActualHeight) and SftPictureObject.[ActualWidth](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_ActualWidth) properties reflect the icon size. See Also SftPictureObject Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Image Property, SftPictureObject Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Image* Defines the image object using a [GDI+](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_gdiplus) image. ### Syntax Get | | | | --- | --- | | VB.NET | *GDIPlusImage* = *object*.**Image** **As Integer** | | VB | *GDIPlusImage* = *object*.**Image** **As LONG_PTR** | | C#.NET | **int** *GDIPlusImage* = *object*.**Image**; | | VC++ | **LONG_PTR** *GDIPlusImage* = *object*->**Image**;
**LONG_PTR** *GDIPlusImage* = *object*->Get**Image**(); | | C | **HRESULT** *object*->get_**Image**(**LONG_PTR*** *GDIPlusImage*); | Put | | | | --- | --- | | VB.NET | *object*.**Image** = *GDIPlusImage* **As Integer** | | VB | *object*.**Image** = *GDIPlusImage* **As LONG_PTR** | | C#.NET | **int** *object*.**Image** = *GDIPlusImage*; | | VC++ | **LONG_PTR** *object*->**Image** = *GDIPlusImage*;
**void** *object*->Put**Image**(**LONG_PTR** *GDIPlusImage*); | | C | **HRESULT** *object*->put_**Image**(**LONG_PTR** *GDIPlusImage*); | object A [SftPictureObject object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject). GDIPlusImage Defines the image object using a GDI+ image. ### Comments The Image property defines the image object using a GDI+ image. The image remains owned by the application and must remain valid as long as it is used by the control. Once it is no longer needed, it must be deleted by the application. Most languages, except C++, automatically delete the object when it is no longer needed so no action is usually necessary. The Image property offers support for PNG, TIFF, JPEG, GIF, Exif, EMF+, EMF (GDI+ images) with full support for alpha-blended (translucent and semi-transparent) images. Typically, .NET applications use the [NETImageObject](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_NETImageObject) property to define an image, C and C++ applications use BitmapHandle or Image, VB6 and other COM applications use the [Picture](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Picture) property. [SetImage](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_SetImage) can also be used to define the image object using a GDI image, but is also assign ownership of the GDI+ image to the control, so it automatically deletes the object when it is no longer needed. This is typically only used by C++ applications that have direct access to GDI+ classes. See Also SftPictureObject Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Image1 Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1* Defines the first graphic. ### Syntax Get | | | | --- | --- | | VB.NET | *refImageObj* = *object*.**Image1** **As [SftPictureObject](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject)** | | VB | **Set** *refImageObj* = *object*.**Image1** **As SftPictureObject** | | C#.NET | **SftPictureObject** *refImageObj* = *object*.**Image1**; | | VC++ | **ISftPictureObject*** *refImageObj* = *object*->**Image1**;
**ISftPictureObject*** *refImageObj* = *object*->Get**Image1**(); | | C | **HRESULT** *object*->get_**Image1**(**ISftPictureObject**** *refImageObj*); | Put | | | | --- | --- | | VB.NET | *object*.**Image1** = *refImageObj* **As SftPictureObject** | | VB | *object*.**Image1** = *refImageObj* **As SftPictureObject** | | C#.NET | **SftPictureObject** *object*.**Image1** = *refImageObj*; | | VC++ | **ISftPictureObject*** *object*->**Image1** = *refImageObj*;
**void** *object*->Put**Image1**(**ISftPictureObject*** *refImageObj*); | | C | **HRESULT** *object*->put_**Image1**(**ISftPictureObject*** *refImageObj*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). refImageObj Defines the first graphic. ### Comments The Image1 property defines the first graphic. The [Image1Hover](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1Hover) property is used if the mouse cursor is located on the control or picture component, [Image1Pressed](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1Pressed) is used if the button is pressed or [Image1Disabled](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1Disabled) is used if the control is disabled (see [Enabled](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Enabled) property). Otherwise, the [Image1](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1) property is used to display the first graphic. Image1Hover, Image1Pressed and Image1Disabled are ignored if no graphic has been defined using the Image1 property. The layout of the [button label](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_label) and the position and alignment of the first picture component are defined using the [Orientation](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Orientation), [Image1AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignHorz) and [Image1AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignVert) properties. For detailed information on the use of the Orientation, Image1, Image1AlignHorz, Image1AlignVert, [Image2](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2), [Image2AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignHorz), [Image2AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignVert), [Text](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Text), [TextAlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_TextAlignHorz), [TextAlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_TextAlignVert) properties, please see "Button Label". See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Image1AlignHorz Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignHorz* Defines the horizontal alignment of the first graphic. ### Syntax Get | | | | --- | --- | | VB.NET | *Align* = *object*.**Image1AlignHorz** **As [SftButtonAlignConstants](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonAlignConstants)** | | VB | *Align* = *object*.**Image1AlignHorz** **As SftButtonAlignConstants** | | C#.NET | **SftButtonAlignConstants** *Align* = *object*.**Image1AlignHorz**; | | VC++ | **enum SftButtonAlignConstants** *Align* = *object*->**Image1AlignHorz**;
**enum SftButtonAlignConstants** *Align* = *object*->Get**Image1AlignHorz**(); | | C | **HRESULT** *object*->get_**Image1AlignHorz**(**enum SftButtonAlignConstants*** *Align*); | Put | | | | --- | --- | | VB.NET | *object*.**Image1AlignHorz** = *Align* **As SftButtonAlignConstants** | | VB | *object*.**Image1AlignHorz** = *Align* **As SftButtonAlignConstants** | | C#.NET | **SftButtonAlignConstants** *object*.**Image1AlignHorz** = *Align*; | | VC++ | **enum SftButtonAlignConstants** *object*->**Image1AlignHorz** = *Align*;
**void** *object*->Put**Image1AlignHorz**(**enum SftButtonAlignConstants** *Align*); | | C | **HRESULT** *object*->put_**Image1AlignHorz**(**enum SftButtonAlignConstants** *Align*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Align Defines the horizontal alignment of the first graphic. | Name | Value | Description | | --- | --- | --- | | alignSftButtonCenter | 0 | The picture component is horizontally centered within the available space. | | alignSftButtonLeft | 1 | The picture component is left aligned within the available space. | | alignSftButtonRight | 2 | The picture component is right aligned within the available space. | ### Comments The Image1AlignHorz property defines the horizontal alignment of the first graphic. The layout of the [button label](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_label) and the position and alignment of the first picture component are defined using the [Orientation](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Orientation), Image1AlignHorz and [Image1AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignVert) properties. For detailed information on the use of the Orientation, [Image1](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1), Image1AlignHorz, Image1AlignVert, [Image2](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2), [Image2AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignHorz), [Image2AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignVert), [Text](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Text), [TextAlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_TextAlignHorz), [TextAlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_TextAlignVert) properties, please see "Button Label". See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Image1AlignVert Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignVert* Defines the vertical alignment of the first graphic. ### Syntax Get | | | | --- | --- | | VB.NET | *Align* = *object*.**Image1AlignVert** **As [SftButtonAlignVertConstants](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonAlignVertConstants)** | | VB | *Align* = *object*.**Image1AlignVert** **As SftButtonAlignVertConstants** | | C#.NET | **SftButtonAlignVertConstants** *Align* = *object*.**Image1AlignVert**; | | VC++ | **enum SftButtonAlignVertConstants** *Align* = *object*->**Image1AlignVert**;
**enum SftButtonAlignVertConstants** *Align* = *object*->Get**Image1AlignVert**(); | | C | **HRESULT** *object*->get_**Image1AlignVert**(**enum SftButtonAlignVertConstants*** *Align*); | Put | | | | --- | --- | | VB.NET | *object*.**Image1AlignVert** = *Align* **As SftButtonAlignVertConstants** | | VB | *object*.**Image1AlignVert** = *Align* **As SftButtonAlignVertConstants** | | C#.NET | **SftButtonAlignVertConstants** *object*.**Image1AlignVert** = *Align*; | | VC++ | **enum SftButtonAlignVertConstants** *object*->**Image1AlignVert** = *Align*;
**void** *object*->Put**Image1AlignVert**(**enum SftButtonAlignVertConstants** *Align*); | | C | **HRESULT** *object*->put_**Image1AlignVert**(**enum SftButtonAlignVertConstants** *Align*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Align Defines the vertical alignment of the first graphic. | Name | Value | Description | | --- | --- | --- | | alignSftButtonVCenter | 0 | The picture component is vertically centered within the available space. | | alignSftButtonTop | 1 | The picture component is aligned with the top of the available space. | | alignSftButtonBottom | 2 | The picture component is aligned with the bottom of the available space. | ### Comments The Image1AlignVert property defines the vertical alignment of the first graphic. The layout of the [button label](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_label) and the position and alignment of the first picture component are defined using the [Orientation](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Orientation), [Image1AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignHorz) and Image1AlignVert properties. For detailed information on the use of the Orientation, [Image1](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1), Image1AlignHorz, Image1AlignVert, [Image2](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2), [Image2AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignHorz), [Image2AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignVert), [Text](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Text), [TextAlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_TextAlignHorz), [TextAlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_TextAlignVert) properties, please see "Button Label". See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Image1Disabled Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1Disabled* Defines the first graphic when the button is disabled. ### Syntax Get | | | | --- | --- | | VB.NET | *refImageObj* = *object*.**Image1Disabled** **As [SftPictureObject](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject)** | | VB | **Set** *refImageObj* = *object*.**Image1Disabled** **As SftPictureObject** | | C#.NET | **SftPictureObject** *refImageObj* = *object*.**Image1Disabled**; | | VC++ | **ISftPictureObject*** *refImageObj* = *object*->**Image1Disabled**;
**ISftPictureObject*** *refImageObj* = *object*->Get**Image1Disabled**(); | | C | **HRESULT** *object*->get_**Image1Disabled**(**ISftPictureObject**** *refImageObj*); | Put | | | | --- | --- | | VB.NET | *object*.**Image1Disabled** = *refImageObj* **As SftPictureObject** | | VB | *object*.**Image1Disabled** = *refImageObj* **As SftPictureObject** | | C#.NET | **SftPictureObject** *object*.**Image1Disabled** = *refImageObj*; | | VC++ | **ISftPictureObject*** *object*->**Image1Disabled** = *refImageObj*;
**void** *object*->Put**Image1Disabled**(**ISftPictureObject*** *refImageObj*); | | C | **HRESULT** *object*->put_**Image1Disabled**(**ISftPictureObject*** *refImageObj*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). refImageObj Defines the first graphic when the button is disabled. ### Comments The Image1Disabled property defines the first graphic when the button is disabled. The Image1Disabled property is only used if the [Image1](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1) property defines a valid picture and if the control is disabled (see [Enabled](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Enabled) property). See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Image1Hover Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1Hover* Defines the first graphic when the mouse cursor is located on the control. ### Syntax Get | | | | --- | --- | | VB.NET | *refImageObj* = *object*.**Image1Hover** **As [SftPictureObject](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject)** | | VB | **Set** *refImageObj* = *object*.**Image1Hover** **As SftPictureObject** | | C#.NET | **SftPictureObject** *refImageObj* = *object*.**Image1Hover**; | | VC++ | **ISftPictureObject*** *refImageObj* = *object*->**Image1Hover**;
**ISftPictureObject*** *refImageObj* = *object*->Get**Image1Hover**(); | | C | **HRESULT** *object*->get_**Image1Hover**(**ISftPictureObject**** *refImageObj*); | Put | | | | --- | --- | | VB.NET | *object*.**Image1Hover** = *refImageObj* **As SftPictureObject** | | VB | *object*.**Image1Hover** = *refImageObj* **As SftPictureObject** | | C#.NET | **SftPictureObject** *object*.**Image1Hover** = *refImageObj*; | | VC++ | **ISftPictureObject*** *object*->**Image1Hover** = *refImageObj*;
**void** *object*->Put**Image1Hover**(**ISftPictureObject*** *refImageObj*); | | C | **HRESULT** *object*->put_**Image1Hover**(**ISftPictureObject*** *refImageObj*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). refImageObj Defines the first graphic when the mouse cursor is located on the control. ### Comments The Image1Hover property defines the first graphic when the mouse cursor is located on the control. The Image1Hover property is only used if the [Image1](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1) property defines a valid picture and the mouse cursor is located over the control or picture component (depending on the [HoverStyle](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HoverStyle) property). The HoverStyle property defines how images respond to mouse cursor positions. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Image1Pressed Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1Pressed* Defines the first graphic when the button is pressed. ### Syntax Get | | | | --- | --- | | VB.NET | *refImageObj* = *object*.**Image1Pressed** **As [SftPictureObject](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject)** | | VB | **Set** *refImageObj* = *object*.**Image1Pressed** **As SftPictureObject** | | C#.NET | **SftPictureObject** *refImageObj* = *object*.**Image1Pressed**; | | VC++ | **ISftPictureObject*** *refImageObj* = *object*->**Image1Pressed**;
**ISftPictureObject*** *refImageObj* = *object*->Get**Image1Pressed**(); | | C | **HRESULT** *object*->get_**Image1Pressed**(**ISftPictureObject**** *refImageObj*); | Put | | | | --- | --- | | VB.NET | *object*.**Image1Pressed** = *refImageObj* **As SftPictureObject** | | VB | *object*.**Image1Pressed** = *refImageObj* **As SftPictureObject** | | C#.NET | **SftPictureObject** *object*.**Image1Pressed** = *refImageObj*; | | VC++ | **ISftPictureObject*** *object*->**Image1Pressed** = *refImageObj*;
**void** *object*->Put**Image1Pressed**(**ISftPictureObject*** *refImageObj*); | | C | **HRESULT** *object*->put_**Image1Pressed**(**ISftPictureObject*** *refImageObj*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). refImageObj Defines the first graphic when the button is pressed. ### Comments The Image1Pressed property defines the first graphic when the button is pressed. The Image1Pressed property is only used if the [Image1](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1) property defines a valid picture and the button is pressed (see [Pressed](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Pressed) property). See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Image2 Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2* Defines the second graphic. ### Syntax Get | | | | --- | --- | | VB.NET | *refImageObj* = *object*.**Image2** **As [SftPictureObject](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject)** | | VB | **Set** *refImageObj* = *object*.**Image2** **As SftPictureObject** | | C#.NET | **SftPictureObject** *refImageObj* = *object*.**Image2**; | | VC++ | **ISftPictureObject*** *refImageObj* = *object*->**Image2**;
**ISftPictureObject*** *refImageObj* = *object*->Get**Image2**(); | | C | **HRESULT** *object*->get_**Image2**(**ISftPictureObject**** *refImageObj*); | Put | | | | --- | --- | | VB.NET | *object*.**Image2** = *refImageObj* **As SftPictureObject** | | VB | *object*.**Image2** = *refImageObj* **As SftPictureObject** | | C#.NET | **SftPictureObject** *object*.**Image2** = *refImageObj*; | | VC++ | **ISftPictureObject*** *object*->**Image2** = *refImageObj*;
**void** *object*->Put**Image2**(**ISftPictureObject*** *refImageObj*); | | C | **HRESULT** *object*->put_**Image2**(**ISftPictureObject*** *refImageObj*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). refImageObj Defines the second graphic. ### Comments The Image2 property defines the second graphic. The [Image2Hover](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2Hover) property is used if the mouse cursor is located on the control or picture component, [Image2Pressed](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2Pressed) is used if the button is pressed or [Image2Disabled](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2Disabled) is used if the control is disabled (see [Enabled](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Enabled) property). Otherwise, the Image2 property is used to display the second graphic. Image2Hover, Image2Pressed and Image2Disabled are ignored if no graphic has been defined using the Image2 property. The layout of the [button label](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_label) and the position and alignment of the second picture component are defined using the [Orientation](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Orientation), [Image2AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignHorz) and [Image2AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignVert) properties. For detailed information on the use of the Orientation, [Image1](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1), [Image1AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignHorz), [Image1AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignVert), Image2, Image2AlignHorz, Image2AlignVert, [Text](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Text), [TextAlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_TextAlignHorz), [TextAlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_TextAlignVert) properties, please see "Button Label". See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Image2AlignHorz Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignHorz* Defines the horizontal alignment of the second graphic. ### Syntax Get | | | | --- | --- | | VB.NET | *Align* = *object*.**Image2AlignHorz** **As [SftButtonAlignConstants](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonAlignConstants)** | | VB | *Align* = *object*.**Image2AlignHorz** **As SftButtonAlignConstants** | | C#.NET | **SftButtonAlignConstants** *Align* = *object*.**Image2AlignHorz**; | | VC++ | **enum SftButtonAlignConstants** *Align* = *object*->**Image2AlignHorz**;
**enum SftButtonAlignConstants** *Align* = *object*->Get**Image2AlignHorz**(); | | C | **HRESULT** *object*->get_**Image2AlignHorz**(**enum SftButtonAlignConstants*** *Align*); | Put | | | | --- | --- | | VB.NET | *object*.**Image2AlignHorz** = *Align* **As SftButtonAlignConstants** | | VB | *object*.**Image2AlignHorz** = *Align* **As SftButtonAlignConstants** | | C#.NET | **SftButtonAlignConstants** *object*.**Image2AlignHorz** = *Align*; | | VC++ | **enum SftButtonAlignConstants** *object*->**Image2AlignHorz** = *Align*;
**void** *object*->Put**Image2AlignHorz**(**enum SftButtonAlignConstants** *Align*); | | C | **HRESULT** *object*->put_**Image2AlignHorz**(**enum SftButtonAlignConstants** *Align*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Align Defines the horizontal alignment of the second graphic. | Name | Value | Description | | --- | --- | --- | | alignSftButtonCenter | 0 | The picture component is horizontally centered within the available space. | | alignSftButtonLeft | 1 | The picture component is left aligned within the available space. | | alignSftButtonRight | 2 | The picture component is right aligned within the available space. | ### Comments The Image2AlignHorz property defines the horizontal alignment of the second graphic. The layout of the [button label](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_label) and the position and alignment of the second picture component are defined using the [Orientation](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Orientation), Image2AlignHorz and [Image2AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignVert) properties. For detailed information on the use of the Orientation, [Image1](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1), [Image1AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignHorz), [Image1AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignVert), [Image2](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2), Image2AlignHorz, Image2AlignVert, [Text](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Text), [TextAlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_TextAlignHorz), [TextAlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_TextAlignVert) properties, please see "Button Label". See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Image2AlignVert Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignVert* Defines the vertical alignment of the second graphic. ### Syntax Get | | | | --- | --- | | VB.NET | *Align* = *object*.**Image2AlignVert** **As [SftButtonAlignVertConstants](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonAlignVertConstants)** | | VB | *Align* = *object*.**Image2AlignVert** **As SftButtonAlignVertConstants** | | C#.NET | **SftButtonAlignVertConstants** *Align* = *object*.**Image2AlignVert**; | | VC++ | **enum SftButtonAlignVertConstants** *Align* = *object*->**Image2AlignVert**;
**enum SftButtonAlignVertConstants** *Align* = *object*->Get**Image2AlignVert**(); | | C | **HRESULT** *object*->get_**Image2AlignVert**(**enum SftButtonAlignVertConstants*** *Align*); | Put | | | | --- | --- | | VB.NET | *object*.**Image2AlignVert** = *Align* **As SftButtonAlignVertConstants** | | VB | *object*.**Image2AlignVert** = *Align* **As SftButtonAlignVertConstants** | | C#.NET | **SftButtonAlignVertConstants** *object*.**Image2AlignVert** = *Align*; | | VC++ | **enum SftButtonAlignVertConstants** *object*->**Image2AlignVert** = *Align*;
**void** *object*->Put**Image2AlignVert**(**enum SftButtonAlignVertConstants** *Align*); | | C | **HRESULT** *object*->put_**Image2AlignVert**(**enum SftButtonAlignVertConstants** *Align*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Align Defines the vertical alignment of the second graphic. | Name | Value | Description | | --- | --- | --- | | alignSftButtonVCenter | 0 | The picture component is vertically centered within the available space. | | alignSftButtonTop | 1 | The picture component is aligned with the top of the available space. | | alignSftButtonBottom | 2 | The picture component is aligned with the bottom of the available space. | ### Comments The Image2AlignVert property defines the vertical alignment of the second graphic. The layout of the [button label](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_label) and the position and alignment of the second picture component are defined using the [Orientation](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Orientation), [Image2AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignHorz) and Image2AlignVert properties. For detailed information on the use of the Orientation, [Image1](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1), [Image1AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignHorz), [Image1AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignVert), [Image2](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2), Image2AlignHorz, Image2AlignVert, [Text](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Text), [TextAlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_TextAlignHorz), [TextAlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_TextAlignVert) properties, please see "Button Label". See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Image2Disabled Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2Disabled* Defines the second graphic when the button is disabled. ### Syntax Get | | | | --- | --- | | VB.NET | *refImageObj* = *object*.**Image2Disabled** **As [SftPictureObject](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject)** | | VB | **Set** *refImageObj* = *object*.**Image2Disabled** **As SftPictureObject** | | C#.NET | **SftPictureObject** *refImageObj* = *object*.**Image2Disabled**; | | VC++ | **ISftPictureObject*** *refImageObj* = *object*->**Image2Disabled**;
**ISftPictureObject*** *refImageObj* = *object*->Get**Image2Disabled**(); | | C | **HRESULT** *object*->get_**Image2Disabled**(**ISftPictureObject**** *refImageObj*); | Put | | | | --- | --- | | VB.NET | *object*.**Image2Disabled** = *refImageObj* **As SftPictureObject** | | VB | *object*.**Image2Disabled** = *refImageObj* **As SftPictureObject** | | C#.NET | **SftPictureObject** *object*.**Image2Disabled** = *refImageObj*; | | VC++ | **ISftPictureObject*** *object*->**Image2Disabled** = *refImageObj*;
**void** *object*->Put**Image2Disabled**(**ISftPictureObject*** *refImageObj*); | | C | **HRESULT** *object*->put_**Image2Disabled**(**ISftPictureObject*** *refImageObj*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). refImageObj Defines the second graphic when the button is disabled. ### Comments The Image2Disabled property defines the second graphic when the button is disabled. The Image2Disabled property is only used if the [Image2](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2) property defines a valid picture and if the control is disabled (see [Enabled](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Enabled) property). See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Image2Hover Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2Hover* Defines the second graphic when the mouse cursor is located on the control. ### Syntax Get | | | | --- | --- | | VB.NET | *refImageObj* = *object*.**Image2Hover** **As [SftPictureObject](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject)** | | VB | **Set** *refImageObj* = *object*.**Image2Hover** **As SftPictureObject** | | C#.NET | **SftPictureObject** *refImageObj* = *object*.**Image2Hover**; | | VC++ | **ISftPictureObject*** *refImageObj* = *object*->**Image2Hover**;
**ISftPictureObject*** *refImageObj* = *object*->Get**Image2Hover**(); | | C | **HRESULT** *object*->get_**Image2Hover**(**ISftPictureObject**** *refImageObj*); | Put | | | | --- | --- | | VB.NET | *object*.**Image2Hover** = *refImageObj* **As SftPictureObject** | | VB | *object*.**Image2Hover** = *refImageObj* **As SftPictureObject** | | C#.NET | **SftPictureObject** *object*.**Image2Hover** = *refImageObj*; | | VC++ | **ISftPictureObject*** *object*->**Image2Hover** = *refImageObj*;
**void** *object*->Put**Image2Hover**(**ISftPictureObject*** *refImageObj*); | | C | **HRESULT** *object*->put_**Image2Hover**(**ISftPictureObject*** *refImageObj*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). refImageObj Defines the second graphic when the mouse cursor is located on the control. ### Comments The Image2Hover property defines the second graphic when the mouse cursor is located on the control. The Image2Hover property is only used if the [Image2](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2) property defines a valid picture and the mouse cursor is located over the control or picture component (depending on the [HoverStyle](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HoverStyle) property). The HoverStyle property defines how images respond to mouse cursor positions. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Image2Pressed Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2Pressed* Defines the second graphic when the button is pressed. ### Syntax Get | | | | --- | --- | | VB.NET | *refImageObj* = *object*.**Image2Pressed** **As [SftPictureObject](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject)** | | VB | **Set** *refImageObj* = *object*.**Image2Pressed** **As SftPictureObject** | | C#.NET | **SftPictureObject** *refImageObj* = *object*.**Image2Pressed**; | | VC++ | **ISftPictureObject*** *refImageObj* = *object*->**Image2Pressed**;
**ISftPictureObject*** *refImageObj* = *object*->Get**Image2Pressed**(); | | C | **HRESULT** *object*->get_**Image2Pressed**(**ISftPictureObject**** *refImageObj*); | Put | | | | --- | --- | | VB.NET | *object*.**Image2Pressed** = *refImageObj* **As SftPictureObject** | | VB | *object*.**Image2Pressed** = *refImageObj* **As SftPictureObject** | | C#.NET | **SftPictureObject** *object*.**Image2Pressed** = *refImageObj*; | | VC++ | **ISftPictureObject*** *object*->**Image2Pressed** = *refImageObj*;
**void** *object*->Put**Image2Pressed**(**ISftPictureObject*** *refImageObj*); | | C | **HRESULT** *object*->put_**Image2Pressed**(**ISftPictureObject*** *refImageObj*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). refImageObj Defines the second graphic when the button is pressed. ### Comments The Image2Pressed property defines the second graphic when the button is pressed. The Image2Pressed property is only used if the [Image2](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2) property defines a valid picture and the button is pressed (see [Pressed](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Pressed) property). See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## ImageBackground Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ImageBackground* Defines the [background image](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_backgroundimage). ### Syntax Get | | | | --- | --- | | VB.NET | *refImageObj* = *object*.**ImageBackground** **As [SftPictureObject](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject)** | | VB | **Set** *refImageObj* = *object*.**ImageBackground** **As SftPictureObject** | | C#.NET | **SftPictureObject** *refImageObj* = *object*.**ImageBackground**; | | VC++ | **ISftPictureObject*** *refImageObj* = *object*->**ImageBackground**;
**ISftPictureObject*** *refImageObj* = *object*->Get**ImageBackground**(); | | C | **HRESULT** *object*->get_**ImageBackground**(**ISftPictureObject**** *refImageObj*); | Put | | | | --- | --- | | VB.NET | *object*.**ImageBackground** = *refImageObj* **As SftPictureObject** | | VB | *object*.**ImageBackground** = *refImageObj* **As SftPictureObject** | | C#.NET | **SftPictureObject** *object*.**ImageBackground** = *refImageObj*; | | VC++ | **ISftPictureObject*** *object*->**ImageBackground** = *refImageObj*;
**void** *object*->Put**ImageBackground**(**ISftPictureObject*** *refImageObj*); | | C | **HRESULT** *object*->put_**ImageBackground**(**ISftPictureObject*** *refImageObj*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). refImageObj Defines the background image. ### Comments The ImageBackground property defines the background image. Each button control offers an optional background image, which is always displayed centered within the available space inside the button. Other components of the button, like the attributes defined using the [Text](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Text), [Image1](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1) or [Image2](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2) properties, simply overlay the background image. Depending on the button state, the background image defined using the ImageBackground, [ImageBackgroundDisabled](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ImageBackgroundDisabled), [ImageBackgroundHover](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ImageBackgroundHover) or [ImageBackgroundPressed](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ImageBackgroundPressed) is displayed. The background image is not displayed in the drop down portion of a [drop down button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_dropdown). See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## ImageBackgroundDisabled Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ImageBackgroundDisabled* Defines the [background image](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_backgroundimage) when the button is disabled. ### Syntax Get | | | | --- | --- | | VB.NET | *refImageObj* = *object*.**ImageBackgroundDisabled** **As [SftPictureObject](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject)** | | VB | **Set** *refImageObj* = *object*.**ImageBackgroundDisabled** **As SftPictureObject** | | C#.NET | **SftPictureObject** *refImageObj* = *object*.**ImageBackgroundDisabled**; | | VC++ | **ISftPictureObject*** *refImageObj* = *object*->**ImageBackgroundDisabled**;
**ISftPictureObject*** *refImageObj* = *object*->Get**ImageBackgroundDisabled**(); | | C | **HRESULT** *object*->get_**ImageBackgroundDisabled**(**ISftPictureObject**** *refImageObj*); | Put | | | | --- | --- | | VB.NET | *object*.**ImageBackgroundDisabled** = *refImageObj* **As SftPictureObject** | | VB | *object*.**ImageBackgroundDisabled** = *refImageObj* **As SftPictureObject** | | C#.NET | **SftPictureObject** *object*.**ImageBackgroundDisabled** = *refImageObj*; | | VC++ | **ISftPictureObject*** *object*->**ImageBackgroundDisabled** = *refImageObj*;
**void** *object*->Put**ImageBackgroundDisabled**(**ISftPictureObject*** *refImageObj*); | | C | **HRESULT** *object*->put_**ImageBackgroundDisabled**(**ISftPictureObject*** *refImageObj*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). refImageObj Defines the background image when the button is disabled. ### Comments The ImageBackgroundDisabled property defines the background image when the button is disabled. Each button control offers an optional background image, which is always displayed centered within the available space inside the button. Other components of the button, like the attributes defined using the [Text](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Text), [Image1](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1) or [Image2](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2) properties, simply overlay the background image. Depending on the button state, the background image defined using the [ImageBackground](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ImageBackground), ImageBackgroundDisabled, [ImageBackgroundHover](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ImageBackgroundHover) or [ImageBackgroundPressed](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ImageBackgroundPressed) is displayed. The background image is not displayed in the drop down portion of a [drop down button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_dropdown). See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## ImageBackgroundHover Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ImageBackgroundHover* Defines the [background image](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_backgroundimage) when the mouse cursor is located on the control. ### Syntax Get | | | | --- | --- | | VB.NET | *refImageObj* = *object*.**ImageBackgroundHover** **As [SftPictureObject](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject)** | | VB | **Set** *refImageObj* = *object*.**ImageBackgroundHover** **As SftPictureObject** | | C#.NET | **SftPictureObject** *refImageObj* = *object*.**ImageBackgroundHover**; | | VC++ | **ISftPictureObject*** *refImageObj* = *object*->**ImageBackgroundHover**;
**ISftPictureObject*** *refImageObj* = *object*->Get**ImageBackgroundHover**(); | | C | **HRESULT** *object*->get_**ImageBackgroundHover**(**ISftPictureObject**** *refImageObj*); | Put | | | | --- | --- | | VB.NET | *object*.**ImageBackgroundHover** = *refImageObj* **As SftPictureObject** | | VB | *object*.**ImageBackgroundHover** = *refImageObj* **As SftPictureObject** | | C#.NET | **SftPictureObject** *object*.**ImageBackgroundHover** = *refImageObj*; | | VC++ | **ISftPictureObject*** *object*->**ImageBackgroundHover** = *refImageObj*;
**void** *object*->Put**ImageBackgroundHover**(**ISftPictureObject*** *refImageObj*); | | C | **HRESULT** *object*->put_**ImageBackgroundHover**(**ISftPictureObject*** *refImageObj*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). refImageObj Defines the background image when the mouse cursor is located on the control. ### Comments The ImageBackgroundHover property defines the background image when the mouse cursor is located on the control. Each button control offers an optional background image, which is always displayed centered within the available space inside the button. Other components of the button, like the attributes defined using the [Text](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Text), [Image1](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1) or [Image2](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2) properties, simply overlay the background image. Depending on the button state, the background image defined using the [ImageBackground](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ImageBackground), [ImageBackgroundDisabled](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ImageBackgroundDisabled), ImageBackgroundHover or [ImageBackgroundPressed](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ImageBackgroundPressed) is displayed. The background image is not displayed in the drop down portion of a [drop down button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_dropdown). See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## ImageBackgroundPressed Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ImageBackgroundPressed* Defines the [background image](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_backgroundimage) when the button is pressed. ### Syntax Get | | | | --- | --- | | VB.NET | *refImageObj* = *object*.**ImageBackgroundPressed** **As [SftPictureObject](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject)** | | VB | **Set** *refImageObj* = *object*.**ImageBackgroundPressed** **As SftPictureObject** | | C#.NET | **SftPictureObject** *refImageObj* = *object*.**ImageBackgroundPressed**; | | VC++ | **ISftPictureObject*** *refImageObj* = *object*->**ImageBackgroundPressed**;
**ISftPictureObject*** *refImageObj* = *object*->Get**ImageBackgroundPressed**(); | | C | **HRESULT** *object*->get_**ImageBackgroundPressed**(**ISftPictureObject**** *refImageObj*); | Put | | | | --- | --- | | VB.NET | *object*.**ImageBackgroundPressed** = *refImageObj* **As SftPictureObject** | | VB | *object*.**ImageBackgroundPressed** = *refImageObj* **As SftPictureObject** | | C#.NET | **SftPictureObject** *object*.**ImageBackgroundPressed** = *refImageObj*; | | VC++ | **ISftPictureObject*** *object*->**ImageBackgroundPressed** = *refImageObj*;
**void** *object*->Put**ImageBackgroundPressed**(**ISftPictureObject*** *refImageObj*); | | C | **HRESULT** *object*->put_**ImageBackgroundPressed**(**ISftPictureObject*** *refImageObj*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). refImageObj Defines the background image when the button is pressed. ### Comments The ImageBackgroundPressed property defines the background image when the button is pressed. Each button control offers an optional background image, which is always displayed centered within the available space inside the button. Other components of the button, like the attributes defined using the [Text](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Text), [Image1](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1) or [Image2](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2) properties, simply overlay the background image. Depending on the button state, the background image defined using the [ImageBackground](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ImageBackground), [ImageBackgroundDisabled](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ImageBackgroundDisabled), [ImageBackgroundHover](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ImageBackgroundHover) or ImageBackgroundPressed is displayed. The background image is not displayed in the drop down portion of a [drop down button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_dropdown). See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## ImageScaling Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ImageScaling* Defines whether the images supplied to the control are scaled to the current [DPI](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_dpi). ### Syntax Get | | | | --- | --- | | VB.NET | *Mode* = *object*.**ImageScaling** **As [SftButtonScalingConstants](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonScalingConstants)** | | VB | *Mode* = *object*.**ImageScaling** **As SftButtonScalingConstants** | | C#.NET | **SftButtonScalingConstants** *Mode* = *object*.**ImageScaling**; | | VC++ | **enum SftButtonScalingConstants** *Mode* = *object*->**ImageScaling**;
**enum SftButtonScalingConstants** *Mode* = *object*->Get**ImageScaling**(); | | C | **HRESULT** *object*->get_**ImageScaling**(**enum SftButtonScalingConstants*** *Mode*); | Put | | | | --- | --- | | VB.NET | *object*.**ImageScaling** = *Mode* **As SftButtonScalingConstants** | | VB | *object*.**ImageScaling** = *Mode* **As SftButtonScalingConstants** | | C#.NET | **SftButtonScalingConstants** *object*.**ImageScaling** = *Mode*; | | VC++ | **enum SftButtonScalingConstants** *object*->**ImageScaling** = *Mode*;
**void** *object*->Put**ImageScaling**(**enum SftButtonScalingConstants** *Mode*); | | C | **HRESULT** *object*->put_**ImageScaling**(**enum SftButtonScalingConstants** *Mode*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Mode Defines whether the images supplied to the control are scaled to the current DPI. | Name | Value | Description | | --- | --- | --- | | scalingSftButtonAsIs | 0 | Draw every image at its native pixel size. | | scalingSftButtonStretch | 1 | Scale every image by the current DPI (the default). | ### Comments The ImageScaling property defines whether the images supplied to the control - the Image1 and Image2 families, and the background images, including their hover, pressed and disabled variants - are scaled by the current DPI when they are drawn. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) | Per-Monitor DPI and Scaling ## IsEmpty Property, SftPictureObject Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_IsEmpty* Returns whether the image object is empty. ### Syntax Get | | | | --- | --- | | VB.NET | *Boolean* = *object*.**IsEmpty** **As Boolean** | | VB | *Boolean* = *object*.**IsEmpty** **As Boolean** | | C#.NET | **bool** *Boolean* = *object*.**IsEmpty**; | | VC++ | **VARIANT_BOOL** *Boolean* = *object*->**IsEmpty**;
**VARIANT_BOOL** *Boolean* = *object*->Get**IsEmpty**(); | | C | **HRESULT** *object*->get_**IsEmpty**(**VARIANT_BOOL*** *Boolean*); | object A [SftPictureObject object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject). Boolean Returns whether the image object is empty. | Boolean | Description | | --- | --- | | True | The SftPictureObject object is empty and no image is assigned. | | False | The SftPictureObject object is not empty. The SftPictureObject.[Type](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Type) property can be used to determine the image contained in the object. | ### Comments The IsEmpty property returns whether the image object is empty. See Also SftPictureObject Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## KeyDown Event, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_KeyDown* A key is pressed. ### Syntax | | | | --- | --- | | VB.NET | **Private Sub** *object*_**KeyDownEvent**(**ByVal** *sender* **As Object**, **ByVal** *e* **As ***[EventArgumentType](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/r_EventArgumentType)*) **Handles** *object*.**KeyDownEvent** | | VB | **Private Sub** *object*_**KeyDown**(*KeyCode* **As Integer**, **ByVal** *Shift* **As Integer**) | | C#.NET | **void** *object*_**KeyDownEvent**(**object** *sender*, *EventArgumentType e*); | | VC++ | **void** On**KeyDown***object*(**short*** *KeyCode*, **short** *Shift*); | | C | **HRESULT** On**KeyDown***object*(**short*** *KeyCode*, **short** *Shift*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). KeyCode Describes the virtual key pressed. See your development environment documentation for available key code constants. Shift Describes the state of the SHIFT, CONTROL and ALT keys. A bit is set if the key is down. The *Shift* argument is a bit field with bits corresponding to the SHIFT, CONTROL and ALT keys. It indicates the state of these keys. Some, all, or none of the bits can be set, indicating which of the keys are pressed. | Name | Value | Description | | --- | --- | --- | | constSftButtonShiftMask | 1 | Shift | | constSftButtonCtrlMask | 2 | Control | | constSftButtonAltMask | 4 | Alt | ### Comments The KeyDown event occurs when a key is pressed. If the control is part of a parent window (form, dialog, etc.) which has a [default button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_default_button) (OK, Cancel) and the user presses the ENTER or ESCAPE keys, this event is not generated. The KeyDown event is never generated for the TAB key. To interpret keyboard characters (ANSI characters) use the [KeyPress](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_KeyPress) event. The key typed by the user can be suppressed by setting *KeyCode* to 0. It can be modified by assigning a new value to the variable. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## KeyPress Event, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_KeyPress* An ANSI key is pressed. ### Syntax | | | | --- | --- | | VB.NET | **Private Sub** *object*_**KeyPressEvent**(**ByVal** *sender* **As Object**, **ByVal** *e* **As ***[EventArgumentType](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/r_EventArgumentType)*) **Handles** *object*.**KeyPressEvent** | | VB | **Private Sub** *object*_**KeyPress**(*KeyAscii* **As Integer**) | | C#.NET | **void** *object*_**KeyPressEvent**(**object** *sender*, *EventArgumentType e*); | | VC++ | **void** On**KeyPress***object*(**short*** *KeyAscii*); | | C | **HRESULT** On**KeyPress***object*(**short*** *KeyAscii*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). KeyAscii Describes the key pressed using standard numeric ANSI key codes. ### Comments The KeyPress event occurs when an ANSI key is pressed. Use [KeyDown](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_KeyDown) and [KeyUp](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_KeyUp) events to handle any keystroke not recognized by KeyPress, such as function keys, editing keys, navigation keys, and any combination of these with keyboard modifiers, such as SHIFT, CONTROL and ALT keys. Unlike the KeyDown and KeyUp events, KeyPress doesn't indicate the physical state of the keyboard; it passes a character instead. The key typed by the user can be suppressed by setting *KeyAscii* to 0. It can be modified by assigning a new value to the *KeyAscii* variable. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## KeyUp Event, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_KeyUp* A key is released. ### Syntax | | | | --- | --- | | VB.NET | **Private Sub** *object*_**KeyUpEvent**(**ByVal** *sender* **As Object**, **ByVal** *e* **As ***[EventArgumentType](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/r_EventArgumentType)*) **Handles** *object*.**KeyUpEvent** | | VB | **Private Sub** *object*_**KeyUp**(*KeyCode* **As Integer**, **ByVal** *Shift* **As Integer**) | | C#.NET | **void** *object*_**KeyUpEvent**(**object** *sender*, *EventArgumentType e*); | | VC++ | **void** On**KeyUp***object*(**short*** *KeyCode*, **short** *Shift*); | | C | **HRESULT** On**KeyUp***object*(**short*** *KeyCode*, **short** *Shift*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). KeyCode Describes the virtual key that was released. See your development environment documentation for available key code constants. Shift Describes the state of the SHIFT, CONTROL and ALT keys. A bit is set if the key is down. The *Shift* argument is a bit field with bits corresponding to the SHIFT, CONTROL and ALT keys. It indicates the state of these keys. Some, all, or none of the bits can be set, indicating which of the keys are pressed. | Name | Value | Description | | --- | --- | --- | | constSftButtonShiftMask | 1 | Shift | | constSftButtonCtrlMask | 2 | Control | | constSftButtonAltMask | 4 | Alt | ### Comments The KeyUp event occurs when a key is released. If the control is part of a parent window (form, dialog, etc.) which has a [default button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_default_button) (OK, Cancel) and the user presses the ENTER or ESCAPE keys, this event is not generated. The KeyUp event is never generated for the TAB key. To interpret keyboard characters (ANSI characters) use the [KeyPress](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_KeyPress) event. The key typed by the user can be suppressed by setting *KeyCode* to 0. It can be modified by assigning a new value to the variable. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## License Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_License* Returns the product's license number. ### Syntax Get | | | | --- | --- | | VB.NET | *License* = *object*.**License** **As String** | | VB | *License* = *object*.**License** **As String** | | C#.NET | **string** *License* = *object*.**License**; | | VC++ | **_bstr_t** *License* = *object*->**License**;
**_bstr_t** *License* = *object*->Get**License**(); | | C | **HRESULT** *object*->get_**License**(**BSTR*** *License*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). License Returns the product's license number. ### Comments The License property returns the product's license number. A [demo](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_demo_application) version of the product does not have a license number. The license number is used to receive [product support](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_contactsoftel). When requesting product support, please always include your license number. Without your license number we will not be able to help you. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## LightEdgeColor Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_LightEdgeColor* Defines the control's color for light edges. ### Syntax Get | | | | --- | --- | | VB.NET | *Clr* = *object*.**LightEdgeColor** **As System.Drawing.Color[![\](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_dotnet)** | | VB | *Clr* = *object*.**LightEdgeColor** **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *Clr* = *object*.**LightEdgeColor**; | | VC++ | **OLE_COLOR** *Clr* = *object*->**LightEdgeColor**;
**OLE_COLOR** *Clr* = *object*->Get**LightEdgeColor**(); | | C | **HRESULT** *object*->get_**LightEdgeColor**(**OLE_COLOR*** *Clr*); | Put | | | | --- | --- | | VB.NET | *object*.**LightEdgeColor** = *Clr* **As System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** | | VB | *object*.**LightEdgeColor** = *Clr* **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *object*.**LightEdgeColor** = *Clr*; | | VC++ | **OLE_COLOR** *object*->**LightEdgeColor** = *Clr*;
**void** *object*->Put**LightEdgeColor**(**OLE_COLOR** *Clr*); | | C | **HRESULT** *object*->put_**LightEdgeColor**(**OLE_COLOR** *Clr*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Clr Defines the control's color for light edges. For information about color properties, please visit the applicable section "[Using SftButton/OCX with ...](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using)". ### Comments The LightEdgeColor property defines the control's color for light edges. > This property has no effect if [Windows themes](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_themes) are used. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## LoadImage Method, SftPictureObject Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_LoadImage* Loads an image from a file as a [GDI+](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_gdiplus) image. ### Syntax | | | | --- | --- | | VB.NET | *object*.**LoadImage**(**ByVal** *Filename* **As String**, **ByVal** *UseEmbeddedColorManagement* **As Boolean**) | | VB | *object*.**LoadImage**(**ByVal** *Filename* **As String**, **ByVal** *UseEmbeddedColorManagement* **As Boolean**) | | C#.NET | **void** *object*.**LoadImage**(**string** *Filename*, **bool** *UseEmbeddedColorManagement*); | | VC++ | **HRESULT** *object*->**LoadImageSftButton**(**_bstr_t** *Filename*, **VARIANT_BOOL** *UseEmbeddedColorManagement*); | | C | **HRESULT** *object*->raw_**LoadImageSftButton**(**BSTR** *Filename*, **VARIANT_BOOL** *UseEmbeddedColorManagement*); | object A [SftPictureObject object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject). Filename The name of the file containing a GDI+ image. UseEmbeddedColorManagement Defines whether the Image object applies color correction according to color management information that is embedded in the image file. Embedded information can include International Color Consortium (ICC) profiles, gamma values, and chromaticity information. True to enable color correction, False otherwise. ### Comments The LoadImage method loads an image from a file as a GDI+ image. The image object is owned by the control and will be deleted when it is no longer used. **C/C++ Only:** The LoadImage method is renamed to LoadImageSftButton by the #import statement used (see "[Using SftButton/OCX with Visual Studio (Unmanaged C/C++)](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_vc7)") to avoid a conflict with the Windows LoadImage macro. See Also SftPictureObject Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## LoadImageFromHBITMAP Method, SftPictureObject Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_LoadImageFromHBITMAP* Loads an image from a bitmap handle as a [GDI+](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_gdiplus) image. ### Syntax | | | | --- | --- | | VB.NET | *object*.**LoadImageFromHBITMAP**(**ByVal** *hBitmap* **As Integer**, **ByVal** *hPalette* **As Integer**) | | VB | *object*.**LoadImageFromHBITMAP**(**ByVal** *hBitmap* **As LONG_PTR**, **ByVal** *hPalette* **As LONG_PTR**) | | C#.NET | **void** *object*.**LoadImageFromHBITMAP**(**int** *hBitmap*, **int** *hPalette*); | | VC++ | **HRESULT** *object*->**LoadImageFromHBITMAP**(**LONG_PTR** *hBitmap*, **LONG_PTR** *hPalette*); | | C | **HRESULT** *object*->raw_**LoadImageFromHBITMAP**(**LONG_PTR** *hBitmap*, **LONG_PTR** *hPalette*); | object A [SftPictureObject object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject). hBitmap A bitmap handle, used to create a GDI+ image. hPalette A palette handle, used to create a GDI+ image. This value may be NULL/Nothing to omit the palette informa ### Comments The LoadImageFromHBITMAP method loads an image from a bitmap handle as a GDI+ image. The image object is owned by the control and will be deleted when it is no longer used. See Also SftPictureObject Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## LoadImageFromResource Method, SftPictureObject Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_LoadImageFromResource* Loads an image from a resource as a [GDI+](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_gdiplus) image. ### Syntax | | | | --- | --- | | VB.NET | *object*.**LoadImageFromResource**(**ByVal** *ResourceHandle* **As Integer**, **ByVal** *ResourceType* **As String**, **ByVal** *ResourceName* **As String**) | | VB | *object*.**LoadImageFromResource**(**ByVal** *ResourceHandle* **As LONG_PTR**, **ByVal** *ResourceType* **As String**, **ByVal** *ResourceName* **As String**) | | C#.NET | **void** *object*.**LoadImageFromResource**(**int** *ResourceHandle*, **string** *ResourceType*, **string** *ResourceName*); | | VC++ | **HRESULT** *object*->**LoadImageFromResource**(**LONG_PTR** *ResourceHandle*, **_bstr_t** *ResourceType*, **_bstr_t** *ResourceName*); | | C | **HRESULT** *object*->raw_**LoadImageFromResource**(**LONG_PTR** *ResourceHandle*, **BSTR** *ResourceType*, **BSTR** *ResourceName*); | object A [SftPictureObject object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject). ResourceHandle The handle to an instance of the module containing the resource. ResourceType The resource type. Can be a string or an identifier using the MAKEINTRESOURCE macro. ResourceName The resource name. Can be a string or an identifier using the MAKEINTRESOURCE macro. ### Comments The LoadImageFromResource method loads an image from a resource as a GDI+ image. This function is identical to the GDI+ function Gdiplus::Bitmap::FromResource(). The image object is owned by the control and will be deleted when it is no longer used. See Also SftPictureObject Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## LoadPicture Method, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_LoadPicture* Loads a picture from a file/URL. ### Syntax | | | | --- | --- | | VB.NET | *refPictureObj* = *object*.**LoadPicture**(**ByVal** *FileURL* **As String**) **As System.Drawing.Image[![\](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_dotnet)** | | VB | *refPictureObj* = *object*.**LoadPicture**(**ByVal** *FileURL* **As String**) **As IPictureDisp** | | C#.NET | **System.Drawing.Image![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *refPictureObj* = *object*.**LoadPicture**(**string** *FileURL*); | | VC++ | **IPictureDisp*** *refPictureObj* = *object*->**LoadPicture**(**_bstr_t** *FileURL*); | | C | **HRESULT** *object*->raw_**LoadPicture**(**BSTR** *FileURL*, **IPictureDisp**** *refPictureObj*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). FileURL The filename or URL of a file containing a picture (bitmap, Windows metafile, icon, jpeg or gif format). A URL must start with "http://" in which case the picture is loaded from the specified location. Otherwise, *FileURL* defines the location of a file on the local file system. refPictureObj Returns the graphic loaded from the specified file/URL *FileURL*. Nothing (NULL) is returned if the file/URL is inaccessible or if it is an invalid picture format. ### Comments The LoadPicture method loads a picture from a file/URL. The specified filename *FileURL* can contain a bitmap, Windows metafile, icon, jpeg or gif image. This method is mainly used with Internet Explorer to load pictures used as part of SftButton/OCX. Other environments usually offer picture, image or ImageList controls which can be used to hold pictures used by SftButton/OCX or the [SftPictureObject](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject).[LoadImage](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_LoadImage) method can be used. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## MouseDblClk Event, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_MouseDblClk* A mouse button is double-clicked. ### Syntax | | | | --- | --- | | VB.NET | **Private Sub** *object*_**MouseDblClkEvent**(**ByVal** *sender* **As Object**, **ByVal** *e* **As ***[EventArgumentType](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/r_EventArgumentType)*) **Handles** *object*.**MouseDblClkEvent** | | VB | **Private Sub** *object*_**MouseDblClk**(**ByVal** *Button* **As Integer**, **ByVal** *Shift* **As Integer**, **ByVal** *xPos* **As OLE_XPOS_PIXELS**, **ByVal** *yPos* **As OLE_YPOS_PIXELS**) | | C#.NET | **void** *object*_**MouseDblClkEvent**(**object** *sender*, *EventArgumentType e*); | | VC++ | **void** On**MouseDblClk***object*(**short** *Button*, **short** *Shift*, **OLE_XPOS_PIXELS** *xPos*, **OLE_YPOS_PIXELS** *yPos*); | | C | **HRESULT** On**MouseDblClk***object*(**short** *Button*, **short** *Shift*, **OLE_XPOS_PIXELS** *xPos*, **OLE_YPOS_PIXELS** *yPos*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Button Describes the button(s) that are pressed. The *Button* argument is a bit field with bits corresponding to the left button, right button and middle button. These bits correspond to the values shown below. The bits set indicate the button that caused the event. | Name | Value | Description | | --- | --- | --- | | constSftButtonLeftButton | 1 | Left button | | constSftButtonRightButton | 2 | Right button | | constSftButtonMiddleButton | 4 | Middle button | Shift Describes the state of the SHIFT, CONTROL and ALT keys. A bit is set if the key is down. The *Shift* argument is a bit field with bits corresponding to the SHIFT, CONTROL and ALT keys. It indicates the state of these keys. Some, all, or none of the bits can be set, indicating which of the keys are pressed. | Name | Value | Description | | --- | --- | --- | | constSftButtonShiftMask | 1 | Shift | | constSftButtonCtrlMask | 2 | Control | | constSftButtonAltMask | 4 | Alt | xPos The x-coordinate of the mouse cursor. The units used depend on the container (Visual Basic uses TWIPS, Visual C++ uses pixels, etc.) and the coordinate system used. yPos The y-coordinate of the mouse cursor. The units used depend on the container (Visual Basic uses TWIPS, Visual C++ uses pixels, etc.) and the coordinate system used. ### Comments The MouseDblClk event occurs when a mouse button is double-clicked. The [DblClick](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_DblClick) and [DropDownDblClick](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_DropDownDblClick) events should be used to determine whether the control has been double-clicked. The MouseDblClk event can be used by an application to handle mouse button double clicks in combination with keyboard modifiers such as the SHIFT, CONTROL and ALT keys. The [HitTest](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HitTest) method can be used to determine what area of the control is at a specific location. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## MouseDown Event, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_MouseDown* A mouse button is pressed. ### Syntax | | | | --- | --- | | VB.NET | **Private Sub** *object*_**MouseDownEvent**(**ByVal** *sender* **As Object**, **ByVal** *e* **As ***[EventArgumentType](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/r_EventArgumentType)*) **Handles** *object*.**MouseDownEvent** | | VB | **Private Sub** *object*_**MouseDown**(**ByVal** *Button* **As Integer**, **ByVal** *Shift* **As Integer**, **ByVal** *xPos* **As OLE_XPOS_PIXELS**, **ByVal** *yPos* **As OLE_YPOS_PIXELS**) | | C#.NET | **void** *object*_**MouseDownEvent**(**object** *sender*, *EventArgumentType e*); | | VC++ | **void** On**MouseDown***object*(**short** *Button*, **short** *Shift*, **OLE_XPOS_PIXELS** *xPos*, **OLE_YPOS_PIXELS** *yPos*); | | C | **HRESULT** On**MouseDown***object*(**short** *Button*, **short** *Shift*, **OLE_XPOS_PIXELS** *xPos*, **OLE_YPOS_PIXELS** *yPos*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Button Describes the button(s) that are pressed. The *Button* argument is a bit field with bits corresponding to the left button, right button and middle button. These bits correspond to the values shown below. The bits set indicate the button that caused the event. | Name | Value | Description | | --- | --- | --- | | constSftButtonLeftButton | 1 | Left button | | constSftButtonRightButton | 2 | Right button | | constSftButtonMiddleButton | 4 | Middle button | Shift Describes the state of the SHIFT, CONTROL and ALT keys. A bit is set if the key is down. The *Shift* argument is a bit field with bits corresponding to the SHIFT, CONTROL and ALT keys. It indicates the state of these keys. Some, all, or none of the bits can be set, indicating which of the keys are pressed. | Name | Value | Description | | --- | --- | --- | | constSftButtonShiftMask | 1 | Shift | | constSftButtonCtrlMask | 2 | Control | | constSftButtonAltMask | 4 | Alt | xPos The x-coordinate of the mouse cursor. The units used depend on the container (Visual Basic uses TWIPS, Visual C++ uses pixels, etc.) and the coordinate system used. yPos The y-coordinate of the mouse cursor. The units used depend on the container (Visual Basic uses TWIPS, Visual C++ uses pixels, etc.) and the coordinate system used. ### Comments The MouseDown event occurs when a mouse button is pressed. The [Click](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_Click) and [DropDownClick](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_DropDownClick) events should be used to determine whether the control has been clicked. The MouseDown event can be used by an application to handle mouse button clicks in combination with keyboard modifiers such as the SHIFT, CONTROL and ALT keys. The [HitTest](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HitTest) method can be used to determine what area of the control is at a specific location. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## MouseIcon Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_MouseIcon* Defines a custom mouse icon. ### Syntax Get | | | | --- | --- | | VB.NET | *refPictureObj* = *object*.**MouseIcon** **As System.Drawing.Image[![\](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_dotnet)** | | VB | **Set** *refPictureObj* = *object*.**MouseIcon** **As IPictureDisp** | | C#.NET | **System.Drawing.Image![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *refPictureObj* = *object*.**MouseIcon**; | | VC++ | **IPictureDisp*** *refPictureObj* = *object*->Get**MouseIcon**(); | | C | **HRESULT** *object*->get_**MouseIcon**(**IPictureDisp**** *refPictureObj*); | Put | | | | --- | --- | | VB.NET | *object*.let_**MouseIcon**(**ByVal** *refPictureObj* **As System.Drawing.Image![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)**) | | VB | *object*.**MouseIcon** = *refPictureObj* **As IPictureDisp** | | C#.NET | **void** *object*.let_**MouseIcon**(**System.Drawing.Image![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *refPictureObj*); | | VC++ | **void** *object*->Put**MouseIcon**(**IPictureDisp*** *refPictureObj*); | | C | **HRESULT** *object*->put_**MouseIcon**(**IPictureDisp*** *refPictureObj*); | PutRef | | | | --- | --- | | VB.NET | *object*.**MouseIcon** = *refPictureObj* **As System.Drawing.Image![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** | | VB | **Set** *object*.**MouseIcon** = *refPictureObj* **As IPictureDisp** | | C#.NET | **System.Drawing.Image![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *object*.**MouseIcon** = *refPictureObj*; | | VC++ | **void** *object*->PutRef**MouseIcon**(**IPictureDisp*** *refPictureObj*); | | C | **HRESULT** *object*->putref_**MouseIcon**(**IPictureDisp*** *refPictureObj*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). refPictureObj Defines a custom mouse icon. This icon contains the graphic used as the custom mouse icon. This icon handle has to remain valid until the control no longer uses it. For information about picture properties, please visit the applicable section "[Using SftButton/OCX with ...](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using)". ### Comments The MouseIcon property defines a custom mouse icon. The MouseIcon property provides a custom icon that is used when the [MousePointer](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_MousePointer) property is set to sftCustom (99). This mouse pointer is displayed when the cursor is located anywhere on the control. The MouseIcon and [MouseIconH](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_MouseIconH) properties are synonyms, but accept different value types (Picture object reference or Windows icon handle). Even though the class wrapper generated by Visual Studio for .NET applications (C#, VB.NET) includes the MouseIcon property, it is not usable as the System.Drawing.Image type does not support icons. For managed .NET applications the MouseIconH property must be used instead by assigning an icon's handle to the MouseIconH property as in ``` axSftButton1.MouseIconH = (int)icon1.Handle; ``` Using *PutRef* (see Syntax above) the control will use the reference to the Picture object. If the Picture object is later changed, this will also affect the image used by the control. Using *Put* instead causes the control to create a copy of the Picture object. If the Picture object is later changed, this will not affect the image used by the control as it uses a copy of the object. Because of the additional overhead and the increased resource use of *Put*, *PutRef* is the preferred method. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## MouseIconH Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_MouseIconH* Defines a custom mouse icon. ### Syntax Get | | | | --- | --- | | VB.NET | *Handle* = *object*.**MouseIconH** **As Integer** | | VB | *Handle* = *object*.**MouseIconH** **As OLE_HANDLE** | | C#.NET | **int** *Handle* = *object*.**MouseIconH**; | | VC++ | **OLE_HANDLE** *Handle* = *object*->**MouseIconH**;
**OLE_HANDLE** *Handle* = *object*->Get**MouseIconH**(); | | C | **HRESULT** *object*->get_**MouseIconH**(**OLE_HANDLE*** *Handle*); | Put | | | | --- | --- | | VB.NET | *object*.**MouseIconH** = *Handle* **As Integer** | | VB | *object*.**MouseIconH** = *Handle* **As OLE_HANDLE** | | C#.NET | **int** *object*.**MouseIconH** = *Handle*; | | VC++ | **OLE_HANDLE** *object*->**MouseIconH** = *Handle*;
**void** *object*->Put**MouseIconH**(**OLE_HANDLE** *Handle*); | | C | **HRESULT** *object*->put_**MouseIconH**(**OLE_HANDLE** *Handle*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Handle An icon handle. Defines a custom mouse icon. This icon handle has to remain valid until the tree control no longer uses it. ### Comments The MouseIconH property defines a custom mouse icon. The MouseIconH property provides a custom icon that is used when the [MousePointer](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_MousePointer) property is set to sftCustom (99). This mouse pointer is displayed when the cursor is located anywhere on the control. The [MouseIcon](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_MouseIcon) and MouseIconH properties are synonyms, but accept different value types (Picture object reference or Windows icon handle). Even though the class wrapper generated by Visual Studio for .NET applications (C#, VB.NET) includes the MouseIcon property, it is not usable as the System.Drawing.Image type does not support icons. For managed .NET applications the MouseIconH property must be used instead by assigning an icon's handle to the MouseIconH property as in: ``` axSftButton1.MouseIconH = (int)icon1.Handle; ``` See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## MouseMove Event, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_MouseMove* The mouse is moved. ### Syntax | | | | --- | --- | | VB.NET | **Private Sub** *object*_**MouseMoveEvent**(**ByVal** *sender* **As Object**, **ByVal** *e* **As ***[EventArgumentType](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/r_EventArgumentType)*) **Handles** *object*.**MouseMoveEvent** | | VB | **Private Sub** *object*_**MouseMove**(**ByVal** *Button* **As Integer**, **ByVal** *Shift* **As Integer**, **ByVal** *xPos* **As OLE_XPOS_PIXELS**, **ByVal** *yPos* **As OLE_YPOS_PIXELS**) | | C#.NET | **void** *object*_**MouseMoveEvent**(**object** *sender*, *EventArgumentType e*); | | VC++ | **void** On**MouseMove***object*(**short** *Button*, **short** *Shift*, **OLE_XPOS_PIXELS** *xPos*, **OLE_YPOS_PIXELS** *yPos*); | | C | **HRESULT** On**MouseMove***object*(**short** *Button*, **short** *Shift*, **OLE_XPOS_PIXELS** *xPos*, **OLE_YPOS_PIXELS** *yPos*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Button Describes the button(s) that are pressed. The *Button* argument is a bit field with bits corresponding to the left button, right button and middle button. These bits correspond to the values shown below. The bits set indicate the button that caused the event. | Name | Value | Description | | --- | --- | --- | | constSftButtonLeftButton | 1 | Left button | | constSftButtonRightButton | 2 | Right button | | constSftButtonMiddleButton | 4 | Middle button | Shift Describes the state of the SHIFT, CONTROL and ALT keys. A bit is set if the key is down. The *Shift* argument is a bit field with bits corresponding to the SHIFT, CONTROL and ALT keys. It indicates the state of these keys. Some, all, or none of the bits can be set, indicating which of the keys are pressed. | Name | Value | Description | | --- | --- | --- | | constSftButtonShiftMask | 1 | Shift | | constSftButtonCtrlMask | 2 | Control | | constSftButtonAltMask | 4 | Alt | xPos The x-coordinate of the mouse cursor. The units used depend on the container (Visual Basic uses TWIPS, Visual C++ uses pixels, etc.) and the coordinate system used. yPos The y-coordinate of the mouse cursor. The units used depend on the container (Visual Basic uses TWIPS, Visual C++ uses pixels, etc.) and the coordinate system used. ### Comments The MouseMove event occurs when the mouse is moved. The [HitTest](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HitTest) method can be used to determine what area of the control is at a specific location. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## MousePointer Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_MousePointer* Defines the mouse pointer used. ### Syntax Get | | | | --- | --- | | VB.NET | *Value* = *object*.**MousePointer** **As [SftMousePointerConstants](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftMousePointerConstants)** | | VB | *Value* = *object*.**MousePointer** **As SftMousePointerConstants** | | C#.NET | **SftMousePointerConstants** *Value* = *object*.**MousePointer**; | | VC++ | **enum SftMousePointerConstants** *Value* = *object*->**MousePointer**;
**enum SftMousePointerConstants** *Value* = *object*->Get**MousePointer**(); | | C | **HRESULT** *object*->get_**MousePointer**(**enum SftMousePointerConstants*** *Value*); | Put | | | | --- | --- | | VB.NET | *object*.**MousePointer** = *Value* **As SftMousePointerConstants** | | VB | *object*.**MousePointer** = *Value* **As SftMousePointerConstants** | | C#.NET | **SftMousePointerConstants** *object*.**MousePointer** = *Value*; | | VC++ | **enum SftMousePointerConstants** *object*->**MousePointer** = *Value*;
**void** *object*->Put**MousePointer**(**enum SftMousePointerConstants** *Value*); | | C | **HRESULT** *object*->put_**MousePointer**(**enum SftMousePointerConstants** *Value*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Value Defines the mouse pointer used. | Name | Value | Description | | --- | --- | --- | | sftDefault | 0 | (Default) | | sftArrow | 1 | Arrow | | sftCross | 2 | Cross | | sftIBeam | 3 | IBeam | | sftIcon | 4 | Icon (Obsolete) | | sftSize | 5 | Size | | sftSizeNESW | 6 | Size NW SW | | sftSizeNS | 7 | Size N S | | sftSizeNWSE | 8 | Size NW SE | | sftSizeWE | 9 | Size W E | | sftUpArrow | 10 | Up Arrow | | sftHourglass | 11 | Hourglass | | sftNoDrop | 12 | No Drop | | sftArrowHourglass | 13 | Arrow and Hourglass | | sftArrowQuestion | 14 | Arrow and Question Mark | | sftSizeAll | 15 | Size All | | sftCustom | 99 | Custom (defined using the MouseIcon property) | ### Comments The MousePointer property defines the mouse pointer used when the mouse cursor is over a SftButton/OCX control. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## MouseUp Event, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_MouseUp* A mouse button is released. ### Syntax | | | | --- | --- | | VB.NET | **Private Sub** *object*_**MouseUpEvent**(**ByVal** *sender* **As Object**, **ByVal** *e* **As ***[EventArgumentType](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/r_EventArgumentType)*) **Handles** *object*.**MouseUpEvent** | | VB | **Private Sub** *object*_**MouseUp**(**ByVal** *Button* **As Integer**, **ByVal** *Shift* **As Integer**, **ByVal** *xPos* **As OLE_XPOS_PIXELS**, **ByVal** *yPos* **As OLE_YPOS_PIXELS**) | | C#.NET | **void** *object*_**MouseUpEvent**(**object** *sender*, *EventArgumentType e*); | | VC++ | **void** On**MouseUp***object*(**short** *Button*, **short** *Shift*, **OLE_XPOS_PIXELS** *xPos*, **OLE_YPOS_PIXELS** *yPos*); | | C | **HRESULT** On**MouseUp***object*(**short** *Button*, **short** *Shift*, **OLE_XPOS_PIXELS** *xPos*, **OLE_YPOS_PIXELS** *yPos*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Button Describes the button(s) that are pressed. The *Button* argument is a bit field with bits corresponding to the left button, right button and middle button. These bits correspond to the values shown below. The bits set indicate the button that caused the event. | Name | Value | Description | | --- | --- | --- | | constSftButtonLeftButton | 1 | Left button | | constSftButtonRightButton | 2 | Right button | | constSftButtonMiddleButton | 4 | Middle button | Shift Describes the state of the SHIFT, CONTROL and ALT keys. A bit is set if the key is down. The *Shift* argument is a bit field with bits corresponding to the SHIFT, CONTROL and ALT keys. It indicates the state of these keys. Some, all, or none of the bits can be set, indicating which of the keys are pressed. | Name | Value | Description | | --- | --- | --- | | constSftButtonShiftMask | 1 | Shift | | constSftButtonCtrlMask | 2 | Control | | constSftButtonAltMask | 4 | Alt | xPos The x-coordinate of the mouse cursor. The units used depend on the container (Visual Basic uses TWIPS, Visual C++ uses pixels, etc.) and the coordinate system used. yPos The y-coordinate of the mouse cursor. The units used depend on the container (Visual Basic uses TWIPS, Visual C++ uses pixels, etc.) and the coordinate system used. ### Comments The MouseUp event occurs when a mouse button is released. The [Click](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_Click) and [DropDownClick](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_DropDownClick) events should be used to determine whether the control has been clicked. The MouseUp event can be used by an application to handle mouse button clicks in combination with keyboard modifiers such as the SHIFT, CONTROL and ALT keys. The [HitTest](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_HitTest) method can be used to determine what area of the control is at a specific location. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## NETImageObject Property, SftPictureObject Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_NETImageObject* Defines the image object using a .NET image object (IUnknown interface). ### Syntax Get | | | | --- | --- | | VB.NET | *pUnknown* = *object*.**NETImageObject** **As Object** | | VB | *pUnknown* = *object*.**NETImageObject** **As Unknown** | | C#.NET | **object** *pUnknown* = *object*.**NETImageObject**; | | VC++ | **IUnknown*** *pUnknown* = *object*->**NETImageObject**;
**IUnknown*** *pUnknown* = *object*->Get**NETImageObject**(); | | C | **HRESULT** *object*->get_**NETImageObject**(**IUnknown**** *pUnknown*); | PutRef | | | | --- | --- | | VB.NET | *object*.**NETImageObject** = *pUnknown* **As Object** | | VB | **Set** *object*.**NETImageObject** = *pUnknown* **As Unknown** | | C#.NET | **object** *object*.**NETImageObject** = *pUnknown*; | | VC++ | **IUnknown*** *object*->**NETImageObject** = *pUnknown*;
**void** *object*->PutRef**NETImageObject**(**IUnknown*** *pUnknown*); | | C | **HRESULT** *object*->putref_**NETImageObject**(**IUnknown*** *pUnknown*); | object A [SftPictureObject object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject). pUnknown Defines the image object using a .NET image object (IUnknown interface). ### Comments The NETImageObject property defines the image object using a .NET image object (IUnknown interface). Typically, .NET applications use the NETImageObject property to define an image, C and C++ applications use [BitmapHandle](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_BitmapHandle) or [Image](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Image), VB6 and other COM applications use the Picture property. The SftPictureObject.[Type](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Type) property is set to sftTypeGDIPlus. The SftPictureObject.[ActualHeight](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_ActualHeight) and SftPictureObject.[ActualWidth](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_ActualWidth) properties reflect the image size. Use of this property requires the [SftHelperComponent](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_dotnet) component, which is added to each project (see "Using SftButton/OCX with .NET"). See Also SftPictureObject Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## OLECompleteDrag Event, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_OLECompleteDrag* Source object is notified that the [OLE drag & drop](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_oledragdrop) operation is ending. ### Syntax | | | | --- | --- | | VB.NET | **Private Sub** *object*_**OLECompleteDrag**(**ByVal** *sender* **As Object**, **ByVal** *e* **As ***[EventArgumentType](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/r_EventArgumentType)*) **Handles** *object*.**OLECompleteDrag** | | VB | **Private Sub** *object*_**OLECompleteDrag**(*Effect* **As Long**) | | C#.NET | **void** *object*_**OLECompleteDrag**(**object** *sender*, *EventArgumentType e*); | | VC++ | **void** On**OLECompleteDrag***object*(**long*** *Effect*); | | C | **HRESULT** On**OLECompleteDrag***object*(**long*** *Effect*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Effect A Long variable set by the target object identifying the action that has been performed, thus allowing the source to take appropriate action if the component was moved (such as the source deleting data if it is moved from one component to another). | Name | Value | Description | | --- | --- | --- | | vbDropEffectNone | 0 | Drop target cannot accept the data. | | vbDropEffectCopy | 1 | Drop results in a copy of data from the source to the target. The original data is unaltered by the drag operation. | | vbDropEffectMove | 2 | Drop results in data being moved from the drag source to the drop source. The drag source should remove the data from itself after the move. | **Note:** Only Visual Basic offers the predefined constants vbDropEffectNone, etc. When using other languages, the constants have to be defined explicitly by the application. ### Comments The OLECompleteDrag event occurs when source object is notified that the OLE drag & drop operation is ending. The OLECompleteDrag event is the final event to be called in an OLE drag & drop operation. This event informs the source component of the action that was performed when the object was dropped onto the target component. The target sets this value through the Effect parameter of the [OLEDragDrop](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_OLEDragDrop) event. Based on this, the source can then determine the appropriate action it needs to take. For example, if the object was moved into the target (vbDropEffectMove), the source needs to delete the object from itself after the move. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## OLEDrag Method, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_OLEDrag* Initiates an [OLE drag & drop](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_oledragdrop) operation. ### Syntax | | | | --- | --- | | VB.NET | *object*.**OLEDrag**() | | VB | *object*.**OLEDrag** | | C#.NET | **void** *object*.**OLEDrag**(); | | VC++ | **HRESULT** *object*->**OLEDrag**(); | | C | **HRESULT** *object*->raw_**OLEDrag**(); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). ### Comments The OLEDrag method initiates an OLE drag & drop operation. An application can invoke an OLE drag & drop operation explicitly using the OLEDrag method. When the OLEDrag method is called, the [OLEStartDrag](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_OLEStartDrag) event occurs, allowing the application to supply data to a target component. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## OLEDragDrop Event, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_OLEDragDrop* An object is dropped on the control. ### Syntax | | | | --- | --- | | VB.NET | **Private Sub** *object*_**OLEDragDrop**(**ByVal** *sender* **As Object**, **ByVal** *e* **As ***[EventArgumentType](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/r_EventArgumentType)*) **Handles** *object*.**OLEDragDrop** | | VB | **Private Sub** *object*_**OLEDragDrop**(*Data* **As [DataObject](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_DataObject)**, *Effect* **As Long**, *Button* **As Integer**, *Shift* **As Integer**, *x* **As Single**, *y* **As Single**) | | C#.NET | **void** *object*_**OLEDragDrop**(**object** *sender*, *EventArgumentType e*); | | VC++ | **void** On**OLEDragDrop***object*(**struct IVDMDataObject**** *Data*, **long*** *Effect*, **short*** *Button*, **short*** *Shift*, **float*** *x*, **float*** *y*); | | C | **HRESULT** On**OLEDragDrop***object*(**struct IVDMDataObject**** *Data*, **long*** *Effect*, **short*** *Button*, **short*** *Shift*, **float*** *x*, **float*** *y*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Data A DataObject object containing formats that the source will provide and, in addition, possibly the data for those formats. If no data is contained in the DataObject, it is provided when the control calls the GetData method. The SetData and Clear methods cannot be used here. Effect A Long variable set by the target object identifying the action that has been performed, thus allowing the source to take appropriate action if the component was moved (such as the source deleting data if it is moved from one component to another). | Name | Value | Description | | --- | --- | --- | | vbDropEffectNone | 0 | Drop target cannot accept the data. | | vbDropEffectCopy | 1 | Drop results in a copy of data from the source to the target. The original data is unaltered by the drag operation. | | vbDropEffectMove | 2 | Drop results in data being moved from the drag source to the drop source. The drag source should remove the data from itself after the move. | **Note:** Only Visual Basic offers the predefined constants vbDropEffectNone, etc. When using other languages, the constants have to be defined explicitly by the application. Button Describes the button(s) that are pressed. The *Button* argument is a bit field with bits corresponding to the left button, right button and middle button. These bits correspond to the values shown below. The bits set indicate the button that caused the event. | Name | Value | Description | | --- | --- | --- | | constSftButtonLeftButton | 1 | Left button | | constSftButtonRightButton | 2 | Right button | | constSftButtonMiddleButton | 4 | Middle button | Shift Describes the state of the SHIFT, CONTROL and ALT keys. A bit is set if the key is down. The *Shift* argument is a bit field with bits corresponding to the SHIFT, CONTROL and ALT keys. It indicates the state of these keys. Some, all, or none of the bits can be set, indicating which of the keys are pressed. | Name | Value | Description | | --- | --- | --- | | constSftButtonShiftMask | 1 | Shift | | constSftButtonCtrlMask | 2 | Control | | constSftButtonAltMask | 4 | Alt | x The x coordinate of the mouse cursor. The units used depend on the container (Visual Basic uses TWIPS, Visual C++ uses pixels, etc.) and the coordinate system used. y The y coordinate of the mouse cursor. The units used depend on the container (Visual Basic uses TWIPS, Visual C++ uses pixels, etc.) and the coordinate system used. ### Comments The OLEDragDrop event occurs when an object is dropped on the control. The OLEDragDrop event only occurs if the OLEDropMode property is set to OLEDropSftButtonManual. The source control should always mask values from the *Effect* parameter to insure compatibility with future implementations of [OLE drag & drop](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_oledragdrop). Presently, only three bits in the *Effect* parameter are used. In future versions other bits may be used. As a precaution against future problems, drag sources and drop targets should mask these values appropriately before performing any comparisons. For example, a source component should not compare an *Effect* against, for example, vbDropEffectCopy, such as: ``` If Effect = vbDropEffectCopy... ``` Instead, the source component should mask the value or values being sought, as here: ``` If (Effect And vbDropEffectCopy) = vbDropEffectCopy... ``` -or- ``` If (Effect And vbDropEffectCopy)... ``` This allows for the definition of new drop effects in future versions while preserving compatibility with existing code. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## OLEDragMode Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_OLEDragMode* Defines OLE drag support. ### Syntax Get | | | | --- | --- | | VB.NET | *Mode* = *object*.**OLEDragMode** **As [SftButtonOLEDragModeConstants](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonOLEDragModeConstants)** | | VB | *Mode* = *object*.**OLEDragMode** **As SftButtonOLEDragModeConstants** | | C#.NET | **SftButtonOLEDragModeConstants** *Mode* = *object*.**OLEDragMode**; | | VC++ | **enum SftButtonOLEDragModeConstants** *Mode* = *object*->**OLEDragMode**;
**enum SftButtonOLEDragModeConstants** *Mode* = *object*->Get**OLEDragMode**(); | | C | **HRESULT** *object*->get_**OLEDragMode**(**enum SftButtonOLEDragModeConstants*** *Mode*); | Put | | | | --- | --- | | VB.NET | *object*.**OLEDragMode** = *Mode* **As SftButtonOLEDragModeConstants** | | VB | *object*.**OLEDragMode** = *Mode* **As SftButtonOLEDragModeConstants** | | C#.NET | **SftButtonOLEDragModeConstants** *object*.**OLEDragMode** = *Mode*; | | VC++ | **enum SftButtonOLEDragModeConstants** *object*->**OLEDragMode** = *Mode*;
**void** *object*->Put**OLEDragMode**(**enum SftButtonOLEDragModeConstants** *Mode*); | | C | **HRESULT** *object*->put_**OLEDragMode**(**enum SftButtonOLEDragModeConstants** *Mode*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Mode Defines whether the control is used as an OLE drag source. | Name | Value | Description | | --- | --- | --- | | OLEDragSftButtonNone | 0 | The control cannot act as a drag source. | | OLEDragSftButtonManual | 1 | The application calls the OLEDrag method to start an [OLE drag & drop](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_oledragdrop) operation using this control as a drag source. | ### Comments The OLEDragMode property defines OLE drag support. Once an OLE drag & drop operation is started, the application receives the [OLEStartDrag](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_OLEStartDrag) event, which is used to provide data to the [DataObject](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_DataObject). If the OLEDragMode property is set to OLEDragSftButtonManual, the application can start an OLE drag & drop operation in response to any external event (such as the [MouseDown](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_MouseDown) event). **Visual Basic:** The DragMode property which is automatically added to the control by Visual Basic also affects the handling of a drag & drop operation. For OLE drag & drop to be available, Visual Basic's DragMode property must be set to vbManual. Please see the Visual Basic documentation for information about the DragMode property and its drag & drop support. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## OLEDragOver Event, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_OLEDragOver* An object is dragged over the control. ### Syntax | | | | --- | --- | | VB.NET | **Private Sub** *object*_**OLEDragOver**(**ByVal** *sender* **As Object**, **ByVal** *e* **As ***[EventArgumentType](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/r_EventArgumentType)*) **Handles** *object*.**OLEDragOver** | | VB | **Private Sub** *object*_**OLEDragOver**(*Data* **As [DataObject](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_DataObject)**, *Effect* **As Long**, *Button* **As Integer**, *Shift* **As Integer**, *x* **As Single**, *y* **As Single**, *State* **As [SftButtonOLEDragOverConstants](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonOLEDragOverConstants)**) | | C#.NET | **void** *object*_**OLEDragOver**(**object** *sender*, *EventArgumentType e*); | | VC++ | **void** On**OLEDragOver***object*(**struct IVDMDataObject**** *Data*, **long*** *Effect*, **short*** *Button*, **short*** *Shift*, **float*** *x*, **float*** *y*, **enum SftButtonOLEDragOverConstants*** *State*); | | C | **HRESULT** On**OLEDragOver***object*(**struct IVDMDataObject**** *Data*, **long*** *Effect*, **short*** *Button*, **short*** *Shift*, **float*** *x*, **float*** *y*, **enum SftButtonOLEDragOverConstants*** *State*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Data A DataObject object containing formats that the source will provide and, in addition, possibly the data for those formats. If no data is contained in the DataObject, it is provided when the control calls the GetData method. The SetData and Clear methods cannot be used here. Effect A Long variable set by the source object identifying all effects it supports. This parameter must be correctly set by the target component during this event. The value of *Effect* is determined by logically Or'ing together all active effects. The target component should check these effects and other parameters to determine which actions are appropriate for it, and then set this parameter to one of the allowable effects (as specified by the source) to specify which actions will be performed if the user drops the selection on the component. | Name | Value | Description | | --- | --- | --- | | vbDropEffectNone | 0 | Drop target cannot accept the data. | | vbDropEffectCopy | 1 | Drop results in a copy of data from the source to the target. The original data is unaltered by the drag operation. | | vbDropEffectMove | 2 | Drop results in data being moved from the drag source to the drop source. The drag source should remove the data from itself after the move. | **Note:** Only Visual Basic offers the predefined constants vbDropEffectNone, etc. When using other languages, the constants have to be defined explicitly by the application. Button Describes the button(s) that are pressed. The *Button* argument is a bit field with bits corresponding to the left button, right button and middle button. These bits correspond to the values shown below. The bits set indicate the button that caused the event. | Name | Value | Description | | --- | --- | --- | | constSftButtonLeftButton | 1 | Left button | | constSftButtonRightButton | 2 | Right button | | constSftButtonMiddleButton | 4 | Middle button | Shift Describes the state of the SHIFT, CONTROL and ALT keys. A bit is set if the key is down. The *Shift* argument is a bit field with bits corresponding to the SHIFT, CONTROL and ALT keys. It indicates the state of these keys. Some, all, or none of the bits can be set, indicating which of the keys are pressed. | Name | Value | Description | | --- | --- | --- | | constSftButtonShiftMask | 1 | Shift | | constSftButtonCtrlMask | 2 | Control | | constSftButtonAltMask | 4 | Alt | x The x coordinate of the mouse cursor. The units used depend on the container (Visual Basic uses TWIPS, Visual C++ uses pixels, etc.) and the coordinate system used. y The y coordinate of the mouse cursor. The units used depend on the container (Visual Basic uses TWIPS, Visual C++ uses pixels, etc.) and the coordinate system used. State Defines the transition state of the data being dragged in relation to the target control. | Name | Value | Description | | --- | --- | --- | | enterSftButton | 0 | Source component is being dragged within the range of a target. | | leaveSftButton | 1 | Source component is being dragged out of the range of a target. | | overSftButton | 2 | Source component has moved from one position in the target to another. | ### Comments The OLEDragOver event occurs when an object is dragged over the control. The OLEDragOver event only occurs if the [OLEDropMode](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_OLEDropMode) property is set to OLEDropSftButtonManual. The source control should always mask values from the *Effect* parameter to insure compatibility with future implementations of [OLE drag & drop](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_oledragdrop). Presently, only three bits in the *Effect* parameter are used. In future versions other bits may be used. As a precaution against future problems, drag sources and drop targets should mask these values appropriately before performing any comparisons. For example, a source component should not compare an *Effect* against, for example, vbDropEffectCopy, such as: ``` If Effect = vbDropEffectCopy... ``` Instead, the source component should mask the value or values being sought, as here: ``` If (Effect And vbDropEffectCopy) = vbDropEffectCopy... ``` -or- ``` If (Effect And vbDropEffectCopy)... ``` This allows for the definition of new drop effects in future versions while preserving compatibility with existing code. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## OLEDropMode Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_OLEDropMode* Defines OLE drop support. ### Syntax Get | | | | --- | --- | | VB.NET | *Mode* = *object*.**OLEDropMode** **As [SftButtonOLEDropModeConstants](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonOLEDropModeConstants)** | | VB | *Mode* = *object*.**OLEDropMode** **As SftButtonOLEDropModeConstants** | | C#.NET | **SftButtonOLEDropModeConstants** *Mode* = *object*.**OLEDropMode**; | | VC++ | **enum SftButtonOLEDropModeConstants** *Mode* = *object*->**OLEDropMode**;
**enum SftButtonOLEDropModeConstants** *Mode* = *object*->Get**OLEDropMode**(); | | C | **HRESULT** *object*->get_**OLEDropMode**(**enum SftButtonOLEDropModeConstants*** *Mode*); | Put | | | | --- | --- | | VB.NET | *object*.**OLEDropMode** = *Mode* **As SftButtonOLEDropModeConstants** | | VB | *object*.**OLEDropMode** = *Mode* **As SftButtonOLEDropModeConstants** | | C#.NET | **SftButtonOLEDropModeConstants** *object*.**OLEDropMode** = *Mode*; | | VC++ | **enum SftButtonOLEDropModeConstants** *object*->**OLEDropMode** = *Mode*;
**void** *object*->Put**OLEDropMode**(**enum SftButtonOLEDropModeConstants** *Mode*); | | C | **HRESULT** *object*->put_**OLEDropMode**(**enum SftButtonOLEDropModeConstants** *Mode*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Mode Defines whether the control can act as an OLE drop target. | Name | Value | Description | | --- | --- | --- | | OLEDropSftButtonNone | 0 | The control is not a valid drop target. | | OLEDropSftButtonManual | 1 | The control is a valid drop target and triggers the OLE drop events, allowing the application to handle the OLE drop operation. | ### Comments The OLEDropMode property defines OLE drop support. If the control is a valid drop target (OLEDropSftButtonManual), the events [OLEDragOver](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_OLEDragOver) and [OLEDragDrop](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_OLEDragDrop) occur when an item is dragged over the control or when an item is dropped. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## OLEGiveFeedback Event, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_OLEGiveFeedback* Source object can provide visual feedback during [OLE drag & drop](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_oledragdrop). ### Syntax | | | | --- | --- | | VB.NET | **Private Sub** *object*_**OLEGiveFeedback**(**ByVal** *sender* **As Object**, **ByVal** *e* **As ***[EventArgumentType](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/r_EventArgumentType)*) **Handles** *object*.**OLEGiveFeedback** | | VB | **Private Sub** *object*_**OLEGiveFeedback**(*Effect* **As Long**, *DefaultCursors* **As Boolean**) | | C#.NET | **void** *object*_**OLEGiveFeedback**(**object** *sender*, *EventArgumentType e*); | | VC++ | **void** On**OLEGiveFeedback***object*(**long*** *Effect*, **VARIANT_BOOL*** *DefaultCursors*); | | C | **HRESULT** On**OLEGiveFeedback***object*(**long*** *Effect*, **VARIANT_BOOL*** *DefaultCursors*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Effect A Long variable set by the target component identifying the action that has been performed (if any), thus allowing the source to take appropriate action if the component was moved (such as the source deleting the data). | Name | Value | Description | | --- | --- | --- | | vbDropEffectNone | 0 | Drop target cannot accept the data. | | vbDropEffectCopy | 1 | Drop results in a copy of data from the source to the target. The original data is unaltered by the drag operation. | | vbDropEffectMove | 2 | Drop results in data being moved from the drag source to the drop source. The drag source should remove the data from itself after the move. | **Note:** Only Visual Basic offers the predefined constants vbDropEffectNone, etc. When using other languages, the constants have to be defined explicitly by the application. DefaultCursors Determines whether the default mouse cursor provided by the component is used or a user-defined mouse cursor is used. | Value | Description | | --- | --- | | True | The default mouse cursor is used. | | False | The mouse cursor defined using the MousePointer property (of the Screen object) is used instead. | ### Comments The OLEGiveFeedback event occurs when source object can provide visual feedback during OLE drag & drop. The OLEGiveFeedback event occurs after every [OLEDragOver](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_OLEDragOver) event. OLEGiveFeedback allows the source component to provide visual feedback to the user, such as changing the mouse cursor to indicate what will happen if the user drops the object, or provide visual feedback on the selection (in the source component) to indicate what will happen. If there is no code in the OLEGiveFeedback event, or if the *DefaultCursors* parameter is set to True, the default cursor provided by the component is used as the mouse cursor. The source control should always mask values from the *Effect* parameter to insure compatibility with future implementations of OLE drag & drop. Presently, only three bits in the *Effect* parameter are used. In future versions other bits may be used. As a precaution against future problems, drag sources and drop targets should mask these values appropriately before performing any comparisons. For example, a source component should not compare an *Effect* against, for example, vbDropEffectCopy, such as: ``` If Effect = vbDropEffectCopy... ``` Instead, the source component should mask the value or values being sought, as here: ``` If (Effect And vbDropEffectCopy) = vbDropEffectCopy... ``` -or- ``` If (Effect And vbDropEffectCopy)... ``` This allows for the definition of new drop effects in future versions while preserving compatibility with existing code. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## OLESetData Event, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_OLESetData* Source object can provide data and/or data formats. ### Syntax | | | | --- | --- | | VB.NET | **Private Sub** *object*_**OLESetData**(**ByVal** *sender* **As Object**, **ByVal** *e* **As ***[EventArgumentType](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/r_EventArgumentType)*) **Handles** *object*.**OLESetData** | | VB | **Private Sub** *object*_**OLESetData**(*Data* **As [DataObject](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_DataObject)**, *Format* **As Integer**) | | C#.NET | **void** *object*_**OLESetData**(**object** *sender*, *EventArgumentType e*); | | VC++ | **void** On**OLESetData***object*(**struct IVDMDataObject**** *Data*, **short*** *Format*); | | C | **HRESULT** On**OLESetData***object*(**struct IVDMDataObject**** *Data*, **short*** *Format*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Data A DataObject object containing formats that the source will provide and, in addition, possibly the data for those formats. If no data is contained in the DataObject, it is provided when the control calls the GetData method and you should provide the values for the *Data* parameter. Format The format of the data that the target component is requesting. The source component uses this value to determine what to load into the DataObject object. ### Comments The OLESetData event occurs when source object can provide data and/or data formats. In certain cases, you may wish to defer loading data into the DataObject object of a source component to save time, especially if the source component supports many formats. This event allows the source to respond to only one request for a given format of data. When this event is called, the source should check the Format parameter to determine what needs to be loaded and then perform the [SetData](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/DataObject_SetData) method on the DataObject object to load the data which is then passed back to the target component. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## OLEStartDrag Event, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_OLEStartDrag* Source object is starting an [OLE drag & drop](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_oledragdrop) operation. ### Syntax | | | | --- | --- | | VB.NET | **Private Sub** *object*_**OLEStartDrag**(**ByVal** *sender* **As Object**, **ByVal** *e* **As ***[EventArgumentType](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/r_EventArgumentType)*) **Handles** *object*.**OLEStartDrag** | | VB | **Private Sub** *object*_**OLEStartDrag**(*Data* **As [DataObject](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_DataObject)**, *AllowedEffects* **As Long**) | | C#.NET | **void** *object*_**OLEStartDrag**(**object** *sender*, *EventArgumentType e*); | | VC++ | **void** On**OLEStartDrag***object*(**struct IVDMDataObject**** *Data*, **long*** *AllowedEffects*); | | C | **HRESULT** On**OLEStartDrag***object*(**struct IVDMDataObject**** *Data*, **long*** *AllowedEffects*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Data A DataObject object containing formats that the source will provide and, in addition, possibly the data for those formats. If no data is contained in the DataObject, it is provided when the control calls the GetData method and you should provide the values for the *Data* parameter. AllowedEffects A Long variable set by the source object identifying all effects it supports. This parameter must be correctly set by the target component during this event. The value of *Effect* is determined by logically Or'ing together all active effects. The target component should check these effects and other parameters to determine which actions are appropriate for it, and then set this parameter to one of the allowable effects (as specified by the source) to specify which actions will be performed if the user drops the selection on the component. | Name | Value | Description | | --- | --- | --- | | vbDropEffectNone | 0 | Drop target cannot accept the data. | | vbDropEffectCopy | 1 | Drop results in a copy of data from the source to the target. The original data is unaltered by the drag operation. | | vbDropEffectMove | 2 | Drop results in data being moved from the drag source to the drop source. The drag source should remove the data from itself after the move. | **Note:** Only Visual Basic offers the predefined constants vbDropEffectNone, etc. When using other languages, the constants have to be defined explicitly by the application. ### Comments The OLEStartDrag event occurs when source object is starting an OLE drag & drop operation. This event specifies the data formats and drop effects that the source component supports. It can also be used to insert data into the DataObject object. You may want to defer placing data into the DataObject object until the target component requests it. This allows the source component to save time by not loading multiple data formats. When the target performs the GetData method on the DataObject, the source's [OLESetData](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_OLESetData) event will occur if the requested data is not contained in the DataObject. At this point, the data can be loaded into the DataObject, which will in turn provide the data to the target. If the user does not load any formats into the DataObject using [SetData](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/DataObject_SetData), the drag & drop operation is cancelled. *AllowedEffects* must be set to vbDropEffectCopy or vbDropEffectMove, otherwise the drag & drop operation is cancelled. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## OptimalHeight Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_OptimalHeight* Returns the control's optimal height. ### Syntax Get | | | | --- | --- | | VB.NET | *Height* = *object*.**OptimalHeight** **As Integer** | | VB | *Height* = *object*.**OptimalHeight** **As Integer** | | C#.NET | **int** *Height* = *object*.**OptimalHeight**; | | VC++ | **int** *Height* = *object*->**OptimalHeight**;
**int** *Height* = *object*->Get**OptimalHeight**(); | | C | **HRESULT** *object*->get_**OptimalHeight**(**int*** *Height*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Height Returns the control's optimal height in pixels. ### Comments The OptimalHeight property returns the control's optimal height. The optimal height returned allows all text and picture components to be displayed without being clipped. The [OptimalWidth](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_OptimalWidth) property returns the control's optimal width. The [AutoSize](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_AutoSize) property can be used to automatically resize the control based on its contents. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## OptimalWidth Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_OptimalWidth* Returns the control's optimal width. ### Syntax Get | | | | --- | --- | | VB.NET | *Width* = *object*.**OptimalWidth** **As Integer** | | VB | *Width* = *object*.**OptimalWidth** **As Integer** | | C#.NET | **int** *Width* = *object*.**OptimalWidth**; | | VC++ | **int** *Width* = *object*->**OptimalWidth**;
**int** *Width* = *object*->Get**OptimalWidth**(); | | C | **HRESULT** *object*->get_**OptimalWidth**(**int*** *Width*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Width Returns the control's optimal width. ### Comments The OptimalWidth property returns the control's optimal width. The optimal width returned allows all text and picture components to be displayed without being clipped. The [OptimalHeight](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_OptimalHeight) property returns the control's optimal height. The [AutoSize](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_AutoSize) property can be used to automatically resize the control based on its contents. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Orientation Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Orientation* Defines the text and picture orientation. ### Syntax Get | | | | --- | --- | | VB.NET | *Orientation* = *object*.**Orientation** **As [SftButtonOrientationConstants](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonOrientationConstants)** | | VB | *Orientation* = *object*.**Orientation** **As SftButtonOrientationConstants** | | C#.NET | **SftButtonOrientationConstants** *Orientation* = *object*.**Orientation**; | | VC++ | **enum SftButtonOrientationConstants** *Orientation* = *object*->**Orientation**;
**enum SftButtonOrientationConstants** *Orientation* = *object*->Get**Orientation**(); | | C | **HRESULT** *object*->get_**Orientation**(**enum SftButtonOrientationConstants*** *Orientation*); | Put | | | | --- | --- | | VB.NET | *object*.**Orientation** = *Orientation* **As SftButtonOrientationConstants** | | VB | *object*.**Orientation** = *Orientation* **As SftButtonOrientationConstants** | | C#.NET | **SftButtonOrientationConstants** *object*.**Orientation** = *Orientation*; | | VC++ | **enum SftButtonOrientationConstants** *object*->**Orientation** = *Orientation*;
**void** *object*->Put**Orientation**(**enum SftButtonOrientationConstants** *Orientation*); | | C | **HRESULT** *object*->put_**Orientation**(**enum SftButtonOrientationConstants** *Orientation*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Orientation Defines the text and picture orientation. | Name | Value | Description | | --- | --- | --- | | orientationSftButtonHorizontal | 0 | Text and picture components are positioned horizontally (left to right). ![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/orient_horz.gif) | | orientationSftButtonVertical | 1 | Text and picture components are positioned vertically (top to bottom). ![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/orient_vert.gif) | ### Comments The Orientation property defines the text and picture orientation. For detailed information on the use of the Orientation, [Image1](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1), [Image1AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignHorz), [Image1AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignVert), [Image2](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2), [Image2AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignHorz), [Image2AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignVert), [Text](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Text), [TextAlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_TextAlignHorz), [TextAlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_TextAlignVert) properties, please see "[Button Label](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_label)". See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Picture Property, SftPictureObject Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Picture* Defines the image object using an OLE Picture object (IPictureDisp interface). ### Syntax Get | | | | --- | --- | | VB.NET | *pPictureDisp* = *object*.**Picture** **As stdole.IPictureDisp[![\](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_dotnet)** | | VB | **Set** *pPictureDisp* = *object*.**Picture** **As IPictureDisp** | | C#.NET | **stdole.IPictureDisp![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *pPictureDisp* = *object*.**Picture**; | | VC++ | **IPictureDisp*** *pPictureDisp* = *object*->Get**Picture**(); | | C | **HRESULT** *object*->get_**Picture**(**IPictureDisp**** *pPictureDisp*); | Put | | | | --- | --- | | VB.NET | *object*.let_**Picture**(**ByVal** *pPictureDisp* **As stdole.IPictureDisp![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)**) | | VB | *object*.**Picture** = *pPictureDisp* **As IPictureDisp** | | C#.NET | **void** *object*.let_**Picture**(**stdole.IPictureDisp![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *pPictureDisp*); | | VC++ | **void** *object*->Put**Picture**(**IPictureDisp*** *pPictureDisp*); | | C | **HRESULT** *object*->put_**Picture**(**IPictureDisp*** *pPictureDisp*); | PutRef | | | | --- | --- | | VB.NET | *object*.**Picture** = *pPictureDisp* **As stdole.IPictureDisp![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** | | VB | **Set** *object*.**Picture** = *pPictureDisp* **As IPictureDisp** | | C#.NET | **stdole.IPictureDisp![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *object*.**Picture** = *pPictureDisp*; | | VC++ | **void** *object*->PutRef**Picture**(**IPictureDisp*** *pPictureDisp*); | | C | **HRESULT** *object*->putref_**Picture**(**IPictureDisp*** *pPictureDisp*); | object A [SftPictureObject object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject). pPictureDisp Defines the image object using an OLE Picture object (IPictureDisp interface). For information about picture properties, please visit the applicable section "[Using SftButton/OCX with ...](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using)". ### Comments The Picture property defines the image object using an OLE Picture object (IPictureDisp interface). Typically, .NET applications use the [NETImageObject](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_NETImageObject) property to define an image, C and C++ applications use [BitmapHandle](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_BitmapHandle) or [Image](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Image), VB6 and other COM applications use the [Picture](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Picture) property. The SftPictureObject.[Type](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Type) property is set to sftTypeIDispatch. The SftPictureObject.[ActualHeight](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_ActualHeight) and SftPictureObject.[ActualWidth](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_ActualWidth) properties reflect the image size. See Also SftPictureObject Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Picture1 Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Picture1* Defines the first graphic. > Deprecated - Provided for compatibility with earlier versions only - Use the [Image1](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1) property instead ### Syntax Get | | | | --- | --- | | VB.NET | *refPictureObj* = *object*.**Picture1** **As System.Drawing.Image[![\](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_dotnet)** | | VB | **Set** *refPictureObj* = *object*.**Picture1** **As IPictureDisp** | | C#.NET | **System.Drawing.Image![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *refPictureObj* = *object*.**Picture1**; | | VC++ | **IPictureDisp*** *refPictureObj* = *object*->Get**Picture1**(); | | C | **HRESULT** *object*->get_**Picture1**(**IPictureDisp**** *refPictureObj*); | Put | | | | --- | --- | | VB.NET | *object*.let_**Picture1**(**ByVal** *refPictureObj* **As System.Drawing.Image![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)**) | | VB | *object*.**Picture1** = *refPictureObj* **As IPictureDisp** | | C#.NET | **void** *object*.let_**Picture1**(**System.Drawing.Image![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *refPictureObj*); | | VC++ | **void** *object*->Put**Picture1**(**IPictureDisp*** *refPictureObj*); | | C | **HRESULT** *object*->put_**Picture1**(**IPictureDisp*** *refPictureObj*); | PutRef | | | | --- | --- | | VB.NET | *object*.**Picture1** = *refPictureObj* **As System.Drawing.Image![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** | | VB | **Set** *object*.**Picture1** = *refPictureObj* **As IPictureDisp** | | C#.NET | **System.Drawing.Image![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *object*.**Picture1** = *refPictureObj*; | | VC++ | **void** *object*->PutRef**Picture1**(**IPictureDisp*** *refPictureObj*); | | C | **HRESULT** *object*->putref_**Picture1**(**IPictureDisp*** *refPictureObj*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). refPictureObj Defines the first graphic. Bitmaps, icons and metafiles are supported. For information about picture properties, please visit the applicable section "[Using SftButton/OCX with ...](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using)". ### Comments > Deprecated - Provided for compatibility with earlier versions only - Use the Image1 property instead The Picture1 property defines the first graphic. If the Picture object describes a bitmap, the picture uses [Bitmap Transparency](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_transparency) and the bitmap is drawn in a grayed fashion if the control is disabled (see [Enabled](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Enabled) property). The layout of the [button label](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_label) and the position and alignment of the first picture component are defined using the [Orientation](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Orientation), [Image1AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignHorz) and [Image1AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignVert) properties. For detailed information on the use of the Orientation, Image1, Image1AlignHorz, Image1AlignVert, [Image2](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2), [Image2AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignHorz), [Image2AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignVert), [Text](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Text), [TextAlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_TextAlignHorz), [TextAlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_TextAlignVert) properties, please see "Button Label". Using *PutRef* (see Syntax above) the control will use the reference to the Picture object. If the Picture object is later changed, this will also affect the image used by the control. Using *Put* instead causes the control to create a copy of the Picture object. If the Picture object is later changed, this will not affect the image used by the control as it uses a copy of the object. Because of the additional overhead and the increased resource use of *Put*, *PutRef* is the preferred method. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Picture1AlignHorz Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Picture1AlignHorz* Defines the horizontal alignment of the first graphic. > Deprecated - Provided for compatibility with earlier versions only - Use the [Image1AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignHorz) property instead ### Syntax Get | | | | --- | --- | | VB.NET | *Align* = *object*.**Picture1AlignHorz** **As [SftButtonAlignConstants](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonAlignConstants)** | | VB | *Align* = *object*.**Picture1AlignHorz** **As SftButtonAlignConstants** | | C#.NET | **SftButtonAlignConstants** *Align* = *object*.**Picture1AlignHorz**; | | VC++ | **enum SftButtonAlignConstants** *Align* = *object*->**Picture1AlignHorz**;
**enum SftButtonAlignConstants** *Align* = *object*->Get**Picture1AlignHorz**(); | | C | **HRESULT** *object*->get_**Picture1AlignHorz**(**enum SftButtonAlignConstants*** *Align*); | Put | | | | --- | --- | | VB.NET | *object*.**Picture1AlignHorz** = *Align* **As SftButtonAlignConstants** | | VB | *object*.**Picture1AlignHorz** = *Align* **As SftButtonAlignConstants** | | C#.NET | **SftButtonAlignConstants** *object*.**Picture1AlignHorz** = *Align*; | | VC++ | **enum SftButtonAlignConstants** *object*->**Picture1AlignHorz** = *Align*;
**void** *object*->Put**Picture1AlignHorz**(**enum SftButtonAlignConstants** *Align*); | | C | **HRESULT** *object*->put_**Picture1AlignHorz**(**enum SftButtonAlignConstants** *Align*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Align Defines the horizontal alignment of the first graphic. | Name | Value | Description | | --- | --- | --- | | alignSftButtonCenter | 0 | The picture component is horizontally centered within the available space. | | alignSftButtonLeft | 1 | The picture component is left aligned within the available space. | | alignSftButtonRight | 2 | The picture component is right aligned within the available space. | ### Comments > Deprecated - Provided for compatibility with earlier versions only - Use the Image1AlignHorz property instead The Picture1AlignHorz property defines the horizontal alignment of the first graphic. The layout of the [button label](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_label) and the position and alignment of the first picture component are defined using the [Orientation](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Orientation), Image1AlignHorz and [Image1AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignVert) properties. For detailed information on the use of the Orientation, [Image1](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1), Image1AlignHorz, Image1AlignVert, [Image2](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2), [Image2AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignHorz), [Image2AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignVert), [Text](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Text), [TextAlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_TextAlignHorz), [TextAlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_TextAlignVert) properties, please see "Button Label". See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Picture1AlignVert Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Picture1AlignVert* Defines the vertical alignment of the first graphic. > Deprecated - Provided for compatibility with earlier versions only - Use the [Image1AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignVert) property instead ### Syntax Get | | | | --- | --- | | VB.NET | *Align* = *object*.**Picture1AlignVert** **As [SftButtonAlignVertConstants](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonAlignVertConstants)** | | VB | *Align* = *object*.**Picture1AlignVert** **As SftButtonAlignVertConstants** | | C#.NET | **SftButtonAlignVertConstants** *Align* = *object*.**Picture1AlignVert**; | | VC++ | **enum SftButtonAlignVertConstants** *Align* = *object*->**Picture1AlignVert**;
**enum SftButtonAlignVertConstants** *Align* = *object*->Get**Picture1AlignVert**(); | | C | **HRESULT** *object*->get_**Picture1AlignVert**(**enum SftButtonAlignVertConstants*** *Align*); | Put | | | | --- | --- | | VB.NET | *object*.**Picture1AlignVert** = *Align* **As SftButtonAlignVertConstants** | | VB | *object*.**Picture1AlignVert** = *Align* **As SftButtonAlignVertConstants** | | C#.NET | **SftButtonAlignVertConstants** *object*.**Picture1AlignVert** = *Align*; | | VC++ | **enum SftButtonAlignVertConstants** *object*->**Picture1AlignVert** = *Align*;
**void** *object*->Put**Picture1AlignVert**(**enum SftButtonAlignVertConstants** *Align*); | | C | **HRESULT** *object*->put_**Picture1AlignVert**(**enum SftButtonAlignVertConstants** *Align*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Align Defines the horizontal alignment of the first graphic. | Name | Value | Description | | --- | --- | --- | | alignSftButtonVCenter | 0 | The picture component is vertically centered within the available space. | | alignSftButtonTop | 1 | The picture component is aligned with the top of the available space. | | alignSftButtonBottom | 2 | The picture component is aligned with the bottom of the available space. | ### Comments > Deprecated - Provided for compatibility with earlier versions only - Use the Image1AlignVert property instead The Picture1AlignVert property defines the vertical alignment of the first graphic. The layout of the [button label](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_label) and the position and alignment of the first picture component are defined using the [Orientation](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Orientation), [Image1AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignHorz) and Image1AlignVert properties. For detailed information on the use of the Orientation, [Image1](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1), Image1AlignHorz, Image1AlignVert, [Image2](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2), [Image2AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignHorz), [Image2AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignVert), [Text](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Text), [TextAlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_TextAlignHorz), [TextAlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_TextAlignVert) properties, please see "Button Label". See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Picture2 Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Picture2* Defines the second graphic. > Deprecated - Provided for compatibility with earlier versions only - Use the [Image2](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2) property instead ### Syntax Get | | | | --- | --- | | VB.NET | *refPictureObj* = *object*.**Picture2** **As System.Drawing.Image[![\](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_dotnet)** | | VB | **Set** *refPictureObj* = *object*.**Picture2** **As IPictureDisp** | | C#.NET | **System.Drawing.Image![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *refPictureObj* = *object*.**Picture2**; | | VC++ | **IPictureDisp*** *refPictureObj* = *object*->Get**Picture2**(); | | C | **HRESULT** *object*->get_**Picture2**(**IPictureDisp**** *refPictureObj*); | Put | | | | --- | --- | | VB.NET | *object*.let_**Picture2**(**ByVal** *refPictureObj* **As System.Drawing.Image![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)**) | | VB | *object*.**Picture2** = *refPictureObj* **As IPictureDisp** | | C#.NET | **void** *object*.let_**Picture2**(**System.Drawing.Image![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *refPictureObj*); | | VC++ | **void** *object*->Put**Picture2**(**IPictureDisp*** *refPictureObj*); | | C | **HRESULT** *object*->put_**Picture2**(**IPictureDisp*** *refPictureObj*); | PutRef | | | | --- | --- | | VB.NET | *object*.**Picture2** = *refPictureObj* **As System.Drawing.Image![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** | | VB | **Set** *object*.**Picture2** = *refPictureObj* **As IPictureDisp** | | C#.NET | **System.Drawing.Image![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *object*.**Picture2** = *refPictureObj*; | | VC++ | **void** *object*->PutRef**Picture2**(**IPictureDisp*** *refPictureObj*); | | C | **HRESULT** *object*->putref_**Picture2**(**IPictureDisp*** *refPictureObj*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). refPictureObj Defines the second graphic. Bitmaps, icons and metafiles are supported. For information about picture properties, please visit the applicable section "[Using SftButton/OCX with ...](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using)". ### Comments > Deprecated - Provided for compatibility with earlier versions only - Use the Image2 property instead The Picture2 property defines the second graphic. If the Picture object describes a bitmap, the picture uses [Bitmap Transparency](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_transparency) and the bitmap is drawn in a grayed fashion if the control is disabled (see [Enabled](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Enabled) property). The layout of the [button label](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_label) and the position and alignment of the first picture component are defined using the [Orientation](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Orientation), [Image1AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignHorz) and [Image1AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignVert) properties. For detailed information on the use of the Orientation, [Image1](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1), Image1AlignHorz, Image1AlignVert, Image2, [Image2AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignHorz), [Image2AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignVert), [Text](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Text), [TextAlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_TextAlignHorz), [TextAlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_TextAlignVert) properties, please see "Button Label". Using *PutRef* (see Syntax above) the control will use the reference to the Picture object. If the Picture object is later changed, this will also affect the image used by the control. Using *Put* instead causes the control to create a copy of the Picture object. If the Picture object is later changed, this will not affect the image used by the control as it uses a copy of the object. Because of the additional overhead and the increased resource use of *Put*, *PutRef* is the preferred method. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Picture2AlignHorz Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Picture2AlignHorz* Defines the horizontal alignment of the second graphic. > Deprecated - Provided for compatibility with earlier versions only - Use the [Image2AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignHorz) property instead ### Syntax Get | | | | --- | --- | | VB.NET | *Align* = *object*.**Picture2AlignHorz** **As [SftButtonAlignConstants](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonAlignConstants)** | | VB | *Align* = *object*.**Picture2AlignHorz** **As SftButtonAlignConstants** | | C#.NET | **SftButtonAlignConstants** *Align* = *object*.**Picture2AlignHorz**; | | VC++ | **enum SftButtonAlignConstants** *Align* = *object*->**Picture2AlignHorz**;
**enum SftButtonAlignConstants** *Align* = *object*->Get**Picture2AlignHorz**(); | | C | **HRESULT** *object*->get_**Picture2AlignHorz**(**enum SftButtonAlignConstants*** *Align*); | Put | | | | --- | --- | | VB.NET | *object*.**Picture2AlignHorz** = *Align* **As SftButtonAlignConstants** | | VB | *object*.**Picture2AlignHorz** = *Align* **As SftButtonAlignConstants** | | C#.NET | **SftButtonAlignConstants** *object*.**Picture2AlignHorz** = *Align*; | | VC++ | **enum SftButtonAlignConstants** *object*->**Picture2AlignHorz** = *Align*;
**void** *object*->Put**Picture2AlignHorz**(**enum SftButtonAlignConstants** *Align*); | | C | **HRESULT** *object*->put_**Picture2AlignHorz**(**enum SftButtonAlignConstants** *Align*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Align Defines the horizontal alignment of the second graphic. | Name | Value | Description | | --- | --- | --- | | alignSftButtonCenter | 0 | The picture component is horizontally centered within the available space. | | alignSftButtonLeft | 1 | The picture component is left aligned within the available space. | | alignSftButtonRight | 2 | The picture component is right aligned within the available space. | ### Comments > Deprecated - Provided for compatibility with earlier versions only - Use the Image2AlignHorz property instead The Picture2AlignHorz property defines the horizontal alignment of the second graphic. The layout of the [button label](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_label) and the position and alignment of the first picture component are defined using the [Orientation](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Orientation), [Image1AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignHorz) and [Image1AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignVert) properties. For detailed information on the use of the Orientation, [Image1](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1), Image1AlignHorz, Image1AlignVert, [Image2](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2), Image2AlignHorz, [Image2AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignVert), [Text](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Text), [TextAlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_TextAlignHorz), [TextAlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_TextAlignVert) properties, please see "Button Label". See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Picture2AlignVert Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Picture2AlignVert* Defines the vertical alignment of the second graphic. > Deprecated - Provided for compatibility with earlier versions only - Use the [Image2AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignVert) property instead ### Syntax Get | | | | --- | --- | | VB.NET | *Align* = *object*.**Picture2AlignVert** **As [SftButtonAlignVertConstants](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonAlignVertConstants)** | | VB | *Align* = *object*.**Picture2AlignVert** **As SftButtonAlignVertConstants** | | C#.NET | **SftButtonAlignVertConstants** *Align* = *object*.**Picture2AlignVert**; | | VC++ | **enum SftButtonAlignVertConstants** *Align* = *object*->**Picture2AlignVert**;
**enum SftButtonAlignVertConstants** *Align* = *object*->Get**Picture2AlignVert**(); | | C | **HRESULT** *object*->get_**Picture2AlignVert**(**enum SftButtonAlignVertConstants*** *Align*); | Put | | | | --- | --- | | VB.NET | *object*.**Picture2AlignVert** = *Align* **As SftButtonAlignVertConstants** | | VB | *object*.**Picture2AlignVert** = *Align* **As SftButtonAlignVertConstants** | | C#.NET | **SftButtonAlignVertConstants** *object*.**Picture2AlignVert** = *Align*; | | VC++ | **enum SftButtonAlignVertConstants** *object*->**Picture2AlignVert** = *Align*;
**void** *object*->Put**Picture2AlignVert**(**enum SftButtonAlignVertConstants** *Align*); | | C | **HRESULT** *object*->put_**Picture2AlignVert**(**enum SftButtonAlignVertConstants** *Align*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Align Defines the vertical alignment of the second graphic. | Name | Value | Description | | --- | --- | --- | | alignSftButtonVCenter | 0 | The picture component is vertically centered within the available space. | | alignSftButtonTop | 1 | The picture component is aligned with the top of the available space. | | alignSftButtonBottom | 2 | The picture component is aligned with the bottom of the available space. | ### Comments > Deprecated - Provided for compatibility with earlier versions only - Use the Image2AlignVert property instead The Picture2AlignVert property defines the vertical alignment of the second graphic. The layout of the [button label](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_label) and the position and alignment of the first picture component are defined using the [Orientation](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Orientation), [Image1AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignHorz) and [Image1AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignVert) properties. For detailed information on the use of the Orientation, [Image1](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1), Image1AlignHorz, Image1AlignVert, [Image2](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2), [Image2AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignHorz), Image2AlignVert, [Text](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Text), [TextAlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_TextAlignHorz), [TextAlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_TextAlignVert) properties, please see "Button Label". See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## PictureH Property, SftPictureObject Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_PictureH* Defines the image object as an OLE Picture object (using a bitmap/icon handle). > Deprecated - Provided for compatibility with earlier versions only - Use [SftPictureObject](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject).[BitmapHandle](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_BitmapHandle) or SftPictureObject.[IconHandle](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_IconHandle) instead ### Syntax Get | | | | --- | --- | | VB.NET | *Handle* = *object*.**PictureH** **As Integer** | | VB | *Handle* = *object*.**PictureH** **As OLE_HANDLE** | | C#.NET | **int** *Handle* = *object*.**PictureH**; | | VC++ | **OLE_HANDLE** *Handle* = *object*->**PictureH**;
**OLE_HANDLE** *Handle* = *object*->Get**PictureH**(); | | C | **HRESULT** *object*->get_**PictureH**(**OLE_HANDLE*** *Handle*); | Put | | | | --- | --- | | VB.NET | *object*.**PictureH** = *Handle* **As Integer** | | VB | *object*.**PictureH** = *Handle* **As OLE_HANDLE** | | C#.NET | **int** *object*.**PictureH** = *Handle*; | | VC++ | **OLE_HANDLE** *object*->**PictureH** = *Handle*;
**void** *object*->Put**PictureH**(**OLE_HANDLE** *Handle*); | | C | **HRESULT** *object*->put_**PictureH**(**OLE_HANDLE** *Handle*); | object A SftPictureObject object. Handle Defines the image object as an OLE Picture object (using a bitmap/icon handle). The handle can be NULL, in which case the SftPictureObject is cleared. ### Comments > Deprecated - Provided for compatibility with earlier versions only - Use SftPictureObject.BitmapHandle or SftPictureObject.IconHandle instead The PictureH property defines the image object as an OLE Picture object (using a bitmap/icon handle). The SftPictureObject.[Type](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Type) property is set to sftTypeIDispatch. The SftPictureObject.[ActualHeight](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_ActualHeight) and SftPictureObject.[ActualWidth](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_ActualWidth) properties reflect the image size. See Also SftPictureObject Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Pressed Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Pressed* Defines whether the button is pressed ([toggle button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_toggle) only). ### Syntax Get | | | | --- | --- | | VB.NET | *Boolean* = *object*.**Pressed** **As Boolean** | | VB | *Boolean* = *object*.**Pressed** **As Boolean** | | C#.NET | **bool** *Boolean* = *object*.**Pressed**; | | VC++ | **VARIANT_BOOL** *Boolean* = *object*->**Pressed**;
**VARIANT_BOOL** *Boolean* = *object*->Get**Pressed**(); | | C | **HRESULT** *object*->get_**Pressed**(**VARIANT_BOOL*** *Boolean*); | Put | | | | --- | --- | | VB.NET | *object*.**Pressed** = *Boolean* **As Boolean** | | VB | *object*.**Pressed** = *Boolean* **As Boolean** | | C#.NET | **bool** *object*.**Pressed** = *Boolean*; | | VC++ | **VARIANT_BOOL** *object*->**Pressed** = *Boolean*;
**void** *object*->Put**Pressed**(**VARIANT_BOOL** *Boolean*); | | C | **HRESULT** *object*->put_**Pressed**(**VARIANT_BOOL** *Boolean*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Boolean Defines whether the button is pressed (toggle button only). | Boolean | Description | | --- | --- | | True | The button is pressed. | | False | The button is released. | ### Comments The Pressed property defines whether the button is pressed (toggle button only). When using the Pressed property, the [Click](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_Click) event does not occur. The [Toggle](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Toggle) property must be set to True for this property to have an effect. The [drop down button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_dropdown) portion is controlled by the equivalent [DropDownPressed](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_DropDownPressed) property. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Refresh Method, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Refresh* Repaints the entire control. ### Syntax | | | | --- | --- | | VB.NET | *object*.**Refresh**()*object*.**CtlRefresh**() | | VB | *object*.**Refresh** | | C#.NET | **void** *object*.**Refresh**();
**void** *object*.**CtlRefresh**(); | | VC++ | **HRESULT** *object*->**Refresh**(); | | C | **HRESULT** *object*->raw_**Refresh**(); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). ### Comments The Refresh method repaints the entire control. Painting a control is handled automatically while no events are occurring. However, there may be situations where you want the control updated immediately. The Refresh method causes the control to be immediately repainted. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## RightToLeft Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_RightToLeft* Defines the display direction and visual appearance on a bidirectional system. ### Syntax Get | | | | --- | --- | | VB.NET | *Boolean* = *object*.**RightToLeft** **As Boolean**
*Boolean* = *object*.**CtlRightToLeft** **As Boolean** | | VB | *Boolean* = *object*.**RightToLeft** **As Boolean** | | C#.NET | **bool** *Boolean* = *object*.**RightToLeft**;
**bool** *Boolean* = *object*.**CtlRightToLeft**; | | VC++ | **VARIANT_BOOL** *Boolean* = *object*->**RightToLeft**;
**VARIANT_BOOL** *Boolean* = *object*->Get**RightToLeft**(); | | C | **HRESULT** *object*->get_**RightToLeft**(**VARIANT_BOOL*** *Boolean*); | Put | | | | --- | --- | | VB.NET | *object*.**RightToLeft** = *Boolean* **As Boolean**
*object*.**CtlRightToLeft** = *Boolean* **As Boolean** | | VB | *object*.**RightToLeft** = *Boolean* **As Boolean** | | C#.NET | **bool** *object*.**RightToLeft** = *Boolean*;
**bool** *object*.**CtlRightToLeft** = *Boolean*; | | VC++ | **VARIANT_BOOL** *object*->**RightToLeft** = *Boolean*;
**void** *object*->Put**RightToLeft**(**VARIANT_BOOL** *Boolean*); | | C | **HRESULT** *object*->put_**RightToLeft**(**VARIANT_BOOL** *Boolean*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Boolean Defines the display direction and visual appearance on a bidirectional system. | Boolean | Description | | --- | --- | | True | The control is used on a bi-directional platform (such as Arabic or Hebrew Windows) and the display direction is right-to-left. | | False | The display direction is left-to-right. | ### Comments The RightToLeft property defines the display direction and visual appearance on a bidirectional system. The RightToLeft property automatically resets to False if the current system does not support right-to-left representation (i.e., the current platform is not an Arabic or Hebrew Windows version). See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## SampleColor Property, SftPictureObject Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_SampleColor* Defines the picture object as a [color sample](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_SetColorSample). ### Syntax Get | | | | --- | --- | | VB.NET | *Clr* = *object*.**SampleColor** **As UInteger[![\](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_dotnet)** | | VB | *Clr* = *object*.**SampleColor** **As OLE_COLOR** | | C#.NET | **uint![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *Clr* = *object*.**SampleColor**; | | VC++ | **OLE_COLOR** *Clr* = *object*->**SampleColor**;
**OLE_COLOR** *Clr* = *object*->Get**SampleColor**(); | | C | **HRESULT** *object*->get_**SampleColor**(**OLE_COLOR*** *Clr*); | Put | | | | --- | --- | | VB.NET | *object*.**SampleColor** = *Clr* **As UInteger![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** | | VB | *object*.**SampleColor** = *Clr* **As OLE_COLOR** | | C#.NET | **uint![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *object*.**SampleColor** = *Clr*; | | VC++ | **OLE_COLOR** *object*->**SampleColor** = *Clr*;
**void** *object*->Put**SampleColor**(**OLE_COLOR** *Clr*); | | C | **HRESULT** *object*->put_**SampleColor**(**OLE_COLOR** *Clr*); | object A [SftPictureObject object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject). Clr Defines the picture object as a color sample. For information about color properties, please visit the applicable section "[Using SftButton/OCX with ...](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using)". ### Comments The SampleColor property defines the picture object as a color sample. The SftPictureObject.[Type](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Type) property is set to sftTypeColorSample. The SftPictureObject.[Height](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Height) and SftPictureObject.[Width](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Width) properties should be used to define the requested image size. The SftPictureObject.[FrameColor](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_FrameColor) property can be used to define the border color of the color sample. See Also SftPictureObject Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## SetColorSample Method, SftPictureObject Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_SetColorSample* Defines the picture object as a color sample. ### Syntax | | | | --- | --- | | VB.NET | *object*.**SetColorSample**(**ByVal** *SampleColor* **As UInteger[![\](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_dotnet)**, **ByVal** *FrameColor* **As UInteger![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)**) | | VB | *object*.**SetColorSample**(**ByVal** *SampleColor* **As OLE_COLOR**, **ByVal** *FrameColor* **As OLE_COLOR**) | | C#.NET | **void** *object*.**SetColorSample**(**uint![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *SampleColor*, **uint![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *FrameColor*); | | VC++ | **HRESULT** *object*->**SetColorSample**(**OLE_COLOR** *SampleColor*, **OLE_COLOR** *FrameColor*); | | C | **HRESULT** *object*->raw_**SetColorSample**(**OLE_COLOR** *SampleColor*, **OLE_COLOR** *FrameColor*); | object A [SftPictureObject object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject). SampleColor Defines the color sample. For information about color properties, please visit the applicable section "[Using SftButton/OCX with ...](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using)". FrameColor Defines the border color. For information about color properties, please visit the applicable section "Using SftButton/OCX with ...". ### Comments The SetColorSample method defines the picture object as a color sample. The SftPictureObject.[Type](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Type) property is set to sftTypeColorSample. The SftPictureObject.[Height](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Height) and SftPictureObject.[Width](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Width) properties should be used to define the requested image size. The color sample can also be defined using the SftPictureObject.[SampleColor](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_SampleColor) and SftPictureObject.[FrameColor](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_FrameColor) properties. See Also SftPictureObject Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## DataObject.SetData Method *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/DataObject_SetData* Adds a supported format and possibly its data to a [DataObject](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_DataObject) object. ### Syntax | | | | --- | --- | | VB.NET | *object*.**SetData**([ **ByVal** *Data* **As Object** ] , [ **ByVal** *Format* **As Object** ] ) | | VB | *object*.**SetData**([ **ByVal** *Data* **As Variant** ] , [ **ByVal** *Format* **As Variant** ] ) | | C#.NET | **void** *object*.**SetData**(**object** *Data*, **object** *Format*); | | VC++ | **HRESULT** *object*->**SetData**(**const _variant_t**&**** *Data* = **vtMissing**, **const _variant_t**&**** *Format* = **vtMissing**); | | C | **HRESULT** *object*->raw_**SetData**(**VARIANT** *Data*, **VARIANT** *Format*); | object A DataObject object. Data The data to be passed to the DataObject object. The Data argument is optional. Format The data format. The Format argument is optional. | Name | Value | Description | | --- | --- | --- | | sftCFText | 1 | Text (as String value) | | sftCFBitmap | 2 | Bitmap (as Picture object) | | sftCFMetafile | 3 | Metafile (as Picture object) | | sftCFDIB | 8 | Device independent bitmap (as Picture object) | | sftCFFiles | 15 | List of files. SetData cannot be used to supply data for this format. Use the Files collection instead. | | sftCFRTF | -16639 | Rich text format (as String value) | ### Comments The SetData method adds a supported format and possibly its data to a DataObject object. The *Data* argument is optional. This allows you to set several different formats that the source component can support without having to load the data separately for each format. Multiple formats are set by calling SetData several times, each time using a different format. If you wish to start fresh, use the [Clear](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/DataObject_Clear) method to clear all data and format information from the DataObject. The *Format* argument is also optional, but either the *Data* or *Format* argument must be specified. If *Data* is specified, but not *Format*, the format of the data is determined automatically. If this is unsuccessful, then an error is generated. When the target requests the data and a format was specified, but no data was provided, the source's OLESetData event occurs, and the source can then provide the requested data type. It is possible for the [GetData](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/DataObject_GetData) and SetData methods to use data formats other than those listed as valid *Format* argument, including user-defined formats registered with Windows via the RegisterClipboardFormat() API function. The SetData method requires the data to be in the form of a byte array when it does not recognize the data format specified. The GetData method always returns data in a byte array when it is in a format that it doesn't recognize, although this may be transparently converted into other data types, such as strings. The byte array returned by GetData will be larger than the actual data when running on some operating systems, with arbitrary bytes at the end of the array. This allocation of memory is often larger than is actually required for the data. Therefore, there may be extraneous bytes near the end of the allocated memory segment. See Also DataObject Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## SetImage Method, SftPictureObject Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_SetImage* Defines the picture object attributes defined as a [GDI+](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_gdiplus) image. ### Syntax | | | | --- | --- | | VB.NET | *object*.**SetImage**(**ByVal** *GDIPlusImage* **As Integer**, **ByVal** *Owned* **As Boolean**) | | VB | *object*.**SetImage**(**ByVal** *GDIPlusImage* **As LONG_PTR**, **ByVal** *Owned* **As Boolean**) | | C#.NET | **void** *object*.**SetImage**(**int** *GDIPlusImage*, **bool** *Owned*); | | VC++ | **HRESULT** *object*->**SetImage**(**LONG_PTR** *GDIPlusImage*, **VARIANT_BOOL** *Owned*); | | C | **HRESULT** *object*->raw_**SetImage**(**LONG_PTR** *GDIPlusImage*, **VARIANT_BOOL** *Owned*); | object A [SftPictureObject object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject). GDIPlusImage A pointer to a Gdiplus::Image object. Owned Set to True if the GDI+ image is owned by the control, False otherwise. ### Comments The SetImage method defines the picture object attributes defined as a GDI+ image. The SetImage property offers support for PNG, TIFF, JPEG, GIF, Exif, EMF+, EMF (GDI+ images) with full support for alpha-blended (translucent and semi-transparent) images. If *Owned* is set to False, the image remains owned by the application and must remain valid as long as it is used by the control. Once it is no longer needed, it must be deleted by the application. Most languages, except C++, automatically delete the object when it is no longer needed so no action is usually necessary. If *Owned* is set to True, the control automatically deletes the image object when it is no longer needed. The SftPictureObject.[Type](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Type) property is set to sftTypeGDIPlus. The SftPictureObject.[ActualHeight](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_ActualHeight) and SftPictureObject.[ActualWidth](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_ActualWidth) properties reflect the image size. The [Image](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Image) property can also be used to define the image object using a GDI image, but it does not assign ownership of the GDI+ image to the control. [SetImage](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_SetImage)(image, False) is identical to the use of the Image property. See Also SftPictureObject Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## SetImageList Method, SftPictureObject Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_SetImageList* Defines the picture object as an ImageList image. ### Syntax | | | | --- | --- | | VB.NET | *object*.**SetImageList**(**ByVal** *ImageList* **As Object**, **ByVal** *ImageIndex* **As Short**) | | VB | *object*.**SetImageList**(**ByVal** *ImageList* **As Object**, **ByVal** *ImageIndex* **As Integer**) | | C#.NET | **void** *object*.**SetImageList**(**object** *ImageList*, **short** *ImageIndex*); | | VC++ | **HRESULT** *object*->**SetImageList**(**LPDISPATCH** *ImageList*, **short** *ImageIndex*); | | C | **HRESULT** *object*->raw_**SetImageList**(**LPDISPATCH** *ImageList*, **short** *ImageIndex*); | object A [SftPictureObject object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject). ImageList An ImageList control (supporting the IImageList interface). ImageIndex The one-based index of the image in the ImageList control to be used as graphic. ### Comments The SetImageList method defines the picture object as an ImageList image. SetImageList only supports ActiveX ImageList controls that offer an IImageList interface. GetImageListH and SetImageListH support a window handle based ImageList control (Common Controls). The SftPictureObject.[Type](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Type) property is set to sftTypeImageList. The SftPictureObject.[ActualHeight](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_ActualHeight) and SftPictureObject.[ActualWidth](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_ActualWidth) properties reflect the image size. See Also SftPictureObject Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## SetImageListH Method, SftPictureObject Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_SetImageListH* Defines the picture object as an ImageList image. ### Syntax | | | | --- | --- | | VB.NET | *object*.**SetImageListH**(**ByVal** *ImageListWindow* **As Integer**, **ByVal** *ImageIndex* **As Short**) | | VB | *object*.**SetImageListH**(**ByVal** *ImageListWindow* **As OLE_HANDLE**, **ByVal** *ImageIndex* **As Integer**) | | C#.NET | **void** *object*.**SetImageListH**(**int** *ImageListWindow*, **short** *ImageIndex*); | | VC++ | **HRESULT** *object*->**SetImageListH**(**OLE_HANDLE** *ImageListWindow*, **short** *ImageIndex*); | | C | **HRESULT** *object*->raw_**SetImageListH**(**OLE_HANDLE** *ImageListWindow*, **short** *ImageIndex*); | object A [SftPictureObject object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject). ImageListWindow An ImageList control handle. ImageIndex The one-based index of the image in the ImageList control to be used as graphic. ### Comments The SetImageListH method defines the picture object as an ImageList image. The SftPictureObject.[Type](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Type) property is set to sftTypeImageListH. The SftPictureObject.[ActualHeight](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_ActualHeight) and SftPictureObject.[ActualWidth](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_ActualWidth) properties reflect the image size. See Also SftPictureObject Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## ShadowEdgeColor Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ShadowEdgeColor* Defines the control's color for shadow edges. ### Syntax Get | | | | --- | --- | | VB.NET | *Clr* = *object*.**ShadowEdgeColor** **As System.Drawing.Color[![\](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_dotnet)** | | VB | *Clr* = *object*.**ShadowEdgeColor** **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *Clr* = *object*.**ShadowEdgeColor**; | | VC++ | **OLE_COLOR** *Clr* = *object*->**ShadowEdgeColor**;
**OLE_COLOR** *Clr* = *object*->Get**ShadowEdgeColor**(); | | C | **HRESULT** *object*->get_**ShadowEdgeColor**(**OLE_COLOR*** *Clr*); | Put | | | | --- | --- | | VB.NET | *object*.**ShadowEdgeColor** = *Clr* **As System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** | | VB | *object*.**ShadowEdgeColor** = *Clr* **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *object*.**ShadowEdgeColor** = *Clr*; | | VC++ | **OLE_COLOR** *object*->**ShadowEdgeColor** = *Clr*;
**void** *object*->Put**ShadowEdgeColor**(**OLE_COLOR** *Clr*); | | C | **HRESULT** *object*->put_**ShadowEdgeColor**(**OLE_COLOR** *Clr*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Clr Defines the control's color for shadow edges. For information about color properties, please visit the applicable section "[Using SftButton/OCX with ...](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using)". ### Comments The ShadowEdgeColor property defines the control's color for shadow edges. > This property has no effect if [Windows themes](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_themes) are used. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## ShowDropDown Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ShowDropDown* Defines whether the [drop down button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_dropdown) is displayed. > Deprecated - Provided for compatibility with earlier versions only - Use the [ButtonStyle](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ButtonStyle) property instead ### Syntax Get | | | | --- | --- | | VB.NET | *Boolean* = *object*.**ShowDropDown** **As Boolean** | | VB | *Boolean* = *object*.**ShowDropDown** **As Boolean** | | C#.NET | **bool** *Boolean* = *object*.**ShowDropDown**; | | VC++ | **VARIANT_BOOL** *Boolean* = *object*->**ShowDropDown**;
**VARIANT_BOOL** *Boolean* = *object*->Get**ShowDropDown**(); | | C | **HRESULT** *object*->get_**ShowDropDown**(**VARIANT_BOOL*** *Boolean*); | Put | | | | --- | --- | | VB.NET | *object*.**ShowDropDown** = *Boolean* **As Boolean** | | VB | *object*.**ShowDropDown** = *Boolean* **As Boolean** | | C#.NET | **bool** *object*.**ShowDropDown** = *Boolean*; | | VC++ | **VARIANT_BOOL** *object*->**ShowDropDown** = *Boolean*;
**void** *object*->Put**ShowDropDown**(**VARIANT_BOOL** *Boolean*); | | C | **HRESULT** *object*->put_**ShowDropDown**(**VARIANT_BOOL** *Boolean*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Boolean Defines whether the drop down button is displayed. | Boolean | Description | | --- | --- | | True | The drop down button is displayed. | | False | The drop down button is not displayed. | ### Comments > Deprecated - Provided for compatibility with earlier versions only - Use the ButtonStyle property instead The ShowDropDown property defines whether the drop down button is displayed. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## ShowFocus Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_ShowFocus* Defines whether the control displays a focus rectangle when it has the input focus. ### Syntax Get | | | | --- | --- | | VB.NET | *Boolean* = *object*.**ShowFocus** **As Boolean** | | VB | *Boolean* = *object*.**ShowFocus** **As Boolean** | | C#.NET | **bool** *Boolean* = *object*.**ShowFocus**; | | VC++ | **VARIANT_BOOL** *Boolean* = *object*->**ShowFocus**;
**VARIANT_BOOL** *Boolean* = *object*->Get**ShowFocus**(); | | C | **HRESULT** *object*->get_**ShowFocus**(**VARIANT_BOOL*** *Boolean*); | Put | | | | --- | --- | | VB.NET | *object*.**ShowFocus** = *Boolean* **As Boolean** | | VB | *object*.**ShowFocus** = *Boolean* **As Boolean** | | C#.NET | **bool** *object*.**ShowFocus** = *Boolean*; | | VC++ | **VARIANT_BOOL** *object*->**ShowFocus** = *Boolean*;
**void** *object*->Put**ShowFocus**(**VARIANT_BOOL** *Boolean*); | | C | **HRESULT** *object*->put_**ShowFocus**(**VARIANT_BOOL** *Boolean*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Boolean Defines whether the control displays a focus rectangle when it has the input focus. | Boolean | Description | | --- | --- | | True | The focus rectangle is displayed when the control has the input focus. | | False | The focus rectangle is never displayed. | ### Comments The ShowFocus property defines whether the control displays a focus rectangle when it has the input focus. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Text Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Text* Defines the control's caption. ### Syntax Get | | | | --- | --- | | VB.NET | *Text* = *object*.**Text** **As String** | | VB | *Text* = *object*.**Text** **As String** | | C#.NET | **string** *Text* = *object*.**Text**; | | VC++ | **_bstr_t** *Text* = *object*->**Text**;
**_bstr_t** *Text* = *object*->Get**Text**(); | | C | **HRESULT** *object*->get_**Text**(**BSTR*** *Text*); | Put | | | | --- | --- | | VB.NET | *object*.**Text** = *Text* **As String** | | VB | *object*.**Text** = *Text* **As String** | | C#.NET | **string** *object*.**Text** = *Text*; | | VC++ | **_bstr_t** *object*->**Text** = *Text*;
**void** *object*->Put**Text**(**_bstr_t** *Text*); | | C | **HRESULT** *object*->put_**Text**(**BSTR** *Text*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Text Defines the control's caption. ### Comments The Text property defines the control's caption. The caption can include an [accelerator key](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_accel). By using the & character in the Text property, the following character becomes an accelerator key. If the user types Alt plus the defined accelerator key, the control receives the input focus and the [Click](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButtonEvents_Click) event occurs. For example, if the Text property is set to "&Help", the displayed caption will read "Help", i.e., the H is underlined. If the user types Alt+h, the Click event occurs. To display an & character use "&&". If the AllowFocus property is set to False, the control does not support accelerator keys. The text component of the [button label](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_label) can contain more than one line of text. By using carriage-return and line-feed characters, multiple lines can be defined. The layout of the button label and the position and alignment of the text component are defined using the [Orientation](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Orientation), [TextAlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_TextAlignHorz) and [Image1AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignVert) properties. For detailed information on the use of the Orientation, [Image1](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1), [Image1AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignHorz), Image1AlignVert, [Image2](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2), [Image2AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignHorz), [Image2AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignVert), Text, TextAlignHorz, [TextAlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_TextAlignVert) properties, please see "Button Label". See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## TextAlignHorz Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_TextAlignHorz* Defines the horizontal alignment of the text. ### Syntax Get | | | | --- | --- | | VB.NET | *Align* = *object*.**TextAlignHorz** **As [SftButtonAlignConstants](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonAlignConstants)** | | VB | *Align* = *object*.**TextAlignHorz** **As SftButtonAlignConstants** | | C#.NET | **SftButtonAlignConstants** *Align* = *object*.**TextAlignHorz**; | | VC++ | **enum SftButtonAlignConstants** *Align* = *object*->**TextAlignHorz**;
**enum SftButtonAlignConstants** *Align* = *object*->Get**TextAlignHorz**(); | | C | **HRESULT** *object*->get_**TextAlignHorz**(**enum SftButtonAlignConstants*** *Align*); | Put | | | | --- | --- | | VB.NET | *object*.**TextAlignHorz** = *Align* **As SftButtonAlignConstants** | | VB | *object*.**TextAlignHorz** = *Align* **As SftButtonAlignConstants** | | C#.NET | **SftButtonAlignConstants** *object*.**TextAlignHorz** = *Align*; | | VC++ | **enum SftButtonAlignConstants** *object*->**TextAlignHorz** = *Align*;
**void** *object*->Put**TextAlignHorz**(**enum SftButtonAlignConstants** *Align*); | | C | **HRESULT** *object*->put_**TextAlignHorz**(**enum SftButtonAlignConstants** *Align*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Align Defines the horizontal alignment of the text. | Name | Value | Description | | --- | --- | --- | | alignSftButtonCenter | 0 | The text is horizontally centered within the available space. | | alignSftButtonLeft | 1 | The text is left aligned within the available space. | | alignSftButtonRight | 2 | The text is right aligned within the available space. | ### Comments The TextAlignHorz property defines the horizontal alignment of the text. The layout of the [button label](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_label) and the position and alignment of the text are defined using the [Orientation](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Orientation), [TextAlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_TextAlignHorz) and [TextAlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_TextAlignVert) properties. For detailed information on the use of the Orientation, [Image1](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1), [Image1AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignHorz), [Image1AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignVert), [Image2](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2), [Image2AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignHorz), [Image2AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignVert), [Text](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Text), TextAlignHorz, TextAlignVert properties, please see "Button Label". See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## TextAlignVert Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_TextAlignVert* Defines the vertical alignment of the text. ### Syntax Get | | | | --- | --- | | VB.NET | *Align* = *object*.**TextAlignVert** **As [SftButtonAlignVertConstants](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonAlignVertConstants)** | | VB | *Align* = *object*.**TextAlignVert** **As SftButtonAlignVertConstants** | | C#.NET | **SftButtonAlignVertConstants** *Align* = *object*.**TextAlignVert**; | | VC++ | **enum SftButtonAlignVertConstants** *Align* = *object*->**TextAlignVert**;
**enum SftButtonAlignVertConstants** *Align* = *object*->Get**TextAlignVert**(); | | C | **HRESULT** *object*->get_**TextAlignVert**(**enum SftButtonAlignVertConstants*** *Align*); | Put | | | | --- | --- | | VB.NET | *object*.**TextAlignVert** = *Align* **As SftButtonAlignVertConstants** | | VB | *object*.**TextAlignVert** = *Align* **As SftButtonAlignVertConstants** | | C#.NET | **SftButtonAlignVertConstants** *object*.**TextAlignVert** = *Align*; | | VC++ | **enum SftButtonAlignVertConstants** *object*->**TextAlignVert** = *Align*;
**void** *object*->Put**TextAlignVert**(**enum SftButtonAlignVertConstants** *Align*); | | C | **HRESULT** *object*->put_**TextAlignVert**(**enum SftButtonAlignVertConstants** *Align*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Align Defines the vertical alignment of the text. | Name | Value | Description | | --- | --- | --- | | alignSftButtonVCenter | 0 | The text is vertically centered within the available space. | | alignSftButtonTop | 1 | The text is aligned with the top of the available space. | | alignSftButtonBottom | 2 | The text is aligned with the bottom of the available space. | ### Comments The TextAlignVert property defines the vertical alignment of the text. The layout of the [button label](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_label) and the position and alignment of the text are defined using the [Orientation](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Orientation), [TextAlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_TextAlignHorz) and [TextAlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_TextAlignVert) properties. For detailed information on the use of the Orientation, [Image1](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1), [Image1AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignHorz), [Image1AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image1AlignVert), [Image2](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2), [Image2AlignHorz](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignHorz), [Image2AlignVert](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Image2AlignVert), [Text](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Text), TextAlignHorz, TextAlignVert properties, please see "Button Label". See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Toggle Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Toggle* Defines whether the button is a [toggle button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_toggle). ### Syntax Get | | | | --- | --- | | VB.NET | *Boolean* = *object*.**Toggle** **As Boolean** | | VB | *Boolean* = *object*.**Toggle** **As Boolean** | | C#.NET | **bool** *Boolean* = *object*.**Toggle**; | | VC++ | **VARIANT_BOOL** *Boolean* = *object*->**Toggle**;
**VARIANT_BOOL** *Boolean* = *object*->Get**Toggle**(); | | C | **HRESULT** *object*->get_**Toggle**(**VARIANT_BOOL*** *Boolean*); | Put | | | | --- | --- | | VB.NET | *object*.**Toggle** = *Boolean* **As Boolean** | | VB | *object*.**Toggle** = *Boolean* **As Boolean** | | C#.NET | **bool** *object*.**Toggle** = *Boolean*; | | VC++ | **VARIANT_BOOL** *object*->**Toggle** = *Boolean*;
**void** *object*->Put**Toggle**(**VARIANT_BOOL** *Boolean*); | | C | **HRESULT** *object*->put_**Toggle**(**VARIANT_BOOL** *Boolean*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Boolean Defines whether the button is a toggle button. | Boolean | Description | | --- | --- | | True | The button is a toggle button. | | False | The button is not a toggle button and automatically returns to its released state after being pressed. | ### Comments The Toggle property defines whether the button is a toggle button. Once the mouse button is released after clicking a button, a button usually returns to its released position (i.e., not pressed). By defining the button as a toggle button using the Toggle property, the button can instead act as an on/off switch. Each mouse click will alternate between the pressed and released positions. The [drop down button](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_dropdown) portion is controlled by the equivalent [DropDownToggle](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_DropDownToggle) property. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Type Property, SftPictureObject Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Type* Returns the defined image type. ### Syntax Get | | | | --- | --- | | VB.NET | *Style* = *object*.**Type** **As [SftPictureTypeConstants](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftPictureTypeConstants)** | | VB | *Style* = *object*.**Type** **As SftPictureTypeConstants** | | C#.NET | **SftPictureTypeConstants** *Style* = *object*.**Type**; | | VC++ | **enum SftPictureTypeConstants** *Style* = *object*->**Type**;
**enum SftPictureTypeConstants** *Style* = *object*->Get**Type**(); | | C | **HRESULT** *object*->get_**Type**(**enum SftPictureTypeConstants*** *Style*); | object A [SftPictureObject object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject). Style Returns the defined image type. | Name | Value | Description | | --- | --- | --- | | sftTypeNone | 0 | None - The SftPictureObject is empty. | | sftTypeIDispatch | 1 | IDispatch - Contains an OLE Picture object (supporting the IPicture or IPictureDisp interface). | | sftTypeBitmap | 2 | Bitmap - Contains a Windows bitmap. | | sftTypeIcon | 3 | Icon - Contains an icon. | | sftTypeImageList | 4 | ImageList - Contains an image from an ImageList control. | | sftTypeColorSample | 5 | [Color Sample](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_SetColorSample) - Contains a color sample. | | sftTypeBuiltin | 6 | Built-In Appearance - Contains a predefined built-in image. | | sftTypeImageListH | 7 | ImageListH - Contains an image from an ImageList control. | | sftTypeGDIPlus | 8 | GDIPlus - Contains a [GDI+](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_gdiplus) image | ### Comments The Type property returns the defined image type. The Type property reflects the type of the current image. It is modified by assigning an image to the SftPictureObject using a property such as SftPictureObject.[Appearance](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Appearance), SftPictureObject.[BitmapHandle](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_BitmapHandle), SftPictureObject.[IconHandle](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_IconHandle), SftPictureObject.SetColorSample, etc. See Also SftPictureObject Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## UseThemes Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_UseThemes* Defines whether [Windows themes](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_themes) can be used. ### Syntax Get | | | | --- | --- | | VB.NET | *Style* = *object*.**UseThemes** **As [SftButtonThemesConstants](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/constants_SftButtonThemesConstants)** | | VB | *Style* = *object*.**UseThemes** **As SftButtonThemesConstants** | | C#.NET | **SftButtonThemesConstants** *Style* = *object*.**UseThemes**; | | VC++ | **enum SftButtonThemesConstants** *Style* = *object*->**UseThemes**;
**enum SftButtonThemesConstants** *Style* = *object*->Get**UseThemes**(); | | C | **HRESULT** *object*->get_**UseThemes**(**enum SftButtonThemesConstants*** *Style*); | Put | | | | --- | --- | | VB.NET | *object*.**UseThemes** = *Style* **As SftButtonThemesConstants** | | VB | *object*.**UseThemes** = *Style* **As SftButtonThemesConstants** | | C#.NET | **SftButtonThemesConstants** *object*.**UseThemes** = *Style*; | | VC++ | **enum SftButtonThemesConstants** *object*->**UseThemes** = *Style*;
**void** *object*->Put**UseThemes**(**enum SftButtonThemesConstants** *Style*); | | C | **HRESULT** *object*->put_**UseThemes**(**enum SftButtonThemesConstants** *Style*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Style Defines whether Windows themes can be used. | Name | Value | Description | | --- | --- | --- | | themesSftButtonNo | 0 | Windows themes are never used. | | themesSftButtonYes | 1 | Windows themes are used if available. | | themesSftButtonYesExcludeText | 2 | Windows themes are used if available. The button's caption (Text) is rendered using the defined colors and themes are ignored. Themes are only used for the button background. | ### Comments The UseThemes property defines whether Windows themes can be used. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Version Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Version* Returns the product's exact version. ### Syntax Get | | | | --- | --- | | VB.NET | *Version* = *object*.**Version** **As String** | | VB | *Version* = *object*.**Version** **As String** | | C#.NET | **string** *Version* = *object*.**Version**; | | VC++ | **_bstr_t** *Version* = *object*->**Version**;
**_bstr_t** *Version* = *object*->Get**Version**(); | | C | **HRESULT** *object*->get_**Version**(**BSTR*** *Version*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Version Returns the product's exact version. ### Comments The Version property returns the product's exact version. This information is used for [product support](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_contactsoftel) and can be displayed using the [property dialogs](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/r_property_dialog). The Version property returns the product name and the exact version number. The [_Version](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton__Version) property (with a leading underscore character) returns the exact version number only. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## WebLicense Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_WebLicense* Defines the license information for use on one web site. ### Syntax Get | | | | --- | --- | | VB.NET | *License* = *object*.**WebLicense** **As String** | | VB | *License* = *object*.**WebLicense** **As String** | | C#.NET | **string** *License* = *object*.**WebLicense**; | | VC++ | **_bstr_t** *License* = *object*->**WebLicense**;
**_bstr_t** *License* = *object*->Get**WebLicense**(); | | C | **HRESULT** *object*->get_**WebLicense**(**BSTR*** *License*); | Put | | | | --- | --- | | VB.NET | *object*.**WebLicense** = *License* **As String** | | VB | *object*.**WebLicense** = *License* **As String** | | C#.NET | **string** *object*.**WebLicense** = *License*; | | VC++ | **_bstr_t** *object*->**WebLicense** = *License*;
**void** *object*->Put**WebLicense**(**_bstr_t** *License*); | | C | **HRESULT** *object*->put_**WebLicense**(**BSTR** *License*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). License Defines the license information for use on one web site. ### Comments The WebLicense property defines the license information for use on one web site. > The use of the WebLicense property is no longer required and this property has no effect. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## WhiteEdgeColor Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_WhiteEdgeColor* Defines the control's color for white edges. ### Syntax Get | | | | --- | --- | | VB.NET | *Clr* = *object*.**WhiteEdgeColor** **As System.Drawing.Color[![\](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_dotnet)** | | VB | *Clr* = *object*.**WhiteEdgeColor** **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *Clr* = *object*.**WhiteEdgeColor**; | | VC++ | **OLE_COLOR** *Clr* = *object*->**WhiteEdgeColor**;
**OLE_COLOR** *Clr* = *object*->Get**WhiteEdgeColor**(); | | C | **HRESULT** *object*->get_**WhiteEdgeColor**(**OLE_COLOR*** *Clr*); | Put | | | | --- | --- | | VB.NET | *object*.**WhiteEdgeColor** = *Clr* **As System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** | | VB | *object*.**WhiteEdgeColor** = *Clr* **As OLE_COLOR** | | C#.NET | **System.Drawing.Color![](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)** *object*.**WhiteEdgeColor** = *Clr*; | | VC++ | **OLE_COLOR** *object*->**WhiteEdgeColor** = *Clr*;
**void** *object*->Put**WhiteEdgeColor**(**OLE_COLOR** *Clr*); | | C | **HRESULT** *object*->put_**WhiteEdgeColor**(**OLE_COLOR** *Clr*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Clr Defines the control's color for white edges. For information about color properties, please visit the applicable section "[Using SftButton/OCX with ...](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using)". ### Comments The WhiteEdgeColor property defines the control's color for white edges. > This property has no effect if [Windows themes](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_themes) are used. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Width Property, SftPictureObject Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Width* Defines the desired image width. ### Syntax Get | | | | --- | --- | | VB.NET | *WPix* = *object*.**Width** **As Integer** | | VB | *WPix* = *object*.**Width** **As Long** | | C#.NET | **int** *WPix* = *object*.**Width**; | | VC++ | **long** *WPix* = *object*->**Width**;
**long** *WPix* = *object*->Get**Width**(); | | C | **HRESULT** *object*->get_**Width**(**long*** *WPix*); | Put | | | | --- | --- | | VB.NET | *object*.**Width** = *WPix* **As Integer** | | VB | *object*.**Width** = *WPix* **As Long** | | C#.NET | **int** *object*.**Width** = *WPix*; | | VC++ | **long** *object*->**Width** = *WPix*;
**void** *object*->Put**Width**(**long** *WPix*); | | C | **HRESULT** *object*->put_**Width**(**long** *WPix*); | object A [SftPictureObject object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject). WPix Defines the desired image width. ### Comments The Width property defines the desired image width. The desired image width is only used for built-in images (SftPictureObject.[Type](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_Type) is sftTypeBuiltin) and [color samples](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_SetColorSample) (SftPictureObject.Type is sftTypeColorSample). For all image types, the SftPictureObject.[ActualHeight](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_ActualHeight) and SftPictureObject.[ActualWidth](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftPictureObject_ActualWidth) properties reflect the image dimensions. See Also SftPictureObject Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Window Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Window* Returns the control's window handle. ### Syntax Get | | | | --- | --- | | VB.NET | *Handle* = *object*.**Window** **As Integer** | | VB | *Handle* = *object*.**Window** **As Long** | | C#.NET | **int** *Handle* = *object*.**Window**; | | VC++ | **long** *Handle* = *object*->**Window**;
**long** *Handle* = *object*->Get**Window**(); | | C | **HRESULT** *object*->get_**Window**(**long*** *Handle*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Handle Returns the control's window handle. ### Comments The Window property returns the control's window handle. The Window property should not be used and may cause incompatibilities with future releases of SftButton/OCX. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## _FlatProperties Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton__FlatProperties* Defines whether properties are stored as a flat list in a property bag. ### Syntax Get | | | | --- | --- | | VB.NET | *Boolean* = *object*.**_FlatProperties** **As Boolean** | | VB | *Boolean* = *object*.**_FlatProperties** **As Boolean** | | C#.NET | **bool** *Boolean* = *object*.**_FlatProperties**; | | VC++ | **VARIANT_BOOL** *Boolean* = *object*->**_FlatProperties**;
**VARIANT_BOOL** *Boolean* = *object*->Get**_FlatProperties**(); | | C | **HRESULT** *object*->get_**_FlatProperties**(**VARIANT_BOOL*** *Boolean*); | Put | | | | --- | --- | | VB.NET | *object*.**_FlatProperties** = *Boolean* **As Boolean** | | VB | *object*.**_FlatProperties** = *Boolean* **As Boolean** | | C#.NET | **bool** *object*.**_FlatProperties** = *Boolean*; | | VC++ | **VARIANT_BOOL** *object*->**_FlatProperties** = *Boolean*;
**void** *object*->Put**_FlatProperties**(**VARIANT_BOOL** *Boolean*); | | C | **HRESULT** *object*->put_**_FlatProperties**(**VARIANT_BOOL** *Boolean*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Boolean Defines whether properties are stored as a flat list in a property bag. | Boolean | Description | | --- | --- | | True | Properties are stored as a flat list if a property bag is used (IPropertyBag interface). | | False | Properties are stored as [objects](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) if a property bag is used (IPropertyBag interface). This is the default and the recommended setting. | ### Comments The _FlatProperties property defines whether properties are stored as a flat list in a property bag. The _FlatProperties property can be used with development tools that do not properly save objects in a property bag (IPropertyBag interface). Visual Basic, Visual C++, Delphi, C++ Builder and many others fully support objects in property bags or use the IStream interface. For these, the _FlatProperties property should be set to False (the default). When using development tools that cannot save objects in a property bag, you will notice that certain settings are lost when saving and loading forms, usually with HTML editors. In this case the _FlatProperties property should be set to True. This is a limitation of the development tool, not our product. Even with _FlatProperties set to False, Picture object and Font object definitions (such as the Font property) are still lost. These must be set at run-time and are lost if defined at design-time. Only the SftButton objects are affected by the _FlatProperties property. See Also SftButton Object | Object Hierarchy ## _Version Property, SftButton Object *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton__Version* Returns the product's exact version. ### Syntax Get | | | | --- | --- | | VB.NET | *Version* = *object*.**_Version** **As String** | | VB | *Version* = *object*.**_Version** **As String** | | C#.NET | **string** *Version* = *object*.**_Version**; | | VC++ | **_bstr_t** *Version* = *object*->**_Version**;
**_bstr_t** *Version* = *object*->Get**_Version**(); | | C | **HRESULT** *object*->get_**_Version**(**BSTR*** *Version*); | object A [SftButton object](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftButton). Version Returns the product's exact version. ### Comments The _Version property returns the product's exact version. This information is used for [product support](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_contactsoftel) and can be displayed using the [property dialogs](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/r_property_dialog). The _Version property returns the exact version number only. The [Version](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/SftButton_Version) property (without a leading underscore character) returns the product name and the exact version number. See Also SftButton Object | [Object Hierarchy](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/i_object_hierarchy) ## Syntax Conventions Used *Source: https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/r_syntax_used* The syntax shown in this documentation follows these guidelines. Each property, method and event is shown for Visual Basic .NET (VB.NET), Visual Basic 6 (VB), C# (C#.NET), Visual C++ (VC++), C (C). The syntax for properties shows up to three forms (*Get*, *Put *and *PutRef*) if available, the first to retrieve the property value, the second and third to set the property value. For most properties, only a *Get* and *Put* syntax is shown. Font and Image1properties also allow a third form (*PutRef*). If both * Put* and *PutRef* is available, *PutRef* is the preferred form as it conserves resources and assigns a font or Image1object reference to the control. Any change to the font or Image1object is reflected in the control also. *Put* on the other hand causes the control to completely copy the font or picture object. ### Syntax Get | | | | --- | --- | | VB.NET | *refImageObj* = *object*.**Image1** **As [SftPictureObject](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/index_SftPictureObject)** | | VB | **Set** *refImageObj* = *object*.**Image1** **As SftPictureObject** | | C#.NET | **SftPictureObject** *refImageObj* = *object*.**Image1**; | | VC++ | **ISftPictureObject*** *refImageObj* = *object*->**Image1**;
**ISftPictureObject*** *refImageObj* = *object*->Get**Image1**(); | | C | **HRESULT** *object*->get_**Image1**(**ISftPictureObject**** *refImageObj*); | Put | | | | --- | --- | | VB.NET | *object*.**Image1** = *refImageObj* **As SftPictureObject** | | VB | *object*.**Image1** = *refImageObj* **As SftPictureObject** | | C#.NET | **SftPictureObject** *object*.**Image1** = *refImageObj*; | | VC++ | **ISftPictureObject*** *object*->**Image1** = *refImageObj*;
**void** *object*->Put**Image1**(**ISftPictureObject*** *refImageObj*); | | C | **HRESULT** *object*->put_**Image1**(**ISftPictureObject*** *refImageObj*); | If the [![\](https://softelvdm.com/Vault/Softelvdm.com/docx/SftButton%20OCX%204.0/image/help.gif)](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_using_dotnet) indicator is shown next to a type, it links to additional language-specific help. The following conventions are used throughout the reference section: | Description | Example | | --- | --- | | Syntax shown shows sample use of the property, method or event (VB.NET, VB, C#.NET) or shows its definition (VC++, C) | *refPictureObj* = *object*.**Picture** | | Syntax shown in this color shows the type of the property, return type of the method or event (VB.NET, VB, C#.NET) | **As stdole.IPictureDisp **
: **IPictureDisp** | | Words in bold (any color) indicate language keywords or (property, method, event) names. | **False
If Function
BorderStyle** | | Italic words (any color) indicate placeholders for information, to be supplied by you. | *object
index
var* | | Words in regular font (any color) indicate text that is used as-is, such as language specific punctuation. | ->
get_ | | Square brackets (any color) indicate optional information when describing Visual Basic (VB). For all other languages, square brackets indicate array indices. | [, arg] | All code [samples](https://softelvdm.com/Documentation/SftButton%20OCX%204%200/Topic/g_samples) are based on the source code found in the product directory \Program Files\Softelvdm\SftButton OCX 4.0\Samples\.