Results 1 to 9 of 9

Thread: Minimized Form *[RESOLVED]*

  1. #1

    Thread Starter
    Hyperactive Member RealNickyDude's Avatar
    Join Date
    Nov 2002
    Location
    Watching you through the hidden camera :o
    Posts
    435

    Thumbs up Minimized Form *[RESOLVED]*

    How do you check if a user has minimized a form?

    VB Code:
    1. Private Sub Form1_<whatever it is!>
    Last edited by RealNickyDude; Jan 30th, 2003 at 08:56 AM.
    [vbcode]
    On Error GoTo Hell
    [/vbcode]:¬) Nicky : Why not try VBCodebook.NET.

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    try this ...
    VB Code:
    1. Private Sub Form1_Resize(ByVal sender As Object, ByVal e _
    2. As System.EventArgs) Handles MyBase.Resize
    3.  
    4. If Not FormWindowState.Minimized = True Then
    5. MsgBox("Minimized")
    6. End If
    7. End Sub

  3. #3

    Thread Starter
    Hyperactive Member RealNickyDude's Avatar
    Join Date
    Nov 2002
    Location
    Watching you through the hidden camera :o
    Posts
    435
    All I get is the message box saying "Minimized", I click ok to get rid of it, and back it comes, I had to shut the program down using the Task Manager!

    (I Build the Solution and run it from a shortcut on my TaskBar, I don't run it from within VB).

    I have the WindowState as Maximized, perhaps that's causing the problem.
    [vbcode]
    On Error GoTo Hell
    [/vbcode]:¬) Nicky : Why not try VBCodebook.NET.

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Originally posted by pirate
    try this ...
    VB Code:
    1. Private Sub Form1_Resize(ByVal sender As Object, ByVal e _
    2. As System.EventArgs) Handles MyBase.Resize
    3. If Not FormWindowState.Minimized = True Then
    4. MsgBox("Minimized")
    5. End If
    6. End Sub
    Did you try the code without "Not" ?
    this won't work either . try with other size events (changesize and maximizedchange (I think)

  5. #5

    Thread Starter
    Hyperactive Member RealNickyDude's Avatar
    Join Date
    Nov 2002
    Location
    Watching you through the hidden camera :o
    Posts
    435
    yeah, I tried that after I posted the message, seemed more logical without the not but then I got no message.

    Perhaps the problem is that i'm not actually resizing the Form, just minimizing (although you'd think that minimizing would call the Resize).

    I've tried different things but I'm stuck.
    [vbcode]
    On Error GoTo Hell
    [/vbcode]:¬) Nicky : Why not try VBCodebook.NET.

  6. #6
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    I know this isn't solution but it might be ......one of the available till now , Cute UI. (I like when I draw my style on my app.)
    Attached Files Attached Files

  7. #7

    Thread Starter
    Hyperactive Member RealNickyDude's Avatar
    Join Date
    Nov 2002
    Location
    Watching you through the hidden camera :o
    Posts
    435
    Novel way , but not quite what I had in mind.
    [vbcode]
    On Error GoTo Hell
    [/vbcode]:¬) Nicky : Why not try VBCodebook.NET.

  8. #8
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Back here ,
    try this , it should work
    VB Code:
    1. Private Sub Form1_Resize(ByVal sender As Object, ByVal e _
    2.     As System.EventArgs) Handles MyBase.Resize
    3.  
    4.         Select Case Me.WindowState
    5.             Case FormWindowState.Minimized
    6.                 'MsgBox("Minimized")
    7.             Case FormWindowState.Maximized
    8.                 MsgBox("Maximized")
    9.             Case FormWindowState.Normal
    10.                 'MsgBox("Normal")
    11.         End Select
    12.     End Sub

  9. #9

    Thread Starter
    Hyperactive Member RealNickyDude's Avatar
    Join Date
    Nov 2002
    Location
    Watching you through the hidden camera :o
    Posts
    435
    Thanks Pirate!
    [vbcode]
    On Error GoTo Hell
    [/vbcode]:¬) Nicky : Why not try VBCodebook.NET.

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