April 24, 2014
Hot Topics:
RSS RSS feed Download our iPhone app

Quickstart Guide to Screensavers, Page 3

  • November 19, 2002
  • By Karl Moore, Karl Moore
  • Send Email »
  • More Articles »

When your screensaver application is run (by, say, the Display applet or Windows itself) numerous arguments are passed to it, depending on what the calling application wants it to do. You can extract command-line arguments by analysing the string returned by the Command function.

Here's a list of arguments you may encounter, along with what they are asking your screensaver to do:

/pDisplay a preview of your screensaver (followed by a handle to the preview window)
/cDisplay any settings for your screensaver (followed by a handle to the Display Properties window)
/pDisplay a preview of your screensaver (followed by a handle to the preview window)
/sDisplay full screensaver
/aShow change password dialog box (followed by a handle to the Display Properties window)

Determining the Mode

To determine the screensaver mode, you need to analyse any passed arguments.

  • Use the following code to determine which mode you are currently in, preferably placing it into your Sub Main:
If Left(Command, 2) = "/p" Then' Run "Previewing your Screensaver" codeElseIf Left(Command, 2) = "/c" ThenMsgBox "Settings Dialog Box (If Required) Goes Here"ElseIf Left(Command, 2) = "/s" ThenMyScreensaverForm.ShowElseIf Left(Command, 2) = "/a" Then' Run "Changing the Password" codeEnd If




Page 3 of 8



Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Sitemap | Contact Us

Rocket Fuel