home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.visual.basic      MS Visual Basic discussions, NOT dot-net      10,840 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 9,744 of 10,840   
   Ken Halter to Nicolas Poirier   
   Re: Info with system tray apps   
   10 Nov 05 07:47:26   
   
   XPost: comp.lang.basic.visual, comp.lang.basic.visual.misc, micr   
   soft.public.vb.general.discussion   
   From: Ken_Halter@Use_Sparingly_Hotmail.com   
      
   "Nicolas Poirier"  wrote in message   
   news:Ejvcf.14673$1L3.623284@news20.bellglobal.com...   
   >I successfully made a system tray application.   
   > When I do shut down the computer, how does the computer can instruct my   
   > application to shut down?   
   > For the moment, if I don't quit my application, system asks to kill an   
   > unresponsive task before shut sown.   
   > How does I make shut down run more correctly?   
   >   
   > Thank you   
   > Nicolas Poirier   
      
   'If you have something like this in one of your forms.....   
   '=======   
   Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)   
      Cancel = True   
      Me.Hide   
   End Sub   
   '=======   
      
   'Change that to:   
   '=======   
   Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)   
      If UnloadMode = vbFormControlMenu Then   
         Cancel = True   
         Me.Hide   
      End If   
   End Sub   
   '=======   
      
   So it only cancels the unload if the user clicks the close button or menu.   
   The OS can still shut it down.   
      
   --   
   Ken Halter - MS-MVP-VB - http://www.vbsight.com   
   DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm   
   Please keep all discussions in the groups..   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca