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
Defines whether the control border is always displayed.
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->GetBorderAlways(); |
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->PutBorderAlways(VARIANT_BOOL Boolean); |
C | HRESULT object->put_BorderAlways(VARIANT_BOOL Boolean); |
object
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 or the mouse cursor is located above the control's client area. |
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 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 property.
If Windows 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.
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
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
private void Form1_Load(object sender, System.EventArgs e) { // 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 axSftButtonCheck.AutoSize = SftButtonAutoSizeConstants.autosizeSftButtonLeftCenter; #else axSftButtonCheck.CtlAutoSize = SftButtonAutoSizeConstants.autosizeSftButtonLeftCenter; #endif axSftButtonCheck.Bounce = SftButtonBounceStyleConstants.bounceSftButtonNo; axSftButtonCheck.ButtonStyle = SftButtonStyleConstants.styleSftButtonNone; axSftButtonCheck.ClickStyle = SftButtonClickStyleConstants.clickstyleSftButtonPictures;
m_vCloseButton = m_CtlCloseButton.GetControlUnknown(); // save the button size to demonstrate auto-sizing m_CtlButton2.GetClientRect(&m_savedRect); m_CtlButton2.MapWindowPoints(this, &m_savedRect); // initialize a SftButton control to look like a check box m_vButtonCheck->BorderAlways = VARIANT_FALSE; m_vButtonCheck->AutoSize = autosizeSftButtonLeftCenter; m_vButtonCheck->Bounce = bounceSftButtonNo; m_vButtonCheck->ButtonStyle = styleSftButtonNone; m_vButtonCheck->ClickStyle = clickstyleSftButtonPictures; m_vButtonCheck->HoverStyle = hoverstyleSftButtonExact; m_vButtonCheck->Image1->Appearance = sftImageCheckboxYes; m_vButtonCheck->Text = "A SftButton control that looks like a check box with a caption";
See Also SftButton Object | Object Hierarchy