| |
|
|
Julian Schmidt | KompilierenMarkierenSeparierenWindowstyle 24
Windowtitle "Beispiel zum Erstellen einer Groupbox mit Checkbox"
Window 100,200-250,180
cls External("USER32","GetSysColor",15)
var gb&=Create("GroupBox",%hwnd,"",20,20,width(%hwnd)-40,height(%hwnd)-40)
Create("CheckBox",gb&,"Groupbox Text",10,3,115,18)
while 1
Endwhile
|
|
|
| |
|
|
|
RudiB. | Und da geht noch mehr....wenns mal eng wird auf dem Bildschirm, dann eben die Controls ineinander packen.
Windowstyle 24
Windowtitle "Beispiel zum Erstellen einer Groupbox mit Checkbox"
Window 100,200-450,280
Declare x%,text&
x%=1
cls External("USER32","GetSysColor",15)
'Checkbox in Groupbox
var gb&=Create("GroupBox",%hwnd,"",20,20,width(%hwnd)-40,height(%hwnd)-40)
Create("CheckBox",gb&,"Groupbox Text",10,3,115,18)
'Button in Button
text&=Create("Text",%hwnd,"Button in Button.. der kleine Button beendet Programm",40,80,380,18)
Var test&=Create("Button",%hwnd," Test",100,100,160,30)
Var a&=Create("Button",test&,"1",10,4,22,22)
' Edit in Button
text&=Create("Text",%hwnd,"Checkbox in Edit und Edit in Button..geht....",40,130,380,18)
Var test2&=Create("Button",%hwnd," Test 2",100,150,160,30)
Var b&=Create("Edit",Test2&,"An",5,4,50,22)
Var c&=Create("CHeckbox",b&,"",33,1,16,18)
' Button in Edit
text&=Create("Text",%hwnd,"...und Button in Edit geht auch, aber nicht so cool...",40,180,380,18)
Var edit&=Create("Edit",%hwnd,"Der Test",100,200,160,24)
Var d&=Create("Button",edit&,"HiHi",100,0,40,20)
while 1
If x%>99
x%=1
settext a&,str$(x%)
setfocus(%hwnd)
Endif
If Getfocus(a&)
break
EndIf
If Getfocus(test&)
settext b&,"An"
setcheck c&,0
inc x%
settext a&,str$(x%)
setfocus(%hwnd)
EndIf
If Getfocus(test2&)
If gettext$(b&)="An"
settext b&,"Aus"
setcheck c&,1
EndIf
EndIf
If getfocus(d&)
inc x%,10
settext a&,str$(x%)
setfocus(%hwnd)
Endif
Endwhile
Was da wohl noch so alles funktioniert ???? |
|
|
| |
|
|