English
Forum

Small examples for use the Thread.Pcu

 
After 20 sec inaktivität exits itself the program selbstständig - if however in the Window agiert becomes catches the Countdown of in front on.
CompileMarkSeparation
declare die&
 $U thread.pcu = thread.
Set("Decimals",0)
windowstyle ( 512 | 8 )
window 160,120,640,480

whilenot %key=2

    thread.start 1,9  <-- die 9 steht für 5000ms, die 1 steht für Thread 1 von 4
    waitinput
    thread.stop 1
    die&=0

wend

end

proc thread.do

    parameters n&

    if n&=1  in N steht die ThreadNummer (1 von 4)

        add die&,5
        settext %hwnd,"Autoende in "+str$(20-die&)+" Sekunden."
        case die&=20 : sendmessage(%Hwnd,$10,0,0)  <--dem Waitinput wird die closeMessage geschickt und die Hauptschleife wird damit verlassen.

    endif

endproc

salvo, iF.
 
08/08/05  
 



Reelle local Mausposition spend:
CompileMarkSeparation
 $U thread.pcu =thread.
Declare gmx%,gmy%,gmp#,dlg&
windowstyle ( 512 | 8 )
cls
dlg&=createdialog(%hwnd,"",100,100,300,300)
Dim     gmp#,8

whilenot %key=2

    thread.start 1,1
    waitinput
    thread.stop 1

wend

dispose gmp#
destroywindow (dlg&)
end

proc thread.do

    parameters n&

    if n&=1

        clear gmp#
        external("user32","ClientToScreen",dlg&,gmp#)
        gmx%=long(gmp#,0)
        gmy%=long(gmp#,4)
        external("user32","GetCursorPos",gmp#)
        gmx%=long(gmp#,0)-gmx%
        gmy%=long(gmp#,4)-gmy%
        locate 1,1
        print gmx%,gmy%,"   "

    endif

endproc

salvo, iF.
 
08/11/05  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

1.876 Views

Untitledvor 0 min.
AndreasS12/07/18
Peter Max Müller11/26/17
iF02/14/11

Themeninformationen

this Topic has 2 subscriber:

unbekannt (1x)
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