Article ID: 129205
Article Last Modified on 4/25/2000
** Start of Example One
MyNewForm=CREATE("frmForm")
MyNewForm.Show
READ EVENTS
DEFINE CLASS frmForm AS Form
Visible = .T.
Left = 50
Top = 30
ADD OBJECT MyQuitButton AS cmdQuitButton WITH ;
Left = 30, ;
Top = 30, ;
Height = 60, ;
Width = 100, ;
Caption = "Quit"
ENDDEFINE
DEFINE CLASS cmdQuitButton AS CommandButton
PROCEDURE Click
RELEASE ThisForm
CLEAR EVENTS
ENDPROC
ENDDEFINE
** Note: Without the semicolons and commas in the ADD OBJECT ... WITH
** clause, error messages will occur such as "Unrecognized command
** verb" and "Command contains unrecognized phrase/keyword."
** Start of Example Two
frmForm = CREATEOBJECT("Form")
WITH frmForm
.Visible = .T.
.ScaleMode = 3
.AddObject("pgfPageFrame", "PageFrame")
WITH .pgfPageFrame
.Visible = .T.
.PageCount = 2
.Left = 50
.Top = 20
.Height = 200
.Width = 250
ENDWITH
ENDWITH
** The WITH...ENDWITH may be used to specify properties of the object
** by pointing to the parent, which is the container in this case.
WITH frmForm.pgfPageFrame
.PageCount = 3
ENDWITH
READ EVENTS
Additional query words: VFoxWin
Keywords: kbcode KB129205