>>>>Hi..All
>>>>I designed from in my application ..my screen size is 800 x 600 ..I want create form size 800 x 600 . I want run form maxinum windows from my application. How I can solve? I don't want click maxinum when I run form
>>>>
>>>
>>>Try setting the form's WindowState = 2
>>>
>>Ed, When I set WindowState=2 the app starts with the form still in the top right corner of a lot of gray space. Resize never seems to be called. Yet if I load the form with the WindowState = 0 then click the maximize button top right or drag the size to fill the screen my resize works perfectly on all controls
>>
>>Also, WindowState = 2 defaults to the size of the maximum form size as set in Tools/Options. Now do I have something set wrong? Or will my clients just have to hit the maximize button themselves? I've been working on this for a while off & on....
>>
I left out a critical ingredient; I specify everything in pixels, and in the Load() event, I set the form's .maxheight to SYSMETRIC(2) - (2 * border width used for form) and .maxwidth to SYSMETRIC(1) - (2 * border element height for form)
>
>What I do, pretty successfully, is to start the form with
form.visible = .f. and .windowstate = 1 in the Load(), and then in the Init() I execute the following for maximized forms with no close button or control box:
>
>
WITH this
> .lockscreen = .t.
> .windowstate = 2
> .backcolor = RGB(<i>whatever I want for backcolor</i>)
> .icon = <i>character expression for the icon file</i>
> .caption = <i>character expression for the form</i>
> .closable = .F.
> .controlbox = .F.
> DOEVENTS()
> .movable = .F.
> .minbutton = .F.
> .maxbutton = .F.
> .borderstyle = 1
> .lockscreen = .f.
> .show()
>ENDWITH
>
>This doesn't do anything about repositioning or centering things; for example, to make sure that an image centers properly:
>
>.lockscreen = .t.
>=.addobject('image','image')
>.image.picture =
character expression name of .bmp>.image.stretch = 2
>.image.left = INT((SYSMETRIC(1) - .image.width)/2)
>.image.top = INT((SYSMETRIC(2) - .image.height)/2)
>.image.enabled = .t.
>.image.visible = .t.
>.lockscreen = .f.