Subject Re: Modal Form
From Ken Mayer <dbase@nospam.goldenstag.net>
Date Sat, 14 Nov 2020 07:11:38 -0800
Newsgroups dbase.getting-started

On 11/14/2020 6:51 AM, Don wrote:
> On 11/14/2020 12:12 AM, Don wrote:
>>
>> Why Doesn't This Code Open a Modal Form?
>>
>> Local f
>> f = New Form2()
>> f.mdi = false
>> f.readmodal()
>>
>>
>> Class Form2 of Form                   //
>> This.Width            = 25
>> This.Height           = 25
>> This.Text             = "Form2"
>> This.MDI              = false
>> This.OnOpen           = Class::FormOnOpen
>> ? "Form2 "
>>
>> Function FormOnOpen
>> ?
>> ? "Form2 Open"
>> *Form.WindowState        = 0
>> Return
>> EndClass
>>
>> Don
>
> WoW
>
> Thanks Ken!
>
> Who Knew, well I guess everyone but me.
>
> But, You don't have to do that with a modeless Form?
>
> I had even set this.setfocus() in the forms constructor code - didn't work.
>
> Why do You think the Empty Modal form get focus?

I am sure there is a reason for it, but I don't know.

Ken


--
*Ken Mayer*
Ken's dBASE Page: http://www.goldenstag.net/dbase
The dUFLP: http://www.goldenstag.net/dbase/index.htm#duflp
dBASE Books: http://www.goldenstag.net/dbase/Books/dBASEBooks.htm
dBASE Tutorial: http://www.goldenstag.net/dbase/Tutorial/00_Preface.htm