English
Forum

Image-switch Button

 

Julian
Schmidt
How create I a Image-Button which one-, ausrastbar is?
Similar this [...] 
would be well if it one smaller edge had
 
˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
06/18/11  
 




Thomas
Freier
such a thing?
WINDOWSTYLE 31
WINDOWTITLE "Button as Schalter"
WINDOW 0,0-640,440
Declare Schalter&
Schalter&=Control("Button","",$54021083,100,100,22,22,%hwnd,1001,%hInstance)
MCLS 20,20
StartPaint -1
UseBrush 1,@RGB(255,0,0)
Fill 2,2,@RGB(255,0,0)
USEP 1,2,@RGB(255,255,255)
ellipsis 4,4 - 16,16
EndPaint
var bmp&=@Create("HPIC",0,"&MEMBMP")
MCLS 20,20
StartPaint -1
UseBrush 1,@RGB(0,255,0)
Fill 2,2,@RGB(255,0,0)
USEP 1,2,@RGB(255,255,255)
USEP 0,3,@RGB(0,0,0)
line 9,13-9,6
EndPaint
var bmp1&=@Create("HPIC",0,"&MEMBMP")
SendMessage(Schalter&,$00F7,0,bmp&)
SetCheck Schalter&,0

while 0=0

    WaitInput

    if @Clicked(Schalter&)

        DrawText 0,0,@st$(@GetCheck(Schalter&))
        case @GetCheck(Schalter&)=0:SendMessage(Schalter&,$00F7,0,bmp&)
        case @GetCheck(Schalter&)=1:SendMessage(Schalter&,$00F7,0,bmp1&)
        SetFocus(%hwnd)

    EndIf

wend

DeleteObject bmp&
DeleteObject bmp1&
End
 
Gruß Thomas
Windows XP SP2, XProfan X2
06/18/11  
 




Julian
Schmidt
such a thing into direction, though had I gladly the one unabhänig from the graphic discern can whether the Butten is pressed or not.
so what into direction...


41 kB
Hochgeladen:06/18/11
Downloadcounter134
Download
 
˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
06/18/11  
 




Thomas
Freier
there falls me only yet:
DEF SetWindowLong(3) !"USER32","SetWindowLongA"
DEF GetWindowLong(2) !"USER32","GetWindowLongA"
Def GetSysColor(1) !"USER32","GetSysColor"

proc B_Stil

    Parameters h&,border%
    SetWindowPos h&=0,0 - 0,0
    var xstyle%=1
    Case border%:xstyle%=$200
    SetWindowLong(h&,-20,xstyle%)
    SetWindowPos h&=100,100 - 100,30

endproc

WINDOWSTYLE 31
WINDOWTITLE "Button as Schalter"
WINDOW 0,0-640,440
cls GetSysColor(15)
Declare Schalter&
Schalter&=Control("Button","   Test    ",$54011003,0,0,0,0,%hwnd,1001,%hInstance)
B_Stil Schalter&,0
SetCheck Schalter&,0

while 0=0

    WaitInput

    if @Clicked(Schalter&)

        DrawText 0,0,@st$(@GetCheck(Schalter&))
        case @GetCheck(Schalter&)=0:B_Stil Schalter&,0
        case @GetCheck(Schalter&)=1:B_Stil Schalter&,1
        SetFocus(%hwnd)

    EndIf

wend

End
one. whether one levelly with 0 possible is must You Search and testing.
Or own Images:
Def GetSysColor(1) !"USER32","GetSysColor"
WINDOWSTYLE 31
WINDOWTITLE "Button as Schalter"
WINDOW 0,0-640,440
cls GetSysColor(15)
Declare Schalter&
Schalter&=Control("Button","",$54021083,100,100,96,26,%hwnd,1001,%hInstance)
var bmp&=@Create("HPIC",-1,"B1.png")
var bmp1&=@Create("HPIC",-1,"B2.png")
SendMessage(Schalter&,$00F7,0,bmp&)
SetCheck Schalter&,0

while 0=0

    WaitInput

    if @Clicked(Schalter&)

        DrawText 0,0,@st$(@GetCheck(Schalter&))
        case @GetCheck(Schalter&)=0:SendMessage(Schalter&,$00F7,0,bmp&)
        case @GetCheck(Schalter&)=1:SendMessage(Schalter&,$00F7,0,bmp1&)
        SetFocus(%hwnd)

    EndIf

wend

DeleteObject bmp&
DeleteObject bmp1&
End
and the ggf. along into whom Script take

b1.png  
1 kB
Hochgeladen:06/19/11
Downloadcounter162
Download
b2.png  
1 kB
Hochgeladen:06/19/11
Downloadcounter169
Download
 
Gruß Thomas
Windows XP SP2, XProfan X2
06/19/11  
 




Julian
Schmidt
my Image is a Bitmap, and which background is transparency! How can I the image with aktivierter transparency on the Button lay?
Def GetSysColor(1) !"USER32","GetSysColor"
WINDOWSTYLE 31
WINDOWTITLE "Button as Schalter"
WINDOW 0,0-150,160
cls GetSysColor(15)
Declare Schalter&
Schalter&=Control("Button","",$54021083,40,40,45,45,%hwnd,1001,%hInstance)
var bmp&=@Create("HPIC",-1,"images/refresh.bmp")
SendMessage(Schalter&,$00F7,0,bmp&)
SetCheck Schalter&,0

while 0=0

    WaitInput

    if @Clicked(Schalter&)

        DrawText 0,0,@st$(@GetCheck(Schalter&))
        case @GetCheck(Schalter&)=0:SendMessage(Schalter&,$00F7,0,bmp&)
        case @GetCheck(Schalter&)=1:SendMessage(Schalter&,$00F7,0,bmp&)
        SetFocus(%hwnd)

    EndIf

wend

DeleteObject bmp&
End


28 kB
Hochgeladen:06/19/11
Downloadcounter166
Download
 
˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
06/19/11  
 




Thomas
Freier
there falls me only one Icon one.
Def GetSysColor(1) !"USER32","GetSysColor"
WINDOWSTYLE 31
WINDOWTITLE "Button as Schalter"
WINDOW 0,0-150,160
cls GetSysColor(15)
var bmp& = @Create("hIcon", "bau.ico",0)
var Schalter&=Control("BUTTON","",$50001043,30,30,30,30,%hwnd,2112,%hinstance)
Sendmessage(Schalter&,$00F7,1,bmp&)

while 0=0

    WaitInput
    case @Clicked(Schalter&): DrawText 0,0,@st$(@GetCheck(Schalter&))

wend

DeleteObject bmp&
End

1 kB
Hochgeladen:06/19/11
Downloadcounter202
Download
 
Gruß Thomas
Windows XP SP2, XProfan X2
06/19/11  
 




Julian
Schmidt
thanks, Have I same in my News proposition installed


323 kB
Hochgeladen:06/19/11
Downloadcounter153
Download
 
˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
06/19/11  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

10.320 Views

Untitledvor 0 min.
Georg01/14/21
Axel Berse04/16/19
E.T.12/20/18
Walter06/08/18
More...

Themeninformationen

this Topic has 2 subscriber:

Julian Schmidt (4x)
Thomas Freier (3x)


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