English
Source / code snippets

Counter several Stopuhren counter

 
iF, Beitrag=54521, Zeitpunkt=19.10.2009
Fix hingepinselt
CompileMarkSeparation
CompileMarkSeparation
 $H windows.ph
DECIMALS 0
CLS
DECLARE TIMER&[]
DECLARE HDISP&[]
DECLARE HSTART&[]
DECLARE HPAUSE&[]
DECLARE HRESET&[]

WHILELOOP 20

    TIMER&[&LOOP]=0
    HDISP&[&LOOP]=(CONTROL("STATIC","Timer:"+STR$(&LOOP),$50000000,(20),(&LOOP*20),(400),(18),(%HWND),0,%HINSTANCE))
    HSTART&[&LOOP]=(CREATE("BUTTON",(%HWND),"Start",(450),(&LOOP*20),(50),(18)))
    HPAUSE&[&LOOP]=(CREATE("BUTTON",(%HWND),"Pause",(500),(&LOOP*20),(50),(18)))
    HRESET&[&LOOP]=(CREATE("BUTTON",(%HWND),"Reset",(550),(&LOOP*20),(50),(18)))

ENDWHILE

SUBCLASS %HWND,1
~setTimer(%HWND,222,100,0)

WHILE 1

    WAITINPUT

    WHILELOOP 20

        IF CLICKED(HSTART&[&LOOP])

            TIMER&[&LOOP]=&GETTICKCOUNT

        ENDIF

        IF CLICKED(HPAUSE&[&LOOP])

            TIMER&[&LOOP]=-TIMER&[&LOOP]

        ENDIF

        IF CLICKED(HRESET&[&LOOP])

            TIMER&[&LOOP]=0
            SETTEXT HDISP&[&LOOP],"0"

        ENDIF

    ENDWHILE

ENDWHILE

end

subclassproc

    IF %SMESSAGE=$0113

        IF &SWPARAM=222

            WHILELOOP 20

                IF TIMER&[&LOOP]>0

                    SETTEXT HDISP&[&LOOP],STR$(&GETTICKCOUNT-TIMER&[&LOOP])+"ms"

                ENDIF

            ENDWHILE

        ENDIF

    ENDIF

endproc

without Feinschliff. too jolly [...]  from [...]  .
 
10/19/09  
 



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

3.035 Views

Untitledvor 0 min.
Frank04/16/21
RudiB.03/30/20
Peter Max Müller11/26/17
Georg10/19/16
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