Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Screen Resolutions Issue
Message
 
To
09/06/2006 00:46:05
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01127911
Message ID:
01128051
Views:
23
>Hi Borislav,
>
>Thanks for you reply. Although my forms was original design with 800x640 resolution. Could I still able to resize the form to a different resolution? and how about the controls on the form (adjust accordingly)?
>
>Thanks,
>Steve

Try this:
oForm = CREATEOBJECT([Form1])
oForm.Show(1)

DEFINE CLASS form1 AS form


    DoCreate = .T.
    Name = "form1"


    ADD OBJECT text1 AS textbox WITH ;
        Anchor = 11, ;
        Height = 23, ;
        Left = 8, ;
        Top = 18, ;
        Width = 100, ;
        Name = "Text1"


    ADD OBJECT label1 AS label WITH ;
        Anchor = 11, ;
        Caption = "Label1", ;
        Height = 17, ;
        Left = 8, ;
        Top = 1, ;
        Width = 40, ;
        Name = "Label1"


    ADD OBJECT grid1 AS grid WITH ;
        Anchor = 15, ;
        Height = 156, ;
        Left = 17, ;
        Top = 49, ;
        Width = 345, ;
        Name = "Grid1"


    ADD OBJECT combo1 AS combobox WITH ;
        Anchor = 44, ;
        Height = 24, ;
        Left = 215, ;
        Top = 210, ;
        Width = 135, ;
        Name = "Combo1"


    ADD OBJECT check1 AS checkbox WITH ;
        Top = 213, ;
        Left = 15, ;
        Height = 17, ;
        Width = 162, ;
        Anchor = 134, ;
        Alignment = 0, ;
        Caption = "Check1", ;
        Name = "Check1"


    PROCEDURE Init
        thisform.LockScreen = .t.
        IF SYSMETRIC(1) # 800
           thisform.Width = SYSMETRIC(1)
        ENDIF
        IF SYSMETRIC(2) # 600
           thisform.Height = SYSMETRIC(2)
        ENDIF
        thisform.LockScreen = .f.
    ENDPROC


    PROCEDURE Load
        CREATE CURSOR test (fld1 I, Fld2 C(20), Fld3 C(30))
    ENDPROC


ENDDEFINE
This is very rough example, but its purpose is to show you the idea :-)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform