Skip to main content
May 5, 2021 8:59 AM UTC

Cobol Wow, create windows, ShowState Maximized

In cobol wow, I want to know what instruction should I use for at runtime, when creating a windows form, specify it to be Maximized. Usually this is specified in the project properties, ShowState can be 0) Normal, 1) maximized, 2) iconic. However, I want to know how to change this at runtime. For example if the form has been created as 0) normal, I want for example 1) maximized.

CALL WOWCREATEWINDOW USING ?

    3 replies

    Juan Urraburu
    Participating Frequently
    May 12, 2021 10:37 PM UTC

    In cobol wow, I want to know what instruction should I use for at runtime, when creating a windows form, specify it to be Maximized. Usually this is specified in the project properties, ShowState can be 0) Normal, 1) maximized, 2) iconic. However, I want to know how to change this at runtime. For example if the form has been created as 0) normal, I want for example 1) maximized.

    CALL WOWCREATEWINDOW USING ?

    Hola Wascar,

    Why not to use call wowsetprop using win-return YourForm-h "ShowState" 1 on the onCreate event?

    Regards,

    May 13, 2021 8:29 PM UTC

    Hola Wascar,

    Why not to use call wowsetprop using win-return YourForm-h "ShowState" 1 on the onCreate event?

    Regards,

    WP-CREATE-CONTROLA.
             MOVE ALL 'N' TO WIN-STYLE.
            CALL WOWCREATEWINDOW USING CONTROLA-H
           CONTROLA-DEF WIN-STYLE 0 CONTROLA-CONTROL-HANDLES.
    call wowsetprop using win-return controla-h "ShowState" 1.

    ------------------------------------------------------------

    77 win-tipo pic 9.

    call wowsetprop using win-return controla-h
    "ShowState" win-tipo.

    May 13, 2021 8:32 PM UTC

    WP-CREATE-CONTROLA.
             MOVE ALL 'N' TO WIN-STYLE.
            CALL WOWCREATEWINDOW USING CONTROLA-H
           CONTROLA-DEF WIN-STYLE 0 CONTROLA-CONTROL-HANDLES.
    call wowsetprop using win-return controla-h "ShowState" 1.

    ------------------------------------------------------------

    77 win-tipo pic 9.

    call wowsetprop using win-return controla-h
    "ShowState" win-tipo.

    Thank Juan Manuel. The .WPF that is actually part of the source had been ignored by me. I have tried the instruction you have recommended and it works.