English
Source / code snippets

Screen saver Mini Template

 
Screen saver V1 - mini Template.
CompileMarkSeparation
 {$cl}
// {$batch copy "screensaver1.exe" "c:winxpscreensaver1.scr"}
/*
WinXP Parameters Information:
Select Saver:	/p hdl&
Setup:		/c:hdl&
Preview:	/s
/p Passes a HWND for the preview
/c Show options dialog
/s Start screen saver
*/
seterrorlevel -1
declare resx&,resy&,ex&,mx&,my&,pipe&,appname$,appver$,hdl&
 $U pipe.pcu = pipe.
appname$:="XProfan Screensaver";appver$:="V1.0"
case (val(substr$($winver,1,"."))<5) : _oldos// anti old OS
case pipe.is("xprofan-screensaver") : end// saver is already in use
pipe&:=pipe.create("xprofan-screensaver")// create alreadyInUse blocker

if %parcount>0

    if par$(1)=="/p"

        hdl&:=val(par$(2))

        if (hdl&)

            _preview hdl&

        endif

    elseif par$(1)=="/s"

        _main

    elseif mid$(par$(1),1,2)=="/c"

        _options

    else

        _main

    endif

else

    _main

endif

pipe.close pipe&// remove alreadyInUse blocker
end

proc _oldos

    messagebox "Sorry, but "+appname$+" "+appver$+" requires WindowsXP or higher.",appname$,16
    end

endproc

proc _main

    resx&:=%maxx// save resoltion into statics
    resy&:=%maxy
    windowstyle ( 80 | 512 )// create black window
    windowtitle appname$
    window 0,0 - 0,0
    cls 0
    showcursor 0
    setwindowpos %hwnd=0,0 - resx&,resy&;-1
    settimer 1;waitinput;killtimer// fill %mousexy sysvars and store mousepos into statics
    mx&:=%mousex
    my&:=%mousey
    settimer 500

    whilenot ex&

        waitinput

        ifnot %wmtimer

            ex&+

        else

            case ((%mousex<mx&-5) or (%mousex>mx&+5) or (%mousey<my&-5)  or (%mousey>my&+5) ) : ex&+

        endif

    wend

    killtimer
    showcursor 1

endproc

proc _preview

    parameters h&

endproc

proc _options

    messagebox appname$+" "+appver$+" is without any options."
me$,16 endproc
salvo, iF.
 
10/07/05  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

2.454 Views

Untitledvor 0 min.
Findus05/15/14
lange-jens04/16/12
Julian Schmidt07/26/11
Rolf Koch03/23/11
More...

Themeninformationen

this Topic has 1 subscriber:

iF (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie