ich brauche mal wieder Eure Hilfe, ich habe 2 Codes, folgender funktioniert einwandfrei:
[Hier wird ein ButtenGadget erzeugt, das funktioniert auch so wie ich möchte.]
Code: Alles auswählen
If OpenWindow(0,0,0,500,500,"Window",#PB_Window_SystemMenu|#PB_Window_ScreenCentered)
SetWindowColor(0,RGB(255,255,255))
If CreateGadgetList(WindowID(0))
If count = 1
ButtonImageGadget(1,200,200,100,25,CatchImage(0,?Button1))
GadgetToolTip(1, "Timer ist aktiviert!")
ElseIf count = 0
ButtonImageGadget(1,200,200,100,25,CatchImage(0,?Button2))
GadgetToolTip(1, "Timer ist deaktiviert!")
EndIf
EndIf
Code: Alles auswählen
If EventID=#PB_Event_Gadget
GadgetNr=EventGadget()
If GadgetNr=1
OpenWindow(2,0,0,600,500,"...", #PB_Window_BorderLess|#PB_Window_ScreenCentered|#PB_Window_Invisible|1)
SetWindowColor(2,RGB(255,255,255))
SkinWin(WindowID(2),CatchImage(0,?SkinPicture))
HideWindow(2,0)
SetGadgetState(0,Random(100))
If CreateGadgetList(WindowID(2))
If count = 1
ButtonImageGadget(4,200,200,100,25,CatchImage(0,?Button1))
GadgetToolTip(4, "Timer ist aktiviert!")
ElseIf count = 0
ButtonImageGadget(4,200,200,100,25,CatchImage(0,?Button2))
GadgetToolTip(4, "Timer ist deaktiviert!")
EndIf
EndIf
EndIf
EndIf
Danke schon mal, Matthias