> Dear Experts,
> With your help and advice I am making good progress in VFP. Thanks!
>
> I wish to create form through code.
> Where do we put this code? Do I use 'Modify Command' in the command window? But that will create a PRG.
> How do create a SCX and SCT through code ?
>
> kulwant
Here's a basic sample.
CREATE FORM myform NOWAIT
ASELOBJ(laObj,1) && get a reference to the new form
laObj[1].Caption="Hello World"
laObj[1].AddObject("cmdTest", "CommandButton") && add button
laObj[1].cmdTest.caption = "Click Me"
laObj[1].cmdTest.WriteMethod("Click", "MESSAGEBOX('Hello World')") && write Click event
KEYBOARD '{CTRL+W}' && save and close
DO FORM myform
--
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts