CommandButton (btn)
CommandButton - This control allows the user to perform a specific action and will run a separate subroutine. |
Default BackColor = System > Button Face
Default ForeColor = System > Button Text
Default Font - Tahoma, 8, regular
You should always have the Cancel button on the right hand side of your dialog boxes
Me.btnOK.Font.Bold = True
Me.btnOK.Font.Size = 10
Me.btnOK.BackColor = RGB(41, 105, 207)
Me.btnOK.ForeColor = RGB(255, 255, 255)
Arrows
Use Wingding3
Left Arrow - (t) - Alt + 116
Right Arrow - (u) - Alt + 117
Up Arrow - (p) - Alt + 112
Down Arrow (q) - Alt + 113
font size - regular 10, can change colour to Desktop
size (20 by 20)
Same Subroutine
If you want to have multiple command buttons executing the same procedure, this can be done using a class module.
You should consider making the Cancel button the default for forms that support operations that can't be undone (such as delete).
You can always add one and not make it visible
Properties
Accelerator | Lets you specify a character that will be underlined in the caption to provide a shortcut key |
AutoSize | Allows the commandbutton to resize automatically to display its entire contents |
BackColor | The background colour of the button |
BackStyle | The background style of the button |
Cancel | If you want your dialog box to close when you press Esc then change the Cancel property to True for the command button that closes the form. |
Caption | The text that appears on the command button |
Default | You should always set a command button to be pressed when the user presses Enter. Set it to True |
Font | |
ForeColor | The foreground colour of the button |
Locked | Specifies whether a control can be edited. When a control is locked and enabled, it can still initiate events and can still receive the focus. |
MouseIcon | The full path of the custom icon |
MousePointer | Specifies the type of pointer displayed when the user positions the mouse over the button |
Name | |
Picture | The full path of a bitmap file to display on the button |
PicturePosition | The location of the picture relative to its caption |
TakeFocusOnClick | Specifies whether the control takes focus when clicked. |
WordWrap | If you want to write more than one line of text then just set the WordWrap property to True |
Events
BeforeDragOver | |
BeforeDropOrPaste | |
Click | |
DblClick | |
Enter | |
Error | |
Exit | |
KeyDown | |
KeyPress | |
KeyUp | |
MouseDown | |
MouseMove | |
MouseUp |
© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext