>>local f1 >>f1 = createobject('frm') >>f1.show >>read events >> >>* ---------- >>define class frm as Form >> >> AutoCenter = .t. >> ShowWindow = 2 >> Toolbar = '' >> >> procedure Init >> ThisForm.Visible = .t. >> ThisForm.Toolbar = createobject('tbr') >> ThisForm.Toolbar.Dock(0) >> ThisForm.Toolbar.Show >> endproc >> >> procedure Release >> ThisForm.Toolbar = .NULL. >> endproc >> >> procedure Unload >> clear events >> endproc >> >>enddefine >> >>* ---------- >>define class tbr as Toolbar >> >> ShowWindow = 1 >> >> add object btn as CommandButton; >> with Width=100, Height=25, Caption="Close window" >> >> procedure btn.Click >> _SCREEN.ActiveForm.Release() >> endproc >> >>enddefine >>>>
>local f1 >f1 = createobject('frm') >f1.show >read events > >* ---------- >define class frm as Form > > AutoCenter = .t. > ShowWindow = 2 > Toolbar = '' > > procedure Init > ThisForm.Visible = .t. > ThisForm.Toolbar = createobject('tbr') > ThisForm.Toolbar.Dock(0) > ThisForm.Toolbar.Show > endproc > > procedure Unload > clear events > endproc > >enddefine > >* ---------- >define class tbr as Toolbar > > ShowWindow = 1 > > add object btn as CommandButton; > with Width=100, Height=25, Caption="Close window" > > procedure btn.Click > DECLARE SHORT PostMessage IN WIN32API INTEGER,INTEGER,INTEGER,INTEGER > =PostMessage(_SCREEN.ActiveForm.HWnd,16,0,0) > CLEAR DLLS PostMessage > endproc > >enddefine >Yea... Just another workaround. But you do confirm this is a bug, don't you?