Either use the show method in the code that is creating the form
loForm = CREATEOBJECT("YourFormClass")
loForm.SHOW(1) && For Modal, no parameter for normal.
or
You can use show in the init of a form, I tested this with a simple form taking a parameter in the INIT method
Init code
PARAMETERS tnType
THISFORM.SHOW( tnType)
If you run the form with
DO TestForm WITH 1
you will get a modal form.
>Most of the time it works the way I want, it's just strange that for one form it decides to complain.
>
>I have not used the show() command before, where do you put the
>thisform.show(1) command? In the init method?
>
>Thanks
>John
>
>>We encountered this problem at the same time as upgrading to VFP 5a so naturally I assumed the upgrade to be the cause.
>>
>>It seems that in 5a WindowType is readonly at runtime (certainly the manual says that it's readonly once the form has been displayed).
>>
>>The work around that we have, is to use the show method for optionally modal forms.
>>
>>IF ThisformShouldBeModal
>> THISFORM.Show( 1)
>>ELSE
>> THISFORM.Show()
>>ENDIF
>>
>>Regards
>>Mark