Command Ocx

Purpose

Creates an Ocx Command control in the current active form, window, or dialog.

Syntax

Ocx Command name = text$ [, id], x, y, b, h [, style%]

text$:control text
id%:control identifier
x, y, b, h:iexp
style%:the control styles

Description

Use a Command button control to begin, interrupt, or end a process. When chosen, a Command button appears pushed in and so is sometimes called a push button.

To display text on a Command button control, set its Caption property. A user can always choose a Command button by clicking it. To allow the user to choose it by pressing ENTER, set the Default property to True. To allow the user to choose the button by pressing ESC, set the Cancel property of the Command button to True.

To create a Command button with a Multiline caption, add BS_MULTILINE to WinStyle.

Properties

Align | Appearance | Cancel | Caption | Default | Enabled | Font | FontBold | FontItalic | FontStrikethru | FontUnderline | FontName | FontSize | Height, Width | HelpContextID | hWnd | Index | Left | MouseCursor | MouseIcon | MousePointer | Name | Picture | PushLike | TabStop | Tag | Text | ToolTiptext | Top | Value | Visible | WhatsThisHelpID | Width | WinStyle

Methods

DoClick | Move | Refresh | SetFocus | SetFont | TextHeight | TextWidth | ZOrder

Events

Click | DblClick | GotFocus | LostFocus | KeyDown | KeyUp | KeyPress | MouseDown | MouseUp | MouseMove

See Also

Ocx, OcxOcx

Animation, CheckBox, ComboBox, CommDlg, Form, Frame, Image, ImageList, Label, ListBox, ListView, MonthView, Option, ProgressBar, RichEdit, Scroll, Slider, StatusBar, TabStrip, TextBox, Timer, TrayIcon, TreeView, UpDown

{Created by Sjouke Hamstra; Last updated: 22/06/2020 by James Gaite}