Welcome to Dream.In.Code
Become a VB Expert!

Join 137,268 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,484 people online right now. Registration is fast and FREE... Join Now!




Screen saver preview form keeps running after closing Display Properti

 
Reply to this topicStart new topic

Screen saver preview form keeps running after closing Display Properti, Using VB6. Program runs well under Win2k but not XP or Win2k3

Petebardo
15 Dec, 2006 - 02:33 PM
Post #1

New D.I.C Head
*

Joined: 14 Dec, 2006
Posts: 12


My Contributions
When the Display Properties window selects a screen saver, the screensaver program is invoked with /p. The screen saver form is then made a child of the Display Properties window. Problem is, when the display properties window is closed, the screen saver form is hidden, but the program/process does not terminate.

I've placed code in events as follows:


Private Sub Form_Deactivate()
End
End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
End
End Sub

Private Sub Form_LostFocus()
SaveSetting App.Title, "Settings", "PrevInstance", 0
SaveSetting App.Title, "Settings", "PrevPID", 0
End
End Sub

Private Sub Form_Terminate()
End
End Sub

Private Sub Form_Unload(Cancel As Integer)
SaveSetting App.Title, "Settings", "PrevInstance", 0
SaveSetting App.Title, "Settings", "PrevPID", 0
Unload Me
End
End Sub

None of these events are triggered when the parent window closes. I placed a timer on the form that checked to see if the parent window is still open, but the program stops getting cpu time after the parent window closes.

Any ideas? Using VB6 'cause I don't want to do .NET.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/4/08 07:38PM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month