English
Source / code snippets

Bitmap Button die - 2

 

Julian
Schmidt
Perhaps can something like Yes who use.
class wuerfel = hdl&, auge&, bgfarbe&, farbe&, Init@, settle@, Zaehlen@, colour@
Declare wuerfel1#, hintergrund&
CLS
Dim wuerfel1#, wuerfel
wuerfel1#.colour(RGB(255,100,100),RGB(230,230,230))
wuerfel1#.Init(%hwnd,10,10,50,50)

WhileNot iskey(27)

    Waitinput
    case getfocus(wuerfel1#.hdl&) : wuerfel1#.Zaehlen()
    Setfocus(%hwnd)

EndWhile

Dispose wuerfel1#

Proc wuerfel.Init

    Parameters Dlg&, X1&, Y1&, X2&, Y2&
    .hdl& = Create("PicButton",Dlg&,hintergrund&, X1&, Y1&, X2&, Y2&)
    .auge& = 1
    .settle(.auge&)

ENDPROC

Proc wuerfel.colour

    Parameters bgfarbe&,farbe&
    .bgfarbe& = bgfarbe&
    .farbe& = farbe&

ENDPROC

Proc wuerfel.settle

    Parameters auge&
    Declare HPic&, SizeX&, SizeY&
    HPic& = Create("hNewPic", width(.hdl&), height(.hdl&), RGB(255,255,255))
    SizeX& = width(.hdl&)*0.2
    SizeY& = height(.hdl&)*0.2
    StartPaint HPic&
    UseBrush 1,.bgfarbe&
    RoundRect 0,0 - %BMPX,%BMPY; 10,10
    UseBrush 1,.farbe&
    Case auge&=1 : Circle("0.5|0.5")
    Case auge&=2 : Circle("0.33|0.5","0.66|0.5")
    Case auge&=3 : Circle("0.25|0.25","0.5|0.5","0.75|0.75")
    Case auge&=4 : Circle("0.25|0.25","0.75|0.25","0.25|0.75","0.75|0.75")
    Case auge&=5 : Circle("0.5|0.5","0.25|0.25","0.75|0.25","0.25|0.75","0.75|0.75")
    Case auge&=6 : Circle("0.25|0.2","0.75|0.2","0.25|0.8","0.75|0.8","0.25|0.5","0.75|0.5")
    EndPaint
    Sendmessage(.hdl&,$F7 | 247,0,HPic&)
    Return 1

    Proc Circle

        whileloop %PCount

            ellipsis (%BMPX-SizeX&)*Val(SubStr$(@$(&loop),1,"|")),(%BMPY-SizeY&)*Val(SubStr$(@$(&loop),2,"|")) - (%BMPX-SizeX&)*Val(SubStr$(@$(&loop),1,"|"))+SizeX&, (%BMPY-SizeY&)*Val(SubStr$(@$(&loop),2,"|"))+SizeY&

        Endwhile

    ENDPROC

ENDPROC

Proc wuerfel.Zaehlen

    .auge& = .auge&+1
    Case .auge&>6 : .auge& = 1
    .settle(.auge&)

ENDPROC

 
XProfan X2
˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
06/12/13  
 



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

5.564 Views

Untitledvor 0 min.
p.specht11/20/21
Uwe Lang11/20/21
Manfred Barei11/19/21
Wilfried Friebe11/17/21
More...

Themeninformationen

this Topic has 1 subscriber:

Julian Schmidt (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