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
The button is clicked.
VB.NET | Private Sub object_ClickEvent(ByVal sender As Object, ByVal e As EventArgumentType) Handles object.ClickEvent |
VB | Private Sub object_Click() |
C#.NET | void object_ClickEvent(object sender, EventArgumentType e); |
VC++ | void OnClickobject(); |
C | HRESULT OnClickobject(); |
object
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 (Alt+key). This event may also occur if the button is defined as the default button and the user presses the ENTER key. Using properties such as the Pressed property does not cause this event to occur.
The 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 property defines the interval between auto-repeat Click events.
If the user double-clicks the button, the DblClick event also occurs.
The DropDownClick event occurs when the drop down button is clicked.
Public ReadOnly TPM_LEFTBUTTON As Integer = 0 <DllImport("user32.dll")> _ Public Shared Function TrackPopupMenu(ByVal Handle As IntPtr, _ ByVal uFlags As UInt32, ByVal x As Integer, ByVal y As Integer, _ ByVal nReserved As Integer, ByVal hwnd As IntPtr, ByVal prcRect As IntPtr) As IntPtr End Function Private Sub AxSftButton1_ClickEvent(ByVal sender As Object, ByVal e As System.EventArgs) Handles AxSftButton1.ClickEvent ' Invoke the default action, because the button was clicked menuItem1_Click(AxSftButton1, New System.EventArgs) End Sub Private Sub AxSftButton2_ClickEvent(ByVal sender As Object, ByVal e As System.EventArgs) Handles AxSftButton2.ClickEvent ' Invoke the default action, because the button was clicked menuItem1_Click(AxSftButton1, New System.EventArgs)
' spinning globe effect With SftButton4 Set .Image1.Picture = WImage(LastPicture).Picture LastPicture = LastPicture + 1 If LastPicture >= 16 Then LastPicture = 0 End With End Sub Private Sub SftButton1_Click() ' Invoke the default action, because the button was clicked Call Form2.popupMenu_DefaultAction_Click End Sub Private Sub SftButton1_DropDownClick() ' The drop down button was clicked. Display a popup menu ' right-aligned with the right edge of the button
MessageBox.Show("Action 2 selected"); } private void menuItem4_Click(object sender, System.EventArgs e) { MessageBox.Show("Action 3 selected"); } private void axSftButton1_ClickEvent(object sender, System.EventArgs e) { // Invoke the default action, because the button was clicked menuItem1_Click(axSftButton1, new System.EventArgs()); } private void axSftButton1_DropDownClick(object sender, System.EventArgs e) {
// The system calls this to obtain the cursor to display while the user drags // the minimized window. HCURSOR CPopupDlg::OnQueryDragIcon() { return (HCURSOR) m_hIcon; } void CPopupDlg::OnClickSftbtn1() { // Invoke the default action, because the button was clicked SendMessage(WM_COMMAND, IDM_DEFAULTACTION); } void CPopupDlg::OnDropDownClickSftbtn1() { // The drop down button was clicked. Display a popup menu
See Also SftButton Object | Object Hierarchy