PB Screen Saver?

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Paul.

Just wondering if it is possible to write a screen saver in PureBasic?

There are lots of examples on the net using Visual Basic. Does PB have the appropriate commands to allow this?
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Danilo.

Should be possible to write a screensaver.

Just rename the .EXE to .SCR

IF ProgramParameter() = "/s" --> Jump to ScreenSaverCode
ELSE Run_Screensaver_Config_Menu

There is also a Parameter "/p" and it has
something to do with the ScreenSaver-Preview,
but i dont know anything about it.
If you check for "/s" only and ignore the rest
it should work fine...

cya,
...Danilo




Edited by - Danilo on 10 December 2001 06:23:13
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Franco.
Just wondering if it is possible to write a screen saver in PureBasic?

There are lots of examples on the net using Visual Basic. Does PB have the appropriate commands to allow this?
Hi Paul,
on friday I've just started to code a screensaver. And found out that there are some discrepancies between Win98 and WinXP.
Under Win98 it is enough to copy your ScreenSaver to 'c:\windows\system'.
Under WinXP the ScreenSavers are located in 'c:\windows\system32' and it is NOT enough to copy it to this folder. They had to be installed correctly.
Anyway suppose that we will figure out the installation thingie.

First you have to be sure that your application starts only once at a time.
Than you have to be sure to catch all keys (mouse and keyboard).
And don't forget the mouse movement!

Oh, the next thing is to know exactly wich parameter you will get.
Under Win98 I got '/c:1340' instead of '/c'.
So you have to react also if you get '/c:1340'.

Didn't figured out how to send the preview stuff but we will see how it works.
Maybe there is somebody out there that can help.

In the next post you will find a skeleton of a functional screen saver.
It works under Win98 and WinXP very well. (some differences in the mouse sensitivity - Win98 same values for Keys and mouse movement, under WinXP it has to be different: but this works also under Win98.)




Have a nice day...
Franco
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Franco.

It was too late yesterday...
The template of a screen saver is moved where it belongs, to tips n' tricks.

Have a nice day...
Franco


Edited by - franco on 10 December 2001 16:42:10
Post Reply