Forum | | | | 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...
|
| | | ˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗ 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 |
| | | 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
|
| | | ˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗ 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
|
| | | Gruß Thomas Windows XP SP2, XProfan X2 | 06/19/11 ▲ |
| |
| | Julian Schmidt | thanks, Have I same in my News proposition installed
|
| | | ˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗ Webseite [...] | 06/19/11 ▲ |
| |
|
AnswerTopic-Options | 10.321 Views |
Themeninformationenthis Topic has 2 subscriber: |