English
Source / code snippets

Buttons coloured Textcolorbuttons

 

Julian
Schmidt
first kompatible with XProfanX2
cls
var bt1&=TextColorButton(%hwnd,"Beispiel",0,RGB(RND(256),RND(256),RND(256)),RGB(RND(256),RND(256),RND(256)),10,10,150,25)
var bt2&=TextColorButton(%hwnd,"Beispiel",1,RGB(RND(256),RND(256),RND(256)),RGB(RND(256),RND(256),RND(256)),10,40,150,40)
var bt3&=TextColorButton(%hwnd,"Beispiel",3,RGB(RND(256),RND(256),RND(256)),RGB(RND(256),RND(256),RND(256)),10,85,250,70)

while 1

    sleep 300
    Randomize
    SetTextColorButton(bt1&,"Beispiel",0,RGB(RND(256),RND(256),RND(256)),RGB(RND(256),RND(256),RND(256)))
    SetTextColorButton(bt2&,"Beispiel",1,RGB(RND(256),RND(256),RND(256)),RGB(RND(256),RND(256),RND(256)))
    SetTextColorButton(bt3&,"Beispiel",2,RGB(RND(256),RND(256),RND(256)),RGB(RND(256),RND(256),RND(256)))

Endwhile

Proc TextColorButton

    Parameters hdl&,Text$,ausr&,bgcol&,textcol&,x1&,y1&,x2&,y2&
    var picbt&=Create("PicButton",hdl&,0,x1&,y1&,x2&,y2&)
    SetTextColorButton(picbt&,Text$,ausr&,bgcol&,textcol&)
    Return picbt&

ENDPROC

Proc SetTextColorButton

    Parameters hdl&,Text$,ausr&,bgcol&,textcol&
    var hpic&=Create("hNewPic", width(hdl&)-4, height(hdl&)-4, bgcol&,)
    StartPaint hpic&
    UseFont "Arial",(height(hdl&)-4)/1.3125,0,1,0,0
    Text Color textcol&,-1
    DrawText (height(hdl&)-4)/5, (height(hdl&)-4)/10, width(hpic&)-((height(hdl&)-4)/5), height(hpic&)-((height(hdl&)-4)/10), Text$, ausr&
    EndPaint
    Sendmessage(hdl&,$F7 | 247,0,hpic&)
    deleteobject hpic&
    Return 1

ENDPROC

 
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
02/11/12  
 



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.889 Views

Untitledvor 0 min.
ecki07/28/23
Sven Bader01/23/23
RudiB.04/14/22
p.specht11/21/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