Results 1 to 6 of 6

Thread: Minimized or normal

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2001
    Location
    The Littlest State in the Union
    Posts
    57

    Minimized or normal

    Is there a way to tell whether or not the current form is minimized. If any 1 would like to shed some light on this I would be eternally grateful (maybe not eternally...). Thanks

    -BFF
    Visual Basic 6.0 Enterprise Edition
    Java 2
    Windows 98
    Mac OS 9.1

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    VB Code:
    1. If Me.WindowState = vbMinimized Then
    2.   MsgBox "Minimized"
    3. ElseIf Me.WindowState = vbNormal Then
    4.   MsgBox "Normal"
    5. End If
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    Code:
    Private Sub Command1_Click()
      MsgBox Me.WindowState '0 = normal, 1 = Min, 2 = Max
    End Sub
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  4. #4

    Thread Starter
    Member
    Join Date
    Feb 2001
    Location
    The Littlest State in the Union
    Posts
    57

    Thanks

    Thanks a ton
    Visual Basic 6.0 Enterprise Edition
    Java 2
    Windows 98
    Mac OS 9.1

  5. #5
    Matthew Gates
    Guest
    Originally posted by crptcblade
    VB Code:
    1. If Me.WindowState = vbMinimized Then
    2.   MsgBox "Minimized"
    3. ElseIf Me.WindowState = vbNormal Then
    4.   MsgBox "Normal"
    5. End If


    This is better :


    VB Code:
    1. Private Sub Form_Resize()
    2.     Select Case WindowState
    3.         Case 0: MsgBox "Normal"
    4.         Case 1: MsgBox "Minimized"
    5.         Case 2: MsgBox "Maximized"
    6.     End Select
    7. End Sub

  6. #6
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    I know, I just whipped up a quick example
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width