Maximized form questions

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • 1388-2/HB

    #1

    Maximized form questions

    For vb2005. At design time I set the main form's WindoState to Maximized
    and I disabled the Maximize box. The user can Minimize the application
    only.

    When the program launches, the form is indeed Maximized. However:

    1. The Maximized state of my form does not take the Windows taskbar state
    into consideration. The form behaves as if the user has their taskbar set
    to "autohide", even if they do not. The app extends all the way down to the
    bottom of the screen, and on some machines the lower bounds of this area may
    be obscured by the taskbar permanently set in the 'raised' position. Is
    there a Maximize command that understands to account for the state of the
    windows taskbar?

    2. You can simply grab the title bar of my "Maximized" form and move it
    around, as if it were a normal window that is not Maximized. Is there a way
    to "lock" a Maximized window in place?

    3. Double-clicking the title bar of my application performs a "restore
    down", circumventing my disabled the maximize/restore button. Subsequently
    double-clicking the application title bar does not "restore up" again, and
    so the app is left stranded in a restore-down (shrunken) state that is a)
    not desireable in the first place and b) irrecoverable unless the app is
    restarted. Is there a way to disable the double-clicking of a title bar
    from performing a restore down?


  • Shane Story

    #2
    Re: Maximized form questions

    1.) Screen.GetWorki ngArea() get's the non taskbar working area, you could
    dimension your form to this.
    2.) Why don't you start it out as maximized, in the windowstate property.
    If this doesn't work have you considered getting rid of the title bar? You
    could always add your own minimize button and that would avoid the user
    being able to move it. This is sort of an irritating behavior, but it is
    your app.
    This would solve item #3
    3.) Otherwise, if you want to circumvent restore down, I think you
    would probably need to do Sub classing, although I am curious, if you set
    MaximumSize & MinimumSize properties based on the value in #1 above, maybe
    it wouldn't allow this.

    HTH,

    Shane
    "1388-2/HB" <1@1.net> wrote in message
    news:Q65Of.1818 5$rL5.11257@new ssvr27.news.pro digy.net...[color=blue]
    > For vb2005. At design time I set the main form's WindoState to Maximized
    > and I disabled the Maximize box. The user can Minimize the application
    > only.
    >
    > When the program launches, the form is indeed Maximized. However:
    >
    > 1. The Maximized state of my form does not take the Windows taskbar state
    > into consideration. The form behaves as if the user has their taskbar set
    > to "autohide", even if they do not. The app extends all the way down to
    > the bottom of the screen, and on some machines the lower bounds of this
    > area may be obscured by the taskbar permanently set in the 'raised'
    > position. Is there a Maximize command that understands to account for the
    > state of the windows taskbar?
    >
    > 2. You can simply grab the title bar of my "Maximized" form and move it
    > around, as if it were a normal window that is not Maximized. Is there a
    > way to "lock" a Maximized window in place?
    >
    > 3. Double-clicking the title bar of my application performs a "restore
    > down", circumventing my disabled the maximize/restore button.
    > Subsequently double-clicking the application title bar does not "restore
    > up" again, and so the app is left stranded in a restore-down (shrunken)
    > state that is a) not desireable in the first place and b) irrecoverable
    > unless the app is restarted. Is there a way to disable the
    > double-clicking of a title bar from performing a restore down?
    >[/color]


    Comment

    Working...