Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / General 2 / April 2004



Tip: Looking for answers? Try searching our database.

Multiple Instances

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
J.J. Holiday - 22 Apr 2004 10:45 GMT
I'm trying to write a screen saver.  My understanding is that it's
actually an .exe that you change they extension to .scr.

The problem is that when Windows (I'm on 98SE) runs the screen saver,
multiple instances seem to execute.  It's as though Windows does not
know that a screen saver is already running.   Is there something else
that I have to do to let Windows know that it's a screen saver and not
to run another copy of the program?  Or is there some way to detect
that the program is already running and not allow other copies to run?

Thanks for any help you can give.
Murphy McCauley - 22 Apr 2004 19:11 GMT
> I'm trying to write a screen saver.  My understanding is that it's
> actually an .exe that you change they extension to .scr.
[quoted text clipped - 7 lines]
>
> Thanks for any help you can give.

You must subclass your screensaver window, and catch the WM_SYSCOMMAND
message.  If the WPARAM is SC_SCREENSAVE, do not call DefWindowProc().

Murphy
www.ConstantThought.com
J.J. Holiday - 23 Apr 2004 00:42 GMT
>You must subclass your screensaver window, and catch the WM_SYSCOMMAND
>message.  If the WPARAM is SC_SCREENSAVE, do not call DefWindowProc().

I'm afraid you're waaaaay beyond my meager skills.  Can you give me
the code that I must use to do that?

Sorry to be such a novice.
bmlogiciels2 - 30 Apr 2004 22:02 GMT
If you want your application to run single instance, try  the property :

App.PrevInstance

M. B.

> I'm trying to write a screen saver.  My understanding is that it's
> actually an .exe that you change they extension to .scr.
[quoted text clipped - 7 lines]
>
> Thanks for any help you can give.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.