SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
This sample illustrates button states and images.
The source code is located at C:\Program Files (x86)\Softelvdm\SftButton OCX 3.0\Samples\VB6\Images\Form1.frm or C:\Program Files\Softelvdm\SftButton OCX 3.0\Samples\VB6\Images\Form1.frm (on 32-bit Windows versions).
Option Explicit
Dim savedWidth As Integer
Dim savedHeight As Integer
Dim savedYPos As Long
Private Sub Form_Load()
' save the button size to demonstrate auto-sizing
savedWidth = SftButton2.Width
savedHeight = SftButton2.Height
savedYPos = SftButton2.Top
' initialize a SftButton control to look like a check box
SftButtonCheck.BorderAlways = False
SftButtonCheck.AutoSize = autosizeSftButtonLeftCenter
SftButtonCheck.Bounce = bounceSftButtonNo
SftButtonCheck.ButtonStyle = styleSftButtonNone
SftButtonCheck.ClickStyle = clickstyleSftButtonPictures
SftButtonCheck.HoverStyle = hoverstyleSftButtonExact
SftButtonCheck.Image1.Appearance = sftImageCheckboxYes
SftButtonCheck.Text = "A SftButton control that looks like a check box with a caption"
SftButtonCheck.ShowFocus = False
End Sub
Private Sub Check1_Click()
' enable/disable the control so the image changes
SftButton1.Enabled = (Check1.Value = 0)
End Sub
Private Sub Check2_Click()
' resize the control
If Check2.Value Then
SftButton2.AutoSize = autosizeSftButtonLeftCenter
Else
SftButton2.AutoSize = autosizeSftButtonNone
SftButton2.Width = savedWidth
SftButton2.Height = savedHeight
SftButton2.Top = savedYPos
End If
End Sub
Private Sub CloseButton_Click()
End
End Sub
Private Sub SftButtonCheck_Click()
' toggle the check box
If SftButtonCheck.Image1.Appearance = sftImageCheckboxYes Then
SftButtonCheck.Image1.Appearance = sftImageCheckboxNo
Else
SftButtonCheck.Image1.Appearance = sftImageCheckboxYes
End If
End Sub
Private Sub SftButtonCheck_DblClick()
SftButtonCheck_Click
End Sub