Français
Source/ Codesnippets

Interessantes Konzept montre

 

Jörg
Sellmeyer
[...] 

P.S.
peut-être sollte on doch den Poubelle la fois débaptiser dans ca & cela ou bien so. cela Effacer peux oui volontiers plus comment bisher gehandhabt volonté mais c'est doch quelque chose merkwürdig, une Beitrag, den on den Anderen pas vorenthalten voudrais im Poubelle trop plazieren.
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
16.05.2007  
 




Frank
Abbing
en supplément peux du den Stammtisch oui nutzen.
Hab deinen Fil dorthin déménagé.

hé, qui montre ist wirklich cool! Dürfte mais schwer umzusetzen son.
 
16.05.2007  
 




Jörg
Sellmeyer
Stimmt - den Stammtisch J'ai eu gar pas sur dem Schirm. J'ai pensé, là sollte aussi seulement profanes Zeug rein.

Besonders cool à qui montre finde je cet sanfte Andocken à qui prochain Zeiteineinheit. alors ne...aucune simples Klack - klack - klack mais plus son SSSSSSsscht
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
16.05.2007  
 




Frank
Abbing
Hab la fois une Anfang gemacht. qui Sekundenzeiger funktioniert Schonmal. qui mag, peux den Code volontiers plus ausbauen...
KompilierenMarqueSéparation
Declare sx&,sy&,text$,x&,y&,bereich#,count&
Declare x1&, y1&, x2&, y2&, StartAngle!, StopAngle!, CenX&, CenY&
Def GetSysColor(1) !USER32,GetSysColor
Def LoadIcon(2) !USER32,LoadIconA
Def ArcApi(9) !GDI32,Arc
Def @Deg2Rad(1) (@Pi() * (@!(1)-90)) / 180
SETTRUECOLOR 1
sx&=640
sy&=480
Windowstyle 26+512
Windowtitle Test...
Window %maxx,0-x&,y&
SendMessage(%hwnd,$80,1,LoadIcon(0,32517))    WM_SetIcon  Application Icon setzen
Cls 0
SetWindowPos %hwnd=(%maxx/2-(sx&/2)),(%maxy/2-(sy&/2))-sx&,sy&
TextColor 0, -1
Set(CharSet, 0)
UseFont ARIAL,20, 0, 0, 0, 0
x1& = 120
y1& = 20
x2& = 520
y2& = 420
CenX& = (x2& - x1&) / 2
CenY& = (y2& - y1&) / 2
StopAngle! = 359
StartAngle! = 0
count&=1
SetTimer 1000

While 1

    WaitInput
    Case %key=2:BREAK
    UsePen 0,24,@RGB(0,count&+30,60-count&+30)

    Whileloop 6

        ArcAPI(%hdc,x1&, y1&, x2&, y2&, Int(x1& + CenX& + (CenX& * @Cos(@Deg2Rad(-StopAngle!)))), Int(y1& + CenY& + (CenY& * @Sin(@Deg2Rad(-StopAngle!)))), Int(x1& + CenX& + (CenX& * @Cos(@Deg2Rad(-StartAngle!)))), Int(y1& + CenY& + (CenY& * @Sin(@Deg2Rad(-StartAngle!)))))
        Orientation StopAngle!*10
        UseFont ARIAL,24, 0, 0, 0, 0
        x&=count&
        Case x&=60:x&=0
        DrawText Int(x1& + CenX& + (CenX& * 1.07*@Cos(@Deg2Rad(-StopAngle!-6)))), Int(y1& + CenY& + (CenY& * 1.07*@Sin(@Deg2Rad(-StopAngle!-6)))), Str$(x&)
        StopAngle! = StopAngle!-1
        Sleep 16

    Wend

    Inc count&

    If count&>60

        count&=1
        UsePen 0,26,0
        ArcAPI(%hdc,x1&, y1&, x2&, y2&, 0,0,0,0)

    EndIf

Wend

ref='./../../funktionsreferenzen/XProfan/end/'>Fin
 
17.05.2007  
 




Sebastian
Sprenger
Hm, tja, là je selber aussi déjà la fois angefangen hab , seulement qui Vollständigkeit halber encore un Code de mir. SSSSSSsscht fehlt mais malheureusement.
KompilierenMarqueSéparation
declare polar#
def GetTextExtentPoint(4) !GDI32,GetTextExtentPoint32A

proc polarhand

    parameters x%,y%,r%,weight%,colors%,colore%,val%,max%
    declare s!,e!,x!,y!,r!,g!,b!
    val%=val% mod max%
    Einfärben
    r!=getrvalue(colors%)
    g!=getgvalue(colors%)
    b!=getbvalue(colors%)
    r!=r!+val%*(getrvalue(colore%)-r!)/max%
    g!=g!+val%*(getgvalue(colore%)-g!)/max%
    b!=b!+val%*(getbvalue(colore%)-b!)/max%
    usepen 0,weight%,rgb(r!,g!,b!)
    Ausrichten und malen
    s!=(val%/max%+.25)*pi()*2
    e!=pi()/2
    sub r%,weight% 2
    x!=x%-r%*cos(s!)
    y!=y%-r%*sin(s!)
    arc x%-r%,(y%-r%)-x%+r%,y%+r%;x!+1,y!;x%-r%*cos(e!),y%-r%*sin(e!)
    Beschriften
    orientation -val%/max%*3600
    usefont Arial,0,0,0,0,0
    textcolor 0,-1
    dim polar#,10
    char polar#,8=val%
    GetTextExtentPoint(%hdc,polar#+8,(val%>9)+1,polar#)
    s!=(val%/max%+.245)*pi()*2
    x!=x%-r%*cos(s!)-(weight%-long(polar#,0)2)*cos(s!)2
    y!=y%-r%*sin(s!)-(weight%-long(polar#,4)2)*sin(s!)2
    dispose polar#
    drawtext x!,y!,val%

endproc

proc polarclock

    parameters x%,y%,r%,weight%,space%,colorhs%,colorhe%,colorms%,colorme%,colorss%,colorse%
    polarhand x%,y%,r%,weight%,colorhs%,colorhe%,val(left$(time$(0),2)),12
    sub r%,weight%+space%
    polarhand x%,y%,r%,weight%,colorms%,colorme%,val(right$(time$(0),2)),60
    sub r%,weight%+space%
    polarhand x%,y%,r%,weight%,colorss%,colorse%,val(left$(time$(1),2)),60

endproc

declare a%
def min(2) if(&(1)<=&(2),&(1),&(2))
window 0,0-%maxx,%maxy
a%=min(width(%hwnd),height(%hwnd))
mcls a%,a%

while 1

    startpaint -1
    usepen 0,1,0
    usebrush 1,0
    rectangle 0,0-a%,a%
    polarclock a% 2,a% 2,a% 2,30,5,$0000C0,$C060FF,$00C000,$60FFC0,$C00000,$FFC060
    endpaint
    mcopybmp 0,0-a%,a%>0,0;0

endwhile

./../../funktionsreferenzen/XProfan/waitinput/'>waitinput
 
Profan² 7.0e, XProfan 9, 11.2a, FreeProfan32
Windows Vista Home Premium 32-Bit, 2.8 Ghz, 4 GB RAM
Windows Me, 1.8 Ghz, 256 MB RAM
17.05.2007  
 




Frank
Abbing
Hab meinen Code encore plus gesponnen. Mir comme il so déjà.
KompilierenMarqueSéparation
Declare sx&,sy&,text$,x&,y&,bereich#,seconds&,minutes&,hours&,z&,schlafen&
Declare x1&, y1&, x2&, y2&, StartAngle!, StopAngle!, CenX&, CenY&
Declare mx1&, my1&, mx2&, my2&, mStartAngle!, mStopAngle!, mCenX&, mCenY&,istmin&
Declare hx1&, hy1&, hx2&, hy2&, hStartAngle!, hStopAngle!, hCenX&, hCenY&,isthour&
Declare zusek&,zumin&,zuhour&
Def GetSysColor(1) !USER32,GetSysColor
Def LoadIcon(2) !USER32,LoadIconA
Def ArcApi(9) !GDI32,Arc
Def @Deg2Rad(1) (@Pi() * (@!(1)-90)) / 180
SETTRUECOLOR 1
sx&=496-%cyCaption
sy&=496
Windowstyle 26+512
Windowtitle Futuristische Uhr, http://frabbing.de
Window %maxx,0-x&,y&
SendMessage(%hwnd,$80,1,LoadIcon(0,32517))    WM_SetIcon  Application Icon setzen
Cls 0
SetWindowPos %hwnd=(%maxx/2-(sx&/2)),(%maxy/2-(sy&/2))-sx&,sy&
TextColor 0, -1
Set(CharSet, 0)
UseFont ARIAL,20, 0, 0, 0, 0
seconds&=val(left$(time$(1),2))
minutes&=val(right$(time$(0),2))
hours&=val(left$(time$(0),2))
Case hours&>=12:hours&=hours&-12
x1& = 80
y1& = 80
x2& = 300+x1&
y2& = 300+y1&
CenX& = (x2& - x1&) / 2
CenY& = (y2& - y1&) / 2
StopAngle! = 359.5 360-(seconds&*6)
StartAngle! = 0
mx1& = 50
my1& = 50
mx2& = 360+mx1&
my2& = 360+my1&
mCenX& = (mx2& - mx1&) / 2
mCenY& = (my2& - my1&) / 2
mStopAngle! = 359.5 360-(minutes&*6)
mStartAngle! = 0
hx1& = 20
hy1& = 20
hx2& = 420+hx1&
hy2& = 420+hy1&
hCenX& = (hx2& - hx1&) / 2
hCenY& = (hy2& - hy1&) / 2
hStopAngle! = 359.5 360-(hours&*30)
hStartAngle! = 0
zusek&=seconds&*6
Case zusek&=0:zusek&=3
zumin&=minutes&*6
Case zumin&=0:zumin&=3
zuhour&=hours&*30
Case zuhour&=0:zuhour&=3
schlafen&=1
SetTimer 50

While 1

    WaitInput
    Case %key=2:BREAK

    While 1

        If zusek&>0

            UsePen 0,28,0
            ArcAPI(%hdc2,x1&, y1&, x2&, y2&, 0,0,0,0)
            UsePen 0,26,@RGB(180-(StopAngle!/2),0,StopAngle!/2)
            ArcAPI(%hdc2,x1&, y1&, x2&, y2&, Int(x1& + CenX& + (CenX& * @Cos(@Deg2Rad(-StopAngle!)))), Int(y1& + CenY& + (CenY& * @Sin(@Deg2Rad(-StopAngle!)))), Int(x1& + CenX& + (CenX& * @Cos(@Deg2Rad(-StartAngle!)))), Int(y1& + CenY& + (CenY& * @Sin(@Deg2Rad(-StartAngle!)))))
            TextColor 0, -1
            Set(CharSet, 0)
            Orientation StopAngle!*10
            UseFont ARIAL,20, 0, 1, 0, 0
            x&=seconds&
            DrawText Int(x1& + CenX& + (CenX& * 1.09*@Cos(@Deg2Rad(-StopAngle!-6)))), Int(y1& + CenY& + (CenY& * 1.09*@Sin(@Deg2Rad(-StopAngle!-6)))), Str$(x&)
            StopAngle!=StopAngle!-1
            zusek&=zusek&-1

        EndIf

        If zumin&>0

            UsePen 0,28,0
            ArcAPI(%hdc2,mx1&, my1&, mx2&, my2&, 0,0,0,0)
            UsePen 0,26,@RGB(180-(mStopAngle!/2),0,mStopAngle!/2)
            ArcAPI(%hdc2,mx1&, my1&, mx2&, my2&, Int(mx1& + mCenX& + (mCenX& * @Cos(@Deg2Rad(-mStopAngle!)))), Int(my1& + mCenY& + (mCenY& * @Sin(@Deg2Rad(-mStopAngle!)))), Int(mx1& + mCenX& + (mCenX& * @Cos(@Deg2Rad(-mStartAngle!)))), Int(my1& + mCenY& + (mCenY& * @Sin(@Deg2Rad(-mStartAngle!)))))
            TextColor 0, -1
            Set(CharSet, 0)
            Orientation mStopAngle!*10
            UseFont ARIAL,20, 0, 1, 0, 0
            x&=minutes&
            DrawText Int(mx1& + mCenX& + (mCenX& * 1.07*@Cos(@Deg2Rad(-mStopAngle!-6)))), Int(my1& + mCenY& + (mCenY& * 1.07*@Sin(@Deg2Rad(-mStopAngle!-6)))), Str$(x&)
            mStopAngle!=mStopAngle!-1
            zumin&=zumin&-1

        EndIf

        If zuhour&>0

            UsePen 0,28,0
            ArcAPI(%hdc2,hx1&, hy1&, hx2&, hy2&, 0,0,0,0)
            UsePen 0,26,@RGB(180-(hStopAngle!/2),0,hStopAngle!/2)
            ArcAPI(%hdc2,hx1&, hy1&, hx2&, hy2&, Int(hx1& + hCenX& + (hCenX& * @Cos(@Deg2Rad(-hStopAngle!)))), Int(hy1& + hCenY& + (hCenY& * @Sin(@Deg2Rad(-hStopAngle!)))), Int(hx1& + hCenX& + (hCenX& * @Cos(@Deg2Rad(-hStartAngle!)))), Int(hy1& + hCenY& + (hCenY& * @Sin(@Deg2Rad(-hStartAngle!)))))
            TextColor 0, -1
            Set(CharSet, 0)
            Orientation hStopAngle!*10
            UseFont ARIAL,20, 0, 1, 0, 0
            x&=val(left$(time$(0),2))
            DrawText Int(hx1& + hCenX& + (hCenX& * 1.05*@Cos(@Deg2Rad(-hStopAngle!-6)))), Int(hy1& + hCenY& + (hCenY& * 1.05*@Sin(@Deg2Rad(-hStopAngle!-6)))), Str$(x&)
            hStopAngle!=hStopAngle!-1
            zuhour&=zuhour&-1

        EndIf

        If ((zusek&<=0) and (zumin&<=0) and (zuhour&<=0))

            BREAK

        EndIf

        Repaint

        If schlafen&

            Sleep 2

        Else

            Sleep 16

        EndIf

    Wend

    schlafen&=0
    x&=val(left$(time$(1),2))

    If x&<>seconds&

        seconds&=seconds&+1
        zusek&=6

        If seconds&>=60

            zusek&=3
            seconds&=0
            StopAngle! = 359.5 360-(seconds&*6)

        EndIf

    EndIf

    x&=val(right$(time$(0),2))

    If x&<>minutes&

        minutes&=minutes&+1
        zumin&=6

        If minutes&>=60

            zumin&=3
            minutes&=0
            mStopAngle! = 359.5 360-(minutes&*6)

        EndIf

    EndIf

    x&=val(left$(time$(0),2))
    Case x&>=12:x&=x&-12

    If hours&<>x&

        hours&=hours&+1
        zuhour&=30

        If hours&>=12

            zuhour&=3
            hours&=0
            hStopAngle! = 359.5 360-(hours&*30)

        EndIf

    EndIf

    Repaint

Wend

Fin
 
17.05.2007  
 




Hubert
Binnewies
Sieht vraie super aus... et si on cela Set(CharSet, 0) weglässt ensuite fonctionne es sogar sous XProfan 9.1

Hubert
 
WinXP Prof, XProfan 9.1 Newbie

Ein kluger Kopf sagte mal:
"Nach dem derzeitigen Stand der Technik ist es unmöglich Programme zu schreiben, die fehlerfrei laufen!"
18.05.2007  
 




Jörg
Sellmeyer
Wow! vraie impressionnante! venez total bien.
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
18.05.2007  
 




Frank
Abbing
Hab cela la fenêtre encore dans qui Grösse veränderbar gemacht et quelque chose Antialiasing incorporé:
KompilierenMarqueSéparation
Declare sx&,sy&,text$,x&,y&,bereich#,seconds&,minutes&,hours&,z&,schlafen&,fenx&,feny&,ox&,oy&,glob&
Declare x1&, y1&, x2&, y2&, StartAngle!, StopAngle!, CenX&, CenY&
Declare mx1&, my1&, mx2&, my2&, mStartAngle!, mStopAngle!, mCenX&, mCenY&,istmin&
Declare hx1&, hy1&, hx2&, hy2&, hStartAngle!, hStopAngle!, hCenX&, hCenY&,isthour&
Declare zusek&,zumin&,zuhour&
Def GetSysColor(1) !USER32,GetSysColor
Def LoadIcon(2) !USER32,LoadIconA
Def ArcApi(9) !GDI32,Arc
Def @Deg2Rad(1) (@Pi() * (@!(1)-90)) / 180
Def @Deg2Rad2(1) (@Pi() * (@!(1)-98+((fenx&+feny&)/2)/180)) / 180
SETTRUECOLOR 1
sx&=496-%cyCaption
sy&=496
Windowstyle 31+512
Windowtitle Futuristische Uhr, http://frabbing.de
Window %maxx,0-x&,y&
SendMessage(%hwnd,$80,1,LoadIcon(0,32517))    WM_SetIcon  Application Icon setzen
Cls 0
SetWindowPos %hwnd=(%maxx/2-(sx&/2)),(%maxy/2-(sy&/2))-sx&,sy&
TextColor 0, -1
Set(CharSet, 0)
UseFont ARIAL,20, 0, 0, 0, 0
seconds&=val(left$(time$(1),2))
minutes&=val(right$(time$(0),2))
hours&=val(left$(time$(0),2))
Case hours&>=12:hours&=hours&-12
fenx&=%WinRight-%WinLeft
feny&=%WinBottom-%WinTop-%cyCaption
ox&=fenx&
oy&=feny&
x1& = 80
y1& = 80
x2& = fenx&-170+x1&
y2& = feny&-170+y1&
CenX& = (x2& - x1&) / 2
CenY& = (y2& - y1&) / 2
StopAngle! = 359.5 360-(seconds&*6)
StartAngle! = 0
mx1& = 50
my1& = 50
mx2& = fenx&-110+mx1&
my2& = feny&-110+my1&
mCenX& = (mx2& - mx1&) / 2
mCenY& = (my2& - my1&) / 2
mStopAngle! = 359.5 360-(minutes&*6)
mStartAngle! = 0
hx1& = 20
hy1& = 20
hx2& = fenx&-50+hx1&
hy2& = feny&-50+hy1&
hCenX& = (hx2& - hx1&) / 2
hCenY& = (hy2& - hy1&) / 2
hStopAngle! = 359.5 360-(hours&*30)
hStartAngle! = 0
zusek&=seconds&*6
Case zusek&=0:zusek&=3
zumin&=minutes&*6
Case zumin&=0:zumin&=3
zuhour&=hours&*30
Case zuhour&=0:zuhour&=3
schlafen&=1
SetTimer 50

While 1

    WaitInput
    Case %key=2:BREAK

    While 1

        If ((zusek&>0) or (glob&=1))

            UsePen 0,28,0
            ArcAPI(%hdc2,x1&, y1&, x2&, y2&, 0,0,0,0)
            UsePen 0,26,RGB((135-(StopAngle!/2)/1.5),0,(StopAngle!/2)/1.5)
            ArcAPI(%hdc2,x1&, y1&, x2&, y2&, Int(x1& + CenX& + (CenX& * @Cos(@Deg2Rad(-StopAngle!)))), Int(y1& + CenY& + (CenY& * @Sin(@Deg2Rad(-StopAngle!)))), Int(x1& + CenX& + (CenX& * @Cos(@Deg2Rad(-StartAngle!)))), Int(y1& + CenY& + (CenY& * @Sin(@Deg2Rad(-StartAngle!)))))
            UsePen 0,23,RGB(180-(StopAngle!/2),0,StopAngle!/2)
            ArcAPI(%hdc2,x1&, y1&, x2&, y2&, Int(x1& + CenX& + (CenX& * @Cos(@Deg2Rad(-StopAngle!)))), Int(y1& + CenY& + (CenY& * @Sin(@Deg2Rad(-StopAngle!)))), Int(x1& + CenX& + (CenX& * @Cos(@Deg2Rad(-StartAngle!)))), Int(y1& + CenY& + (CenY& * @Sin(@Deg2Rad(-StartAngle!)))))
            TextColor 0, -1
            Orientation StopAngle!*10
            UseFont ARIAL,20, 0, 1, 0, 0
            x&=seconds&
            DrawText Int(x1& + CenX& +(((x2& - x1&+24) / 2)*@Cos(@Deg2Rad2(-StopAngle!)))), Int(y1& + CenY& +(((y2& - y1&+24) / 2) *@Sin(@Deg2Rad2(-StopAngle!)))), Str$(x&)

            If glob&<>1

                StopAngle!=StopAngle!-1
                zusek&=zusek&-1

            EndIf

        EndIf

        If ((zumin&>0) or (glob&=1))

            UsePen 0,28,0
            ArcAPI(%hdc2,mx1&, my1&, mx2&, my2&, 0,0,0,0)
            UsePen 0,26,RGB((135-(mStopAngle!/2)/1.5),0,(mStopAngle!/2)/1.5)
            ArcAPI(%hdc2,mx1&, my1&, mx2&, my2&, Int(mx1& + mCenX& + (mCenX& * @Cos(@Deg2Rad(-mStopAngle!)))), Int(my1& + mCenY& + (mCenY& * @Sin(@Deg2Rad(-mStopAngle!)))), Int(mx1& + mCenX& + (mCenX& * @Cos(@Deg2Rad(-mStartAngle!)))), Int(my1& + mCenY& + (mCenY& * @Sin(@Deg2Rad(-mStartAngle!)))))
            UsePen 0,23,@RGB(180-(mStopAngle!/2),0,mStopAngle!/2)
            ArcAPI(%hdc2,mx1&, my1&, mx2&, my2&, Int(mx1& + mCenX& + (mCenX& * @Cos(@Deg2Rad(-mStopAngle!)))), Int(my1& + mCenY& + (mCenY& * @Sin(@Deg2Rad(-mStopAngle!)))), Int(mx1& + mCenX& + (mCenX& * @Cos(@Deg2Rad(-mStartAngle!)))), Int(my1& + mCenY& + (mCenY& * @Sin(@Deg2Rad(-mStartAngle!)))))
            TextColor 0, -1
            Orientation mStopAngle!*10
            UseFont ARIAL,20, 0, 1, 0, 0
            x&=minutes&
            DrawText Int(mx1& + mCenX& + (((mx2& - mx1&+24) / 2) *@Cos(@Deg2Rad2(-mStopAngle!)))), Int(my1& + mCenY& + (((my2& - my1&+24) / 2) * @Sin(@Deg2Rad2(-mStopAngle!)))), Str$(x&)

            If glob&<>1

                mStopAngle!=mStopAngle!-1
                zumin&=zumin&-1

            EndIf

        EndIf

        If ((zuhour&>0 ) or (glob&=1))

            UsePen 0,28,0
            ArcAPI(%hdc2,hx1&, hy1&, hx2&, hy2&, 0,0,0,0)
            UsePen 0,26,RGB((135-(hStopAngle!/2)/1.5),0,(hStopAngle!/2)/1.5)
            ArcAPI(%hdc2,hx1&, hy1&, hx2&, hy2&, Int(hx1& + hCenX& + (hCenX& * @Cos(@Deg2Rad(-hStopAngle!)))), Int(hy1& + hCenY& + (hCenY& * @Sin(@Deg2Rad(-hStopAngle!)))), Int(hx1& + hCenX& + (hCenX& * @Cos(@Deg2Rad(-hStartAngle!)))), Int(hy1& + hCenY& + (hCenY& * @Sin(@Deg2Rad(-hStartAngle!)))))
            UsePen 0,23,@RGB(180-(hStopAngle!/2),0,hStopAngle!/2)
            ArcAPI(%hdc2,hx1&, hy1&, hx2&, hy2&, Int(hx1& + hCenX& + (hCenX& * @Cos(@Deg2Rad(-hStopAngle!)))), Int(hy1& + hCenY& + (hCenY& * @Sin(@Deg2Rad(-hStopAngle!)))), Int(hx1& + hCenX& + (hCenX& * @Cos(@Deg2Rad(-hStartAngle!)))), Int(hy1& + hCenY& + (hCenY& * @Sin(@Deg2Rad(-hStartAngle!)))))
            TextColor 0, -1
            Orientation hStopAngle!*10
            UseFont ARIAL,20, 0, 1, 0, 0
            x&=val(left$(time$(0),2))
            DrawText Int(hx1& + hCenX& + (((hx2& - hx1&+24) / 2) *@Cos(@Deg2Rad2(-hStopAngle!)))), Int(hy1& + hCenY& + (((hy2& - hy1&+24) / 2) * @Sin(@Deg2Rad2(-hStopAngle!)))), Str$(x&)

            If glob&<>1

                hStopAngle!=hStopAngle!-1
                zuhour&=zuhour&-1

            EndIf

        EndIf

        glob&=0

        If ((zusek&<=0) and (zumin&<=0) and (zuhour&<=0))

            BREAK

        EndIf

        Repaint

        If schlafen&

            Sleep 2

        Else

            Sleep 16

        EndIf

    Wend

    schlafen&=0
    x&=val(left$(time$(1),2))

    If x&<>seconds&

        seconds&=seconds&+1
        zusek&=6

        If seconds&>=60

            zusek&=3
            seconds&=0
            StopAngle! = 359.5 360-(seconds&*6)

        EndIf

    EndIf

    x&=val(right$(time$(0),2))

    If x&<>minutes&

        minutes&=minutes&+1
        zumin&=6

        If minutes&>=60

            zumin&=3
            minutes&=0
            mStopAngle! = 359.5 360-(minutes&*6)

        EndIf

    EndIf

    x&=val(left$(time$(0),2))
    Case x&>=12:x&=x&-12

    If hours&<>x&

        hours&=hours&+1
        zuhour&=30

        If hours&>=12

            zuhour&=3
            hours&=0
            hStopAngle! = 359.5 360-(hours&*30)

        EndIf

    EndIf

    Repaint
    fenx&=%WinRight-%WinLeft
    feny&=%WinBottom-%WinTop-%cyCaption

    If ((ox&<>fenx&) or (oy&<>feny&))

        ox&=fenx&
        oy&=feny&
        x2& = fenx&-170+x1&
        y2& = feny&-170+y1&
        CenX& = (x2& - x1&) / 2
        CenY& = (y2& - y1&) / 2
        mx2& = fenx&-110+mx1&
        my2& = feny&-110+my1&
        mCenX& = (mx2& - mx1&) / 2
        mCenY& = (my2& - my1&) / 2
        hx2& = fenx&-50+hx1&
        hy2& = feny&-50+hy1&
        hCenX& = (hx2& - hx1&) / 2
        hCenY& = (hy2& - hy1&) / 2
        glob&=1
        Cls
class=s2>0 Endif Wend Fin
 
18.05.2007  
 




Jörg
Sellmeyer
c'est so regrettable, dass qui Forumssoftware qui Codes alle so zerschossen hat

seul cette Fil contient so belle Schätze.

ici la fois qui reparierter Code de Sebastian:
 $I profalt.inc
declare polar#
def GetTextExtentPoint(4) "!GDI32","GetTextExtentPoint32A"

proc polarhand

    parameters x%,y%,r%,weight%,colors%,colore%,val%,max%
    declare s!,e!,x!,y!,r!,g!,b!
    val%=val% mod max%
    'Einfärben
    r!=getrvalue(colors%)
    g!=getgvalue(colors%)
    b!=getbvalue(colors%)
    r!=r!+val%*(getrvalue(colore%)-r!)/max%
    g!=g!+val%*(getgvalue(colore%)-g!)/max%
    b!=b!+val%*(getbvalue(colore%)-b!)/max%
    usepen 0,weight%,rgb(r!,g!,b!)
    'Ausrichten et malen
    s!=(val%/max%+.25)*pi()*2
    e!=pi()/2
    sub r%,weight% \ 2
    x!=x%-r%*cos(s!)
    y!=Y%-r%*sin(s!)
    arc x%-r%,(Y%-r%)-x%+r%,y%+r%;x!+1,y!;x%-r%*cos(e!),y%-r%*sin(e!)
    'Beschriften
    orientation -val%/max%*3600
    usefont Arial,0,0,0,0,0
    textcolor 0,-1
    dim polar#,10
    char polar#,8=val%
    GetTextExtentPoint(%hdc,polar#+8,(val%>9)+1,polar#)
    s!=(val%/max%+.245)*pi()*2
    x!=x%-r%*cos(s!)-(weight%-long(polar#,0)2)*cos(s!)2
    y!=Y%-r%*sin(s!)-(weight%-long(polar#,4)2)*sin(s!)2
    dispose polar#
    drawtext x!,y!,val%

endproc

proc polarclock

    parameters x%,y%,r%,weight%,space%,colorhs%,colorhe%,colorms%,colorme%,colorss%,colorse%
    polarhand x%,y%,r%,weight%,colorhs%,colorhe%,val(left$(time$(0),2)),12
    sub r%,weight%+space%
    polarhand x%,y%,r%,weight%,colorms%,colorme%,val(right$(time$(0),2)),60
    sub r%,weight%+space%
    polarhand x%,y%,r%,weight%,colorss%,colorse%,val(left$(time$(1),2)),60

endproc

declare a%
def min(2) si(&(1)<=&(2),&(1),&(2))
window 0,0-%maxx,%maxy
a%=min(width(%hwnd),height(%hwnd))
mcls a%,a%

tandis que 1

    startpaint -1
    usepen 0,1,0
    usebrush 1,0
    rectangle 0,0-a%,a%
    polarclock a%\2,a%\2,a%\2,30,5,$0000C0,$C060FF,$00C000,$60FFC0,$C00000,$FFC060
    endpaint
    mcopybmp 0,0-a%,a%>0,0;0

endwhile

waitinput
 
XProfan X3
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
03.06.2018  
 




Jörg
Sellmeyer
[OFFTOPIC]très regrettable, iF. Wieviele données tomber car chez so ner Komplettsicherung à? Heutzutage écoutes es doch wohl à peine encore une rôle, comment longtemps on une Sicherung aufhebt. chez den gigantischen Plattengrößen et quand même très niedrigen Preisen. si beim prochain la fois so une Commutateur venez, sag Bescheid et je schick dir ne Festplatte [/OFFTOPIC]


aussi Franks montre fonctionne wieder. Allerdings haut cela avec den Farben pas hin.
Wahrscheinlich pourrait on sich vieles qui Rechnerei sparen, là oui qui l'heure eigentlich déjà qui perfekten Gradzahlen liefert. on devrait qui 0-59 toujours seulement sur 0-360° umrechnen. peut-être trau je mich là bientôt aussi la fois ran.

mais qui Funktionsungetüme sommes déjà ne Wucht!
 $I profalt.inc
Déclarer sx&,sy&,text$,x&,y&,bereich#,seconds&,minutes&,hours&,z&,schlafen&,fenx&,feny&,ox&,oy&,glob&
Déclarer x1&, y1&, x2&, y2&, StartAngle!, StopAngle!, CenX&, CenY&
Déclarer mx1&, my1&, mx2&, my2&, mStartAngle!, mStopAngle!, mCenX&, mCenY&,istmin&
Déclarer hx1&, hy1&, hx2&, hy2&, hStartAngle!, hStopAngle!, hCenX&, hCenY&,isthour&
Déclarer zusek&,zumin&,zuhour&
Def GetSysColor(1) "!USER32","GetSysColor"
Def LoadIcon(2) "!USER32","LoadIconA"
Def ArcApi(9) "!GDI32","Arc"
Def @Deg2roue(1) (@Pi() * (@!(1)-90)) / 180
Def @Deg2roue2(1) (@Pi() * (@!(1)-98+((fenx&+feny&)/2)/180)) / 180
'SETTRUECOLOR 1
sx&=496-%cyCaption
sy&=496
Windowstyle 31+512
Windowtitle "Futuristische montre, https://frabbing.de"
Fenêtre %maxx,0-x&,y&
SendMessage(%hwnd,$80,1,LoadIcon(0,32517))'    WM_SetIcon  Application Icon mettons
Cls 0
SetWindowPos %hwnd=(%maxx/2-(sx&/2)),(%maxy/2-(sy&/2))-sx&,sy&
Couleur du texte 0, -1
'ici hab je la fois ne autre Textfarbe pris. Frank hatte irgenwie cela Prinzip ostfriesische Landesflagge verwendet:
'weißer Adler sur weißem Grund...
Couleur du texte RGB($FF,0,0), -1
Set("CharSet", 0)
UseFont "ARIAL",20, 0, 0, 0, 0
seconds&=val(left$(time$(1),2))
minutes&=val(right$(time$(0),2))
hours&=val(left$(time$(0),2))
Cas hours&>=12:hours&=hours&-12
fenx&=%WinRight-%WinLeft
feny&=%WinBottom-%WinTop-%cyCaption
ox&=fenx&
oy&=feny&
x1& = 80
y1& = 80
x2& = fenx&-170+x1&
y2& = feny&-170+y1&
CenX& = (x2& - x1&) / 2
CenY& = (y2& - y1&) / 2
StopAngle! = 359.5 / 360-(seconds&*6)
StartAngle! = 0
mx1& = 50
my1& = 50
mx2& = fenx&-110+mx1&
my2& = feny&-110+my1&
mCenX& = (mx2& - mx1&) / 2
mCenY& = (my2& - my1&) / 2
mStopAngle! = 359.5 / 360-(minutes&*6)
mStartAngle! = 0
hx1& = 20
hy1& = 20
hx2& = fenx&-50+hx1&
hy2& = feny&-50+hy1&
hCenX& = (hx2& - hx1&) / 2
hCenY& = (hy2& - hy1&) / 2
hStopAngle! = 359.5 / 360-(hours&*30)
hStartAngle! = 0
zusek&=seconds&*6
Cas zusek&=0:zusek&=3
zumin&=minutes&*6
Cas zumin&=0:zumin&=3
zuhour&=hours&*30
Cas zuhour&=0:zuhour&=3
schlafen&=1
SetTimer 50

Tandis que 1

    WaitInput
    Cas %clé=2:BREAK

    Tandis que 1

        Si ((zusek&>0) or (glob&=1))

            USEP 0,28,0
            ArcAPI(%hdc2,x1&, y1&, x2&, y2&, 0,0,0,0)
            USEP 0,26,RGB((135-(StopAngle!/2)/1.5),0,(StopAngle!/2)/1.5)
            ArcAPI(%hdc2,x1&, y1&, x2&, y2&, Int(x1& + CenX& + (CenX& * @Cos(@Deg2roue(-StopAngle!)))),\
            Int(y1& + CenY& + (CenY& * @Sin(@Deg2roue(-StopAngle!)))), Int(x1& + CenX& + (CenX& * @Cos(@Deg2roue(-StartAngle!)))), Int(y1& + CenY& + (CenY& * @Sin(@Deg2roue(-StartAngle!)))))
            USEP 0,23,RGB(180-(StopAngle!/2),0,StopAngle!/2)
            ArcAPI(%hdc2,x1&, y1&, x2&, y2&, Int(x1& + CenX& + (CenX& * @Cos(@Deg2roue(-StopAngle!)))), Int(y1& + CenY& + (CenY& * @Sin(@Deg2roue(-StopAngle!)))),\
            Int(x1& + CenX& + (CenX& * @Cos(@Deg2roue(-StartAngle!)))), Int(y1& + CenY& + (CenY& * @Sin(@Deg2roue(-StartAngle!)))))
            'Alle Couleur du texte 0,-1 hab je ab ici auskommentiert et ensuite sieht on zumindest, quoi passer soll
            'Couleur du texte 0, -1
            Orientation StopAngle!*10
            UseFont "ARIAL",20, 0, 1, 0, 0
            x&=seconds&
            DrawText Int(x1& + CenX& +(((x2& - x1&+24) / 2)*@Cos(@Deg2roue2(-StopAngle!)))), Int(y1& + CenY& +(((y2& - y1&+24) / 2) *@Sin(@Deg2roue2(-StopAngle!)))), Str$(x&)

            Si glob&<>1

                StopAngle!=StopAngle!-1
                zusek&=zusek&-1

            EndIf

        EndIf

        Si ((zumin&>0) or (glob&=1))

            USEP 0,28,0
            ArcAPI(%hdc2,mx1&, my1&, mx2&, my2&, 0,0,0,0)
            USEP 0,26,RGB((135-(mStopAngle!/2)/1.5),0,(mStopAngle!/2)/1.5)
            ArcAPI(%hdc2,mx1&, my1&, mx2&, my2&, Int(mx1& + mCenX& + (mCenX& * @Cos(@Deg2roue(-mStopAngle!)))), Int(my1& + mCenY& + (mCenY& * @Sin(@Deg2roue(-mStopAngle!)))), Int(mx1& + mCenX& + (mCenX& * @Cos(@Deg2roue(-mStartAngle!)))), Int(my1& + mCenY& + (mCenY& * @Sin(@Deg2roue(-mStartAngle!)))))
            USEP 0,23,@RGB(180-(mStopAngle!/2),0,mStopAngle!/2)
            ArcAPI(%hdc2,mx1&, my1&, mx2&, my2&, Int(mx1& + mCenX& + (mCenX& * @Cos(@Deg2roue(-mStopAngle!)))), Int(my1& + mCenY& + (mCenY& * @Sin(@Deg2roue(-mStopAngle!)))), Int(mx1& + mCenX& + (mCenX& * @Cos(@Deg2roue(-mStartAngle!)))), Int(my1& + mCenY& + (mCenY& * @Sin(@Deg2roue(-mStartAngle!)))))
            'Couleur du texte 0, -1
            Orientation mStopAngle!*10
            UseFont "ARIAL",20, 0, 1, 0, 0
            x&=minutes&
            DrawText Int(mx1& + mCenX& + (((mx2& - mx1&+24) / 2) *@Cos(@Deg2roue2(-mStopAngle!)))), Int(my1& + mCenY& + (((my2& - my1&+24) / 2) * @Sin(@Deg2roue2(-mStopAngle!)))), Str$(x&)

            Si glob&<>1

                mStopAngle!=mStopAngle!-1
                zumin&=zumin&-1

            EndIf

        EndIf

        Si ((zuhour&>0 ) or (glob&=1))

            USEP 0,28,0
            ArcAPI(%hdc2,hx1&, hy1&, hx2&, hy2&, 0,0,0,0)
            USEP 0,26,RGB((135-(hStopAngle!/2)/1.5),0,(hStopAngle!/2)/1.5)
            ArcAPI(%hdc2,hx1&, hy1&, hx2&, hy2&, Int(hx1& + hCenX& + (hCenX& * @Cos(@Deg2roue(-hStopAngle!)))), Int(hy1& + hCenY& + (hCenY& * @Sin(@Deg2roue(-hStopAngle!)))), Int(hx1& + hCenX& + (hCenX& * @Cos(@Deg2roue(-hStartAngle!)))), Int(hy1& + hCenY& + (hCenY& * @Sin(@Deg2roue(-hStartAngle!)))))
            USEP 0,23,@RGB(180-(hStopAngle!/2),0,hStopAngle!/2)
            ArcAPI(%hdc2,hx1&, hy1&, hx2&, hy2&, Int(hx1& + hCenX& + (hCenX& * @Cos(@Deg2roue(-hStopAngle!)))), Int(hy1& + hCenY& + (hCenY& * @Sin(@Deg2roue(-hStopAngle!)))), Int(hx1& + hCenX& + (hCenX& * @Cos(@Deg2roue(-hStartAngle!)))), Int(hy1& + hCenY& + (hCenY& * @Sin(@Deg2roue(-hStartAngle!)))))
            'Couleur du texte 0, -1
            Orientation hStopAngle!*10
            UseFont "ARIAL",20, 0, 1, 0, 0
            x&=val(left$(time$(0),2))
            DrawText Int(hx1& + hCenX& + (((hx2& - hx1&+24) / 2) *@Cos(@Deg2roue2(-hStopAngle!)))), Int(hy1& + hCenY& + (((hy2& - hy1&+24) / 2) * @Sin(@Deg2roue2(-hStopAngle!)))), Str$(x&)

            Si glob&<>1

                hStopAngle!=hStopAngle!-1
                zuhour&=zuhour&-1

            EndIf

        EndIf

        glob&=0

        Si ((zusek&<=0) and (zumin&<=0) and (zuhour&<=0))

            BREAK

        EndIf

        Repaint

        Si schlafen&

            Sleep 2

        D'autre

            Sleep 16

        EndIf

    Wend

    schlafen&=0
    x&=val(left$(time$(1),2))

    Si x&<>seconds&

        seconds&=seconds&+1
        zusek&=6

        Si seconds&>=60

            zusek&=3
            seconds&=0
            StopAngle! = 359.5 / 360-(seconds&*6)

        EndIf

    EndIf

    x&=val(right$(time$(0),2))

    Si x&<>minutes&

        minutes&=minutes&+1
        zumin&=6

        Si minutes&>=60

            zumin&=3
            minutes&=0
            mStopAngle! = 359.5 / 360-(minutes&*6)

        EndIf

    EndIf

    x&=val(left$(time$(0),2))
    Cas x&>=12:x&=x&-12

    Si hours&<>x&

        hours&=hours&+1
        zuhour&=30

        Si hours&>=12

            zuhour&=3
            hours&=0
            hStopAngle! = 359.5 / 360-(hours&*30)

        EndIf

    EndIf

    Repaint
    fenx&=%WinRight-%WinLeft
    feny&=%WinBottom-%WinTop-%cyCaption

    Si ((ox&<>fenx&) or (oy&<>feny&))

        ox&=fenx&
        oy&=feny&
        x2& = fenx&-170+x1&
        y2& = feny&-170+y1&
        CenX& = (x2& - x1&) / 2
        CenY& = (y2& - y1&) / 2
        mx2& = fenx&-110+mx1&
        my2& = feny&-110+my1&
        mCenX& = (mx2& - mx1&) / 2
        mCenY& = (my2& - my1&) / 2
        hx2& = fenx&-50+hx1&
        hy2& = feny&-50+hy1&
        hCenX& = (hx2& - hx1&) / 2
        hCenY& = (hy2& - hy1&) / 2
        glob&=1
        Cls 0

    Endif

Wend

Fin
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
03.06.2018  
 




Jörg
Sellmeyer
dans diesem Zusammenhang c'est moi la fois chez Wikipedia une Binäruhr  [...]  untergekommen et je dachte mir: cela veux je avons.
Et voilá...
 $H windows.ph
Randomiser
Déclarer Hours%,Minutes%,Seconds%
Déclarer x%,y%,bottom%
Déclarer SecOn&[],SecOff&[],MaxIndexSec%
Déclarer MinOn&[],MinOff&[],MaxIndexMin%
Déclarer HoursOn&[],HoursOff&[],MaxIndexHours%
Utilisateur Messages $10
Var hFont& = ~GetStockObject(11)

Proc GetTimeValues

    Seconds% = dt("getsec",!now)
    Minutes% = dt("getmin",!now)
    Hours% = dt("gethour",!now)

ENDPROC

Proc ShowTime

    WhileLoop 0,MaxIndexSec%

        ShowWindow(SecOn&[&Boucle], testbit(Seconds%,&loop))

    Wend

    WhileLoop 0,MaxIndexMin%

        ShowWindow(MinOn&[&Boucle], testbit(Minutes%,&loop))

    Wend

    WhileLoop 0,MaxIndexHours%

        ShowWindow(HoursOn&[&Boucle], testbit(Hours%,&loop))

    Wend

ENDPROC

Fenêtre Style %11010
Titre de la fenêtre "Binäruhr pour gens qui %10 Augen avons."
Fenêtre 600,400
SetDialogFont hFont&
GetTimeValues
'Cls RGB((Hours% * 10.66) Mod $FF,$FF - (Minutes% * 4.25),(Seconds% * 4.25))
x% = 330
bottom% = 140
y% = bottom%
'Slots pour Sekunden:

WhileLoop 0,6

    SecOff&[&Boucle] = @Créer("Icon",%hwnd,"Knopf2",x%,40 + y%)
    SecOn&[&Boucle] = @Créer("Icon",SecOff&[&Boucle],"Knopf1",0,0)

    Si &Boucle = 3

        y% = bottom%
        Décembre x%,36

    D'autre

        Décembre y% ,34

    EndIf

    ShowWindow(SecOn&[&Boucle],0)

Wend

MaxIndexSec% = SizeOf(SecOn&[]) - 1
Décembre x%, 10 + 34
y% = bottom%
'Slots pour Minuten:

WhileLoop 0,6

    MinOff&[&Boucle] = @Créer("Icon",%hwnd,"Knopf2",x%,40 + y%)
    MinOn&[&Boucle] = @Créer("Icon",MinOff&[&Boucle],"Knopf1",0,0)

    Si &Boucle = 3

        y% = bottom%
        Décembre x%,36

    D'autre

        Décembre y% ,34

    EndIf

    ShowWindow(SecOn&[&Boucle],0)

Wend

MaxIndexMin% = SizeOf(MinOn&[]) - 1
Décembre x%, 10 + 34
y% = bottom%
'Slots pour Stunden:

WhileLoop 0,5

    HoursOff&[&Boucle] = @Créer("Icon",%hwnd,"Knopf2",x%,40 + y%)
    HoursOn&[&Boucle] = @Créer("Icon",HoursOff&[&Boucle],"Knopf1",0,0)

    Si &Boucle = 3

        y% = bottom%
        Décembre x%,36

    D'autre

        Décembre y% ,34

    EndIf

    ShowWindow(SecOn&[&Boucle],0)

Wend

MaxIndexHours% = SizeOf(HoursOn&[]) - 1
Var hFarben& = Créer("CheckBox",%hwnd,"Mit zeitentsprechender Hintergrundfarbe",10,Height(%hwnd)-30,350,24)
Var hHexUhr& = Créer("CheckBox",%hwnd,("Es ist maintenant oui c'est ca " + Hex$(dt("gethour",!now)) + » + Hex$(dt("getmin",!now)) + » + Hex$(dt("getsec",!now)) + " montre        :-)"),10,(Height(%hwnd)-60),350,24)
Var tt& = Créer("Text",%hwnd,»,Width(%hwnd)-40,Height(%hwnd)-40,0,0)
ShowTime

Tandis que 1

    WaitInput 1000
    Cas %umessage = $10:Pause
    GetTimeValues

    Si GetCheck(hFarben&)

        Début de peinture tt&
        Cls RGB((Seconds% * 4.25),(Hours% * 10.66) Mod $FF,$FF - (Minutes% * 4.25))
        EndPaint

    EndIf

    Si GetCheck(hHexUhr&)

        SetText hHexUhr&,"Es ist maintenant oui c'est ca " + Hex$(dt("gethour",!now)) + » + Hex$(dt("getmin",!now)) + » + Hex$(dt("getsec",!now)) + " montre " + Space$(seconds% \ 10) + " :-)"

    EndIf

    ShowTime

Wend

DeleteObject hFont&
 
XProfan X4
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
04.06.2018  
 




Zum Quelltext


Topictitle, max. 100 marque.
 

Systemprofile:

ne...aucune Systemprofil angelegt. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

s'il te plaît s'inscrire um une Beitrag trop verfassen.
 

Options du sujet

17.604 Views

Untitledvor 0 min.
RudiB.15.03.2021
ByteAttack21.01.2021
Langer30.12.2020
Michael W.29.12.2020
plus...

Themeninformationen



Admins  |  AGB  |  Applications  |  Auteurs  |  Chat  |  protection des données  |  Télécharger  |  Entrance  |  Aider  |  Merchantportal  |  Empreinte  |  Mart  |  Interfaces  |  SDK  |  Services  |  Jeux  |  cherche  |  Support

un projet aller XProfaner, qui il y a!


Mon XProfan
Privé Nouvelles
Eigenes Ablageforum
Sujets-La liste de voeux
Eigene Posts
Eigene Sujets
Zwischenablage
Annuler
 Deutsch English Français Español Italia
Traductions

protection des données


Wir verwenden Cookies seulement comme Session-Cookies à cause de qui technischen Notwendigkeit et chez uns gibt es aucun Cookies de Drittanbietern.

si du ici sur unsere Webseite klickst ou bien navigierst, stimmst du unserer Erfassung de Informationen dans unseren Cookies sur XProfan.Net trop.

Weitere Informationen trop unseren Cookies et en supplément, comment du qui Kontrolle par-dessus behältst, findest du dans unserer nachfolgenden Datenschutzerklärung.


d'accordDatenschutzerklärung
je voudrais keinen Cookie