Results 1 to 4 of 4

Thread: [RESOLVED] minimize on close

  1. #1

    Thread Starter
    Frenzied Member litlewiki's Avatar
    Join Date
    Dec 2005
    Location
    Zeta Reticuli Distro:Ubuntu Fiesty
    Posts
    1,162

    Resolved [RESOLVED] minimize on close

    another doubt --

    i want my form to minimize when the user clicks the X button i wrote this code ,it minimizes the form but exits later

    VB Code:
    1. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
    2.  
    3. Select Case UnloadMode
    4.         Case 0
    5.         Me.WindowState = vbMinimized
    6.         Exit Sub
    7. End Select
    8.    
    9. End Sub

    most messengers,download managers have this feature.how is it done??

  2. #2
    Shared Member
    Join Date
    May 2005
    Location
    Kashmir, India
    Posts
    2,277

    Re: minimize on close

    Set Cancel=True in your Select block.
    Use [code] source code here[/code] tags when you post source code.

    My Articles

  3. #3
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,729

    Re: minimize on close

    VB Code:
    1. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
    2.  
    3. Select Case UnloadMode
    4.         Case 0
    5.         Me.WindowState = vbMinimized
    6.         [b]Cancel = 1[/b]
    7.         Exit Sub
    8. End Select
    9.    
    10. End Sub
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


  4. #4

    Thread Starter
    Frenzied Member litlewiki's Avatar
    Join Date
    Dec 2005
    Location
    Zeta Reticuli Distro:Ubuntu Fiesty
    Posts
    1,162

    Re: minimize on close

    oh yes i forgot abt that ,thanks shuja ali !

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