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\Visual Studio - VB.NET\Images\Form1.vb or C:\Program Files\Softelvdm\SftButton OCX 3.0\Samples\Visual Studio - VB.NET\Images\Form1.vb (on 32-bit Windows versions).
Private savedSize As Size
Private savedLoc As Point
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' save the button size to demonstrate auto-sizing
savedSize = AxSftButton2.Size
savedLoc = AxSftButton2.Location
' initialize a SftButton control to look like a check box
AxSftButtonCheck.BorderAlways = False
#If VisualStudio2003AndEarlier Then
AxSftButtonCheck.AutoSize = SftButtonAutoSizeConstants.autosizeSftButtonLeftCenter
#Else
AxSftButtonCheck.CtlAutoSize = SftButtonAutoSizeConstants.autosizeSftButtonLeftCenter
#End If
AxSftButtonCheck.Bounce = SftButtonBounceStyleConstants.bounceSftButtonNo
AxSftButtonCheck.ButtonStyle = SftButtonStyleConstants.styleSftButtonNone
AxSftButtonCheck.ClickStyle = SftButtonClickStyleConstants.clickstyleSftButtonPictures
AxSftButtonCheck.HoverStyle = SftButtonHoverStyleConstants.hoverstyleSftButtonExact
AxSftButtonCheck.Image1.Appearance = SftPictureImageConstants.sftImageCheckboxYes
AxSftButtonCheck.Text = "A SftButton control that looks like a check box with a caption"
AxSftButtonCheck.ShowFocus = False
End Sub
Private Sub check1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles check1.CheckedChanged
' enable/disable the control so the image changes
AxSftButton1.Enabled = Not check1.Checked
End Sub
Private Sub check2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles check2.CheckedChanged
' resize the control
If check2.Checked Then
#If VisualStudio2003AndEarlier Then
AxSftButton2.AutoSize = SftButtonAutoSizeConstants.autosizeSftButtonLeftCenter
#Else
AxSftButton2.CtlAutoSize = SftButtonAutoSizeConstants.autosizeSftButtonLeftCenter
#End If
Else
#If VisualStudio2003AndEarlier Then
AxSftButton2.AutoSize = SftButtonAutoSizeConstants.autosizeSftButtonNone
#Else
AxSftButton2.CtlAutoSize = SftButtonAutoSizeConstants.autosizeSftButtonNone
#End If
AxSftButton2.Location = savedLoc
AxSftButton2.Size = savedSize
End If
End Sub
Private Sub CloseButton_ClickEvent(ByVal sender As Object, ByVal e As System.EventArgs) Handles CloseButton.ClickEvent
Application.Exit()
End Sub
Private Sub AxSftButtonCheck_ClickEvent(ByVal sender As Object, ByVal e As System.EventArgs) Handles AxSftButtonCheck.ClickEvent
' toggle the check box
If AxSftButtonCheck.Image1.Appearance = SftPictureImageConstants.sftImageCheckboxYes Then
AxSftButtonCheck.Image1.Appearance = SftPictureImageConstants.sftImageCheckboxNo
Else
AxSftButtonCheck.Image1.Appearance = SftPictureImageConstants.sftImageCheckboxYes
End If
End Sub
Private Sub AxSftButtonCheck_DblClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles AxSftButtonCheck.DblClick
AxSftButtonCheck_ClickEvent(Nothing, Nothing)
End Sub