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?
PB Screen Saver?
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
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
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
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Franco.
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
Hi 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?
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
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm