| |
|
|
Jac de Lad | Hello, Have time ne question:
I can with XProfan 8.0 nice Bildbuttons create. but how can I the image to the create change, means ain new Bildchen allocate? (so How SetText new Texts zuweist!)
Jac |
|
|
| Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE) Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP | 11/06/05 ▲ |
|
|
|
|
Peter Mallow | Hello have there something gebastelt:
Def @ALoadImage(6) !"USER32","LoadImageA"
Proc BmpButton from Presentation (c) Andreas Miethe - Genial THANK YOU!
Parameters Wnd&,s$,X%,Y%,SizeX%,SizeY%
@BmpButton(%HWnd,"BEISPIEL3.BMP",PosX,PosY%,Horizontal Size%,Vertikale Size%)
Declare h&,Ctrl&,Bmp#
Dim bmp#,@Len(s$)+1
String bmp#,0=s$
h& = @ALoadImage(%HInstance,bmp#,0,SizeX%-2,SizeY%-2,$0050)
Ctrl&=@Control("Button","",$50000080,X%,Y%,SizeX%,SizeY%,Wnd&,2000,%HInstance)
@SendMessage(Ctrl&,$00F7,0,h&)
Dispose bmp#
Return Ctrl&
ENDPROC
Proc SetButtonImg
Parameters Wnd&,s$,SizeX%,SizeY%
Declare h&,Ctrl&,Bmp#
Dim bmp#,@Len(s$)+1
String bmp#,0=s$
h& = @ALoadImage(%HInstance,bmp#,0,SizeX%-2,SizeY%-2,$0050)
@SendMessage(Wnd&,$00F7,0,h&)
Dispose bmp#
ENDPROC
Cls
Declare Button&
Button& = @BmpButton(%HWnd,"bild1.bmp",10,10,100,30)
WaitInput
SetButtonImg Button&,"bild2.bmp",100,30 New Image becomes staid
The size the Bildes must set go
WaitInput
|
|
|
| WinXP Pro SP2, XProfan 9 + XPSE AMD Athlon 64 X2 3800 | 11/08/05 ▲ |
|
|
|
|
Jac de Lad | thanks, I probiers from.
Jac |
|
|
| Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE) Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP | 11/08/05 ▲ |
|
|
|
|
Jac de Lad | |
|
| Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE) Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP | 11/25/05 ▲ |
|
|
|
|
| No, runs well...
Def @Aloadimage(6) !"USER32","LoadImageA"
Proc Bmpbuttonaus Presentation (c) Andreas Miethe - Genial THANK YOU!
Parameters Wnd&,s$,X%,Y%,Sizex%,Sizey%
@BmpButton(%HWnd,"BEISPIEL3.BMP",PosX,PosY%,Horizontal Size%,Vertikale Size%)
Declare H&,Ctrl&,Bmp#
Dim Bmp#,@Len(s$)+1
String Bmp#,0=s$
H& = @Aloadimage(%Hinstance,Bmp#,0,Sizex%-2,Sizey%-2,$0050)
Ctrl&=@Control("Button","",$50000080,X%,Y%,Sizex%,Sizey%,Wnd&,2000,%Hinstance)
@Sendmessage(Ctrl&,$00F7,0,H&)
Dispose Bmp#
Return Ctrl&
Endproc
Proc Setbuttonimg
Parameters Wnd&,s$,Sizex%,Sizey%
Declare H&,Ctrl&,Bmp#
Dim Bmp#,@Len(s$)+1
String Bmp#,0=s$
H& = @Aloadimage(%Hinstance,Bmp#,0,Sizex%-2,Sizey%-2,$0050)
@Sendmessage(Wnd&,$00F7,0,H&)
Dispose Bmp#
Endproc
Cls
Declare Button&
CHDIR $WINPATH
Bmpbutton %Hwnd,@FINDFIRST$("*.BMP"),10,10,100,30
LET Button&=@&(0)
Waitinput
Beep
@Findfirst$("*.BMP")
Setbuttonimg Button&,@FindNext$("*.BMP"),100,30New Image becomes staid
The size the Bildes must set go
While 0=0
Waitinput
Beep
Setbuttonimg Button&,@FindNext$(),100,30New Image becomes staid
wend
|
|
|
| |
|
|
|
Jac de Lad | I probiers...
thanks
Jac |
|
|
| Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE) Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP | 11/27/05 ▲ |
|
|
|