Skip to Content
avatar image
Former Member

The already opened sheet is restored to its normal size.

Hi,

Reference from the following URL: http://codeverge.com/sybase.powerbuilder.general/opensheet-and-maximized-sheets/995078

In our application, we have the same issue as stated in the URL. When a sheet window maximized in an MDI application and open another sheet using OpenSheet() the already opened sheet is restored to its normal size before the new sheet is opened.

This is the default behavior provided in PowerBuilder. But this default behavior is not required in our application.

Is there any way to restrict this behavior or is there any other way to resolve the issue?

Thanks.

Haresh

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Aug 09, 2017 at 01:11 PM

    That link you posted does not work.

    If you always want to have maximized windows then set the windowstate property to Maximized! in the painter and make sure that you call OpenSheet with state Original!

    OpenSheetWithParm (w_mySheet,'', w_myFrame,0, Original!)
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 10, 2017 at 09:01 AM

    Hi,

    Thank you for providing answer, but in our application we do not want a window is always maximized.

    So that we really not required the default functionality provided by PowerBuilder.

    Is there any way to restrict this behavior or is there any other way to resolve the issue?

    Thanks.

    Haresh

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 10, 2017 at 04:49 PM

    You can store the windows state in the deactivate window as an instance variable and then restore it back in the activate event.

    Declare instance var:
    WindowState i_laststate Deactivate: i_laststate = This.WindowState Activate: If i_laststate = Maximized! And This.WindowState <> Maximized! Then This.WindowState = Maximized!

    HTH

    Add comment
    10|10000 characters needed characters exceeded