Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Proper screensaver, in the little grey monitor 'n' everything

Author
Message
blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 10th Feb 2005 19:32 Edited at: 10th Feb 2005 19:38
Yup. A proper screensaver, for all! Open source!

It appears in the little grey monitor on the Display Settings box ('Screensaver' tab), can show a configuration dialog (but doesn't), and has a nice little purple cube too.

But save the praise (pff.. yeah, right) for later - I'm missing *ONE DLL COMMAND* that makes *EVERYTHING* fall apart.

How the f**king hell do you get your window's hWnd?

It's been mentioned before but I forgot!

For now, I leave you with the code - replace where it says '?????' with the return value from the command that gets the DBC window's hWnd, and it will work.

Prepare to be amazed!



Edit: To run this screensaver, compile it to an EXE, then rename it from [whatever].exe to [whatever].scr. From there, the quickest way would be to right-click it and choose 'Install'. Of course, it'll crash because I'm still missing that one command...

Edit #2: With the last edit, I tweaked the code a bit and forgot to put the '?????' back in....

Avatar - white cat in a snowstorm. Look closely.
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 10th Feb 2005 20:03 Edited at: 10th Feb 2005 20:26
Easy done;

Change;


With;


I'll compile and test the code now

Jess.

[EDIT] NVM, my own stupid fault...
[/EDIT]

[EDIT 2]
Haha, it kinda works, but when its put into the other window, it goes all screwy
Test it and see for yourself
I'll give it a shot in DBP
[/EDIT]

[EDIT 3]
Ok, it works about the same in DBP
What you need to do is a few things;
Take out that maximize window after the resolution change.
Position the DarkBASIC window at the same position as the little display window. ( do it each loop, as if the user drags the window, you want it to go with it )
Check if the Parent window actually exists ( each loop ) cos if it doesn't, you don't want your app sitting there, running, by itself in the middle of the screen!

Also, if it's compiled in DBP, use the Hide Window IDE Option, so it's hidden on start-up, then show the window when it needs to be

If compiled in DBC, use the ini file trick;
make a settings.ini file, and in it put;
[windowmode]=1
( I think that's right...? )
Because that will force the DBC window to open in Windowed mode, rather than flicking to FullScreen first!
[/EDIT]


Team EOD :: Programmer/All-Round Nice Guy
Aust. Convention!

Login to post a reply

Server time is: 2025-05-25 02:13:51
Your offset time is: 2025-05-25 02:13:51