The 'random number' passed on the command line is a handle to the child/preview window that you can write to if you were developing a screen saver in C/C++. Unfortunately, DBP can not use that information.
I mention this in the comments on my screen saver. I got the data from Microsoft's knowledge base.
http://support.microsoft.com/default.aspx?scid=kb;en-us;182383
Quote: "Windows ScreenSaver Info:
ScreenSaver - Show the Settings dialog box.
ScreenSaver /c - Show the Settings dialog box, modal to the foreground window.
ScreenSaver /p <HWND> - Preview Screen Saver as child of window <HWND>.
ScreenSaver /s - Run the Screen Saver.
ScreenSaver /a - Show the Password dialog box.
<HWND> is a HWND presented on the command line as an unsigned decimal number.
You need to create the preview window as a child of this window. It should
cover the parent's entire client area.
--
Well, that the theory. But the reality is a bit different. The /a switch is
only called by Windows 95. Since you need DirectX 9.0a for DBPro patch 5, this
is not even an option. Also, what is not covered in the Knowledge Base is that
Windows XP adds more data to the /c option. It tends to look like this:
/c:123456 where 123456 is probably some windows handle.
Since Dark Basic Pro can not write to the /p handle, my solution is to create
a separate preview window. I also do this for the configuration panel. There
are other solutions, some developers use a VB or Delphi screen saver manager to
handle configuration and launching. While this works well and can handle the
preview window problem, it requires a lot more file management. My solution
creates a single executable (screensaver.scr) that you can drop into the
main windows directory (ie. c:\windows)."
--
TAZ
"Do you think it is wise to provoke him?" "It's what I do." -- Stargate SG-1