By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,414 Members | 1,050 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,414 IT Pros & Developers. It's quick & easy.

ScreenSaver Configuration dialog command line argument

P: n/a
Does anyone know what the command line argumentto launch a
screensaver's options/configuration dialog is on Windows XP Pro?

From most of the example source code I can find on the web, it would
seem to be '/c' but that does not seem to work for the screensaver I
have written. I've tested my code and if '/c' is the first argument
then the options dialog is launched but Windows XP does not seem to be
supplying the '/c' argument when I right click on my .scr file and
select the 'Configure' option from the menu.

After sticking an throw Exception call right at the start of my
screensaver's main function, then running the 'Configure' option from
the right click menu for the .scr file, then attaching my debugger to
the screensaver when it throws the exception, it would appear NO
arguments are being passed to the screensaver (args.length=0). I take
it this means that windows must try and launch the configuration
dialog some other way? If so does anyone know what the other way is?

I'm the screensaver is written in C# and I am running Visual Studio
..Net 2003 and Windows XP Pro.

Cheers,

Danielb
Nov 16 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
The command line argument is /c:######### where number is a base ten number
that is the handle to the window that the configurations screen should be a
child of. Somehow one is supposed to set your config screen to be a child of
this screen and I've seen other screensavers resize this screen so that the
config controls show up nicely inside. It looks marvelous, but I can't get
that handle assigned nor do anything but create a graphics object from the
handle, but I can't figure out the size, or get anywhere else.

I have heard that depending on OS, it could be /c ######### without the
Colon. I've decided that the only reliable way to get the handle is to get
the first and second arguments and if there is no second argument, it's all
in the first, if args.Length = 2, than the number is in the second subscript.
I figure, just tossing everything that isn't a digit 0 - 9.
--
To reply to me directly remove the .byespam part from my email address.
ga******@pacbell.net.byspam
"DanielB" wrote:
Does anyone know what the command line argumentto launch a
screensaver's options/configuration dialog is on Windows XP Pro?

From most of the example source code I can find on the web, it would
seem to be '/c' but that does not seem to work for the screensaver I
have written. I've tested my code and if '/c' is the first argument
then the options dialog is launched but Windows XP does not seem to be
supplying the '/c' argument when I right click on my .scr file and
select the 'Configure' option from the menu.

After sticking an throw Exception call right at the start of my
screensaver's main function, then running the 'Configure' option from
the right click menu for the .scr file, then attaching my debugger to
the screensaver when it throws the exception, it would appear NO
arguments are being passed to the screensaver (args.length=0). I take
it this means that windows must try and launch the configuration
dialog some other way? If so does anyone know what the other way is?

I'm the screensaver is written in C# and I am running Visual Studio
..Net 2003 and Windows XP Pro.

Cheers,

Danielb

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.