I guess I always launch forms from a main prg so I can do form xxx & follow
with my read events statement. I thought I could do away with this if I set
my form as main, but this appears not to be the case. My app flashes briefly
and then vanishes just as though it still needs a read events statement. The
pertinent settings for the form seem to be: Window type = modal and
ShowWindow = 2 As Top Level Form.
This is a stand alone, runtime app. What am I missing?

Re: Form as main component in standalone exe by Jan

Jan
Thu May 01 15:29:55 CDT 2008

Lew napsal(a):
> I guess I always launch forms from a main prg so I can do form xxx & follow
> with my read events statement. I thought I could do away with this if I set
> my form as main, but this appears not to be the case. My app flashes briefly
> and then vanishes just as though it still needs a read events statement. The
> pertinent settings for the form seem to be: Window type = modal and
> ShowWindow = 2 As Top Level Form.
> This is a stand alone, runtime app. What am I missing?

As top level form cannot be modal.

Re: Form as main component in standalone exe by Lew

Lew
Thu May 01 15:58:00 CDT 2008

Modeless doesn't work either. I believe that VFP & windows ignore this
setting anyway when a form is deployed as a top level form.

"Jan Bucek" wrote:

> Lew napsal(a):
> > I guess I always launch forms from a main prg so I can do form xxx & follow
> > with my read events statement. I thought I could do away with this if I set
> > my form as main, but this appears not to be the case. My app flashes briefly
> > and then vanishes just as though it still needs a read events statement. The
> > pertinent settings for the form seem to be: Window type = modal and
> > ShowWindow = 2 As Top Level Form.
> > This is a stand alone, runtime app. What am I missing?
>
> As top level form cannot be modal.
>

Re: Form as main component in standalone exe by Jan

Jan
Thu May 01 16:29:19 CDT 2008

Lew napsal(a):
> Modeless doesn't work either. I believe that VFP & windows ignore this
> setting anyway when a form is deployed as a top level form.
>
> "Jan Bucek" wrote:
>
>> Lew napsal(a):
>>> I guess I always launch forms from a main prg so I can do form xxx & follow
>>> with my read events statement. I thought I could do away with this if I set
>>> my form as main, but this appears not to be the case. My app flashes briefly
>>> and then vanishes just as though it still needs a read events statement. The
>>> pertinent settings for the form seem to be: Window type = modal and
>>> ShowWindow = 2 As Top Level Form.
>>> This is a stand alone, runtime app. What am I missing?
>> As top level form cannot be modal.
>>

Your concept - to call main form from main.prg - I use too, because I
can define this way commonly used variables und functions in main.prg
and I do not see any reason to leave it.

Re: Form as main component in standalone exe by Lew

Lew
Thu May 01 16:48:27 CDT 2008

Well, it's what I've always used, too. I just don't see the point of being
able to set a form as main if it must be run from a prg anyway.

"Jan Bucek" wrote:

> Lew napsal(a):
> > Modeless doesn't work either. I believe that VFP & windows ignore this
> > setting anyway when a form is deployed as a top level form.
> >
> > "Jan Bucek" wrote:
> >
> >> Lew napsal(a):
> >>> I guess I always launch forms from a main prg so I can do form xxx & follow
> >>> with my read events statement. I thought I could do away with this if I set
> >>> my form as main, but this appears not to be the case. My app flashes briefly
> >>> and then vanishes just as though it still needs a read events statement. The
> >>> pertinent settings for the form seem to be: Window type = modal and
> >>> ShowWindow = 2 As Top Level Form.
> >>> This is a stand alone, runtime app. What am I missing?
> >> As top level form cannot be modal.
> >>
>
> Your concept - to call main form from main.prg - I use too, because I
> can define this way commonly used variables und functions in main.prg
> and I do not see any reason to leave it.
>

Re: Form as main component in standalone exe by Rush

Rush
Thu May 01 17:53:34 CDT 2008

Maybe so you can run it from development mode?

- Rush

Lew wrote:
> Well, it's what I've always used, too. I just don't see the point of being
> able to set a form as main if it must be run from a prg anyway.
>
> "Jan Bucek" wrote:
>
>
>> Lew napsal(a):
>>
>>> Modeless doesn't work either. I believe that VFP & windows ignore this
>>> setting anyway when a form is deployed as a top level form.
>>>
>>> "Jan Bucek" wrote:
>>>
>>>
>>>> Lew napsal(a):
>>>>
>>>>> I guess I always launch forms from a main prg so I can do form xxx & follow
>>>>> with my read events statement. I thought I could do away with this if I set
>>>>> my form as main, but this appears not to be the case. My app flashes briefly
>>>>> and then vanishes just as though it still needs a read events statement. The
>>>>> pertinent settings for the form seem to be: Window type = modal and
>>>>> ShowWindow = 2 As Top Level Form.
>>>>> This is a stand alone, runtime app. What am I missing?
>>>>>
>>>> As top level form cannot be modal.
>>>>
>>>>
>> Your concept - to call main form from main.prg - I use too, because I
>> can define this way commonly used variables und functions in main.prg
>> and I do not see any reason to leave it.
>>
>>

Re: Form as main component in standalone exe by Jack

Jack
Thu May 01 21:52:23 CDT 2008

Setting a form as Main is useful for .app files. It also could be
used in a .exe if the form was modal (as someone else pointed out,
setting a form to Top Level Form forces it to be non-modal).

On Thu, 1 May 2008 14:48:27 -0700, Lew <Lew@discussions.microsoft.com>
wrote:

>Well, it's what I've always used, too. I just don't see the point of being
>able to set a form as main if it must be run from a prg anyway.
>
>"Jan Bucek" wrote:
>
>> Lew napsal(a):
>> > Modeless doesn't work either. I believe that VFP & windows ignore this
>> > setting anyway when a form is deployed as a top level form.
>> >
>> > "Jan Bucek" wrote:
>> >
>> >> Lew napsal(a):
>> >>> I guess I always launch forms from a main prg so I can do form xxx & follow
>> >>> with my read events statement. I thought I could do away with this if I set
>> >>> my form as main, but this appears not to be the case. My app flashes briefly
>> >>> and then vanishes just as though it still needs a read events statement. The
>> >>> pertinent settings for the form seem to be: Window type = modal and
>> >>> ShowWindow = 2 As Top Level Form.
>> >>> This is a stand alone, runtime app. What am I missing?
>> >> As top level form cannot be modal.
>> >>
>>
>> Your concept - to call main form from main.prg - I use too, because I
>> can define this way commonly used variables und functions in main.prg
>> and I do not see any reason to leave it.
>>

Re: Form as main component in standalone exe by Olaf

Olaf
Fri May 02 08:30:48 CDT 2008

> Well, it's what I've always used, too. I just don't see the point of being
> able to set a form as main if it must be run from a prg anyway.

There's not much use of a form being set as main, you can do that
if you have the form modal and not top level like Rush already said.

If you want you application be able to run many forms in parallel
a read events is the better option still and so the easiest is to use a
main prg anyway.

Bye, Olaf.