I've always used top-level with success, but always had a small code driver PRG file. It's just interesting to do w/o PRG.
Thanks again,
Irv.
>Good:) Be warned though using only toplevel forms are harder to manage (but once you do it all works:)
>Cetin
>
>>Cetin,
>>
>>That did it. I'm completely form-contained now...
>>
>>Many thanks,
>>
>>Irv.
>>
>>>Irv,
>>>Then you need quit:) ie:
>>>
>>>*form.init
>>>this.show
>>>read events
>>>quit
>>>
>>>*exit location
>>>clear events
>>>
or:
>>>*form.init
>>>this.show
>>>read events
>>>
>>>*exit location
>>>clear events
>>>quit
>>>
>>>Cetin
>>>
>>>>Cetin,
>>>>
>>>>I am interested in this method of startup and release of a Form. I created a Form as ShowWindow=As-Top-Level,Desktop=.T. and coded the Init() as you specified. Then I issue a Clear Events and a Form.Release() behind a command button. I also bundled a Config.fpw with Screen=Off to avoid the initial incoming flicker.
>>>>
>>>>However, there is now a quick screen flicker when I close the Form. Any ideas on this?
>>>>
>>>>Thanks,
>>>>
>>>>Irv.
>>>>
>>>>>With just one form you don't need the main.prg either - as well as set sysmenu off,_screen.caption... and neither "quit" after clear events:) You can directly code in form.init ie:
>>>>>
>>>>>this.show
>>>>>read events
>>>>>
>>>>>Instead of _screen.visible = .f. in code put it in config.fpw as Cindy pointed out.
>>>>>Cetin
>>>>>
>>>>>>Thanks a lot..
>>>>>>Just for the records..
>>>>>>My main program is this:
>>>>>>
>>>>>>
>>>>>>set sysmenu off
>>>>>>_screen.visible=.f.
>>>>>>_screen.caption="Consulta de precios"
>>>>>>do form consulta
>>>>>>read events
>>>>>>
>>>>>>
>>>>>>
>>>>>>And set the form's showwindow=2
>>>>>>And placed a commandbutton in the form with this in the click event:
>>>>>>
>>>>>>
>>>>>>
>>>>>>clear events
>>>>>>sqldisc(0)
>>>>>>thisform.release
>>>>>>quit
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>Hello Jonathan
>>>>>>>
>>>>>>>Make the form a top level form by setting the show window property, you can turn off the VFP main screen with _screen.visible=.f.
>>>>>>>
>>>>>>>Bob
>>>>>>>
>>>>>>>
>>>>>>>>Hi.
>>>>>>>>My application will consist just of a small form (400 x 500 pixels) is there any way to overide the Visual Foxpro screen and just show the form?
>>>>>>>>Thanks in advance.