AppTitle "MyOwnGUI 1.2" ;Graphics 1024, 768, 32, 1 Graphics 800, 600, 32, 2 HidePointer While Not KeyHit (1) SetBuffer BackBuffer () Color 200, 200, 200 Rect 0, 0, 1024, 768, 1 ; Hintergrund Color 255, 255, 255 Rect 800, 0, 1024, 768, 1 ; Hintergrund status$ = infobox$(50, 50, 450, 140, fenster, " MyOwnGUI", "Information für den User: Sie haben gerade die Software 'MyOwnGUI' gestartet. Mit starten dieser Anwendung er- kennen Sie die Nutzungsbedingungen von MyOwnGUI an.", status$, 0) If status$ = "close" Then End If status$ = "ok" Then End status2$ = infobox$(340, 220, 450, 150, fenster, " Test Fenster2 - Für 'look and feel'", " Dieses Fenster veranschaulicht die Minimierfunktion.", status2$, 2) status3$ = infobox$(300, 380, 450, 150, fenster, " Fenster 3", " MyOwnGUI ist geistiges Eigentum von SE.", status3$, 3) status4$ = infobox$(20, 380, 150, 100, fenster, " Fenster 4", " Irgendwas.", status4$, 4) status6$ = dialogbox$(20, 240, 300, 100, fenster, " Kaufoption", " Möchten Sie dieses Programm kaufen?", status6$, 6, "Kaufen", "Nicht kaufen") If status6$ = "option2" Then status6$ = "close" status5$ = infobox$(20, 380, 150, 100, fenster, " Scherz", " Das Programm ist doch gratis....", status5$, 5) EndIf check1 = Checkbox(100,500,check1, "Anklicken.") check2 = Checkbox(100,525,check2, "Schrift verändert sich.") click1 = Clickbox(200,400,click1, "Anklicken.") bottom1 = Bottom(400,550,bottom1, "Beenden") If bottom1 = 1 Then End pulldown1 = Pulldown(1,0,pulldown1, "Datei", "Neu", "Öffnen", "Schließen", "Speichern") pulldown2 = Pulldown(46,0,pulldown2, "Bearbeiten", "Ausschneiden", "Kopieren", "Einfügen", "") ;status = Screensaver(status, 0) If minuten = 0 Then minuten = MilliSecs()/60000 If MilliSecs()/60000 - minuten > 0 Then status = Screensaver(status, 0) If status = 1 Then minuten = 0 status = 0 EndIf Text 20, 40, MilliSecs()/1000 - minuten * 60 ; Bildschirmschonerzählwerk maus(1) Flip Wend Function maus(status) Select status Case 1 rgb = ReadPixel(MouseX(), MouseY()) ;Für Mausfarbe auf weißen Untergrund r = (rgb And $FF0000) / $10000 g = (rgb And $FF00) / $100 b = rgb And $FF Color 255, 255, 255 If r = 255 And g = 255 And b = 255 Then Color 0, 0, 0 Rect MouseX()+1, MouseY(), 1, 20, 0 ;Mauspfeil Rect MouseX()+2, MouseY()+1, 1, 17, 0 Rect MouseX()+3, MouseY()+2, 1, 14, 0 Rect MouseX()+4, MouseY()+3, 1, 11, 0 Rect MouseX()+5, MouseY()+4, 1, 10, 0 Rect MouseX()+6, MouseY()+5, 1, 9, 0 Rect MouseX()+7, MouseY()+6, 1, 8, 0 Rect MouseX()+8, MouseY()+7, 1, 7, 0 Rect MouseX()+9, MouseY()+8, 1, 6, 0 Rect MouseX()+10, MouseY()+9, 1, 5, 0 Rect MouseX()+11, MouseY()+10, 1, 4, 0 Rect MouseX()+12, MouseY()+11, 1, 3, 0 Rect MouseX()+13, MouseY()+12, 1, 2, 0 Rect MouseX()+14, MouseY()+13, 1, 1, 0 Rect MouseX()+4, MouseY()+11, 4, 2, 1;Mausstamm Rect MouseX()+5, MouseY()+13, 4, 2, 1 Rect MouseX()+6, MouseY()+15, 4, 2, 1 Rect MouseX()+7, MouseY()+17, 4, 2, 1 Rect MouseX()+8, MouseY()+19, 4, 2, 1 Case 2 Color 255, 255, 255 Rect MouseX(), MouseY(), 5, 5, 0 ;Input Rect MouseX(), MouseY()+7, 5, 5, 0 Case 3 Color 255, 255, 255 Oval MouseX(), MouseY(), 11, 11, 1 ;Warten Color 0, 0, 0 Rect MouseX()+5, MouseY(), 1, 6, 0 Line MouseX()+5, MouseY()+6, MouseX()+10, MouseY()+8 End Select Color 255, 255, 255 End Function Function infobox$(x, y, breite, hoehe, fenster, Titel$, Text$, status$, nr) If status$ = "mini_maximize" Then fenster = 1 If status$ = "mini_maximize" Then x = 1 : y = GraphicsHeight () - 20 If status$ = "mini_maximize" Then breite = StringWidth(titel$) + 70 If status$ = "mini_maximize" And nr = 2 Then x = (GraphicsWidth () - StringWidth(titel$) - 70) /2 : y = GraphicsHeight () - 20 If status$ = "mini_maximize" And nr = 3 Then x = GraphicsWidth () - StringWidth(titel$) - 71 : y = GraphicsHeight () - 20 If status$ = "mini_maximize" And nr = 4 Then x = 1 : y = GraphicsHeight () - 40 If status$ = "mini_maximize" And nr = 5 Then x = (GraphicsWidth () - StringWidth(titel$) - 70) /2 : y = GraphicsHeight () - 40 If status$ = "mini_maximize" And nr = 6 Then x = GraphicsWidth () - StringWidth(titel$) - 71 : y = GraphicsHeight () - 40 If status$ = "full_window" Then fenster = 0 If status$ = "close" Then fenster = 1 aufloesungbreite = GraphicsWidth () If breite = 0 Then breite = StringWidth(text$) ;Feld Autodimensionieren If hoehe = 0 Then hoehe = StringHeight(text$) + 25 + 20 + 20 ;Zeile, Kopfleiste, OK-Button If aufloesungbreite < breite Then breite = aufloesungbreite schaltelementx = x+breite-20 Select fenster Case 1 If status$ <> "close" Then Color 0, 0, 128 Rect x, y, breite, 17, 1 ;Kopfleiste Color 215, 215, 215 Rect schaltelementx, y+1, 16, 14, 1 ;Schaltelement -oX Color 255, 255, 255 Rect schaltelementx, y+1, 16, 1, 0 Rect schaltelementx, y+1, 1, 14, 0 Color 190, 190, 190 Rect schaltelementx, y+1+14, 16, 1, 0 Rect schaltelementx+16, y+1, 1, 15, 0 Color 200, 200, 200 Rect schaltelementx+1, y+1+14-1, 14, 1, 0 Rect schaltelementx+15, y+2, 1, 13, 0 Color 0, 0, 0 Line schaltelementx+3, y+5, schaltelementx+12, y+1+11 Line schaltelementx+4, y+5, schaltelementx+13, y+1+11 Line schaltelementx+3, y+1+11, schaltelementx+12, y+5 Line schaltelementx+4, y+1+11, schaltelementx+13, y+5 Color 215, 215, 215 Rect schaltelementx-20, y+1, 16, 14, 1 ;Schaltelement2 -oX Color 255, 255, 255 Rect schaltelementx-20, y+1, 16, 1, 0 Rect schaltelementx-20, y+1, 1, 14, 0 Color 190, 190, 190 Rect schaltelementx-20, y+1+14, 16, 1, 0 Rect schaltelementx-4, y+1, 1, 15, 0 Color 200, 200, 200 Rect schaltelementx-19, y+1+14-1, 14, 1, 0 Rect schaltelementx-5, y+2, 1, 13, 0 Color 0, 0, 0 Rect schaltelementx-17, y+4, 11, 10, 0 Rect schaltelementx-17, y+5, 11, 1, 0 Color 215, 215, 215 Rect schaltelementx-40, y+1, 16, 14, 1 ;Schaltelement3 -oX Color 255, 255, 255 Rect schaltelementx-40, y+1, 16, 1, 0 Rect schaltelementx-40, y+1, 1, 14, 0 Color 190, 190, 190 Rect schaltelementx-40, y+1+14, 16, 1, 0 Rect schaltelementx-24, y+1, 1, 15, 0 Color 200, 200, 200 Rect schaltelementx-39, y+1+14-1, 14, 1, 0 Rect schaltelementx-25, y+2, 1, 13, 0 Color 0, 0, 0 Rect schaltelementx-37, y+12, 10, 1, 0 Rect schaltelementx-37, y+13, 10, 1, 0 Color 255, 255, 255 Text x, y, Titel$ EndIf Case 0 Color 215, 215, 215 Rect x, y, breite, hoehe, 1 ;Fenster Color 0, 0, 128 Rect x, y, breite, 17, 1 ;Kopfleiste Color 215, 215, 215 Rect schaltelementx, y+1, 16, 14, 1 ;Schaltelement -oX Color 255, 255, 255 Rect schaltelementx, y+1, 16, 1, 0 Rect schaltelementx, y+1, 1, 14, 0 Color 190, 190, 190 Rect schaltelementx, y+1+14, 16, 1, 0 Rect schaltelementx+16, y+1, 1, 15, 0 Color 200, 200, 200 Rect schaltelementx+1, y+1+14-1, 14, 1, 0 Rect schaltelementx+15, y+2, 1, 13, 0 Color 0, 0, 0 Line schaltelementx+3, y+5, schaltelementx+12, y+1+11 Line schaltelementx+4, y+5, schaltelementx+13, y+1+11 Line schaltelementx+3, y+1+11, schaltelementx+12, y+5 Line schaltelementx+4, y+1+11, schaltelementx+13, y+5 Color 200, 200, 200 Rect x+(breite-72)/2, y+hoehe-30, 72, 20, 1 ;OK-Button Color 0, 0, 0 Rect x+(breite-72)/2, y+hoehe-30, 72, 20, 0 Text x+(breite-72)/2+72/2-10, y+hoehe-30+3, "OK" Color 215, 215, 215 Rect schaltelementx-20, y+1, 16, 14, 1 ;Schaltelement2 -oX Color 255, 255, 255 Rect schaltelementx-20, y+1, 16, 1, 0 Rect schaltelementx-20, y+1, 1, 14, 0 Color 190, 190, 190 Rect schaltelementx-20, y+1+14, 16, 1, 0 Rect schaltelementx-4, y+1, 1, 15, 0 Color 200, 200, 200 Rect schaltelementx-19, y+1+14-1, 14, 1, 0 Rect schaltelementx-5, y+2, 1, 13, 0 Color 0, 0, 0 Rect schaltelementx-17, y+4, 11, 10, 0 Rect schaltelementx-17, y+5, 11, 1, 0 Color 215, 215, 215 Rect schaltelementx-40, y+1, 16, 14, 1 ;Schaltelement3 -oX Color 255, 255, 255 Rect schaltelementx-40, y+1, 16, 1, 0 Rect schaltelementx-40, y+1, 1, 14, 0 Color 190, 190, 190 Rect schaltelementx-40, y+1+14, 16, 1, 0 Rect schaltelementx-24, y+1, 1, 15, 0 Color 200, 200, 200 Rect schaltelementx-39, y+1+14-1, 14, 1, 0 Rect schaltelementx-25, y+2, 1, 13, 0 Color 0, 0, 0 Rect schaltelementx-37, y+12, 10, 1, 0 Rect schaltelementx-37, y+13, 10, 1, 0 Color 255, 255, 255 Text x, y, Titel$ Color 0, 0, 0 zeichenkette_breite = StringWidth(Text$) zeile = 25 start = 1 If zeichenkette_breite <= breite Then Text x, y+zeile, Text$ If zeichenkette_breite > breite Then schriftbreite = FontWidth() zeilenzeichen = breite / schriftbreite zeichenanzahl = Len (Text$) While zeichenanzahl > start Text2$ = Mid$ (Text$, start, zeilenzeichen) start = start + zeilenzeichen Text x, y+zeile, Text2$ zeile = zeile + 20 Wend EndIf End Select If MouseX() > schaltelementx-40 And MouseX() < schaltelementx-24 And MouseY() > y+1 And MouseY() < y+15 Then If MouseHit(1) = 1 Then status$ = "mini_maximize" ;- EndIf If MouseX() > schaltelementx-20 And MouseX() < schaltelementx-4 And MouseY() > y+1 And MouseY() < y+15 Then If MouseHit(1) = 1 Then status$ = "full_window" ;o EndIf If MouseX() > schaltelementx And MouseX() < schaltelementx+16 And MouseY() > y+1 And MouseY() < y+15 Then If MouseHit(1) = 1 Then status$ = "close" ;X EndIf If MouseX() > x+(breite-72)/2 And MouseX() < x+(breite-72)/2+72 And MouseY() > y+hoehe-30 And MouseY() < y+hoehe-10 Then If MouseHit(1) = 1 Then status$ = "ok" ;OK EndIf Color 255, 255, 255 Return status$ End Function Function Checkbox(x,y,check,checkwhat$) Color 100,100,100:Rect x,y,16,16,1 Color 255,255,255:Rect x,y,16,16,0 If check = 1 Color 255,0,0:Line x+1,y+1,x+14,y+14:Line x+14,y+1,x+1,y+14 If RectsOverlap(MouseX(),MouseY(),1,1,x,y,16,16) Then If MouseHit(1) Then check = 1 - check EndIf Text x+20, y, checkwhat$ Return check End Function Function Clickbox(x,y,check,checkwhat$) x2 = StringWidth(checkwhat$) + 4 y2 = StringHeight(checkwhat$) + 4 Color 255,255,255:Rect x,y,x2,y2,0 If check = 1 Then Color 255,0,0:Rect x+1,y+1,x2-2,y2-2,0 If RectsOverlap(MouseX(),MouseY(),1,1,x,y,x2,y2) Then If MouseHit(1) Then check = 1 - check EndIf Text x+2, y+2, checkwhat$ Return check End Function Function Bottom(x,y,click,bottomtext$) x2 = StringWidth(bottomtext$) + 4 y2 = StringHeight(bottomtext$) + 4 Color 200, 200, 200 Rect x,y,x2,y2,1 Color 0, 0, 0 Rect x,y,x2,y2,0 If RectsOverlap(MouseX(),MouseY(),1,1,x,y,x2,y2) Then If MouseHit(1) Then check = 1 - check EndIf Text x+2, y+2, bottomtext$ Return check End Function Function Pulldown(x,y,click,pulldowntext1$, pulldowntext2$, pulldowntext3$, pulldowntext4$, pulldowntext5$) x2 = StringWidth(pulldowntext1$) + 4 y2 = StringHeight(pulldowntext1$) + 4 rahmenbreite = StringWidth(pulldowntext2$) If StringWidth(pulldowntext3$) > rahmenbreite Then rahmenbreite = StringWidth(pulldowntext3$) If StringWidth(pulldowntext4$) > rahmenbreite Then rahmenbreite = StringWidth(pulldowntext4$) If StringWidth(pulldowntext5$) > rahmenbreite Then rahmenbreite = StringWidth(pulldowntext5$) Color 230, 230, 230 ;Leiste Rect x-1,y-1,GraphicsWidth (),y2+1,1 Color 230, 230, 230 ;Eintrag Rect x,y,x2,y2,1 Color 0, 0, 0 Rect x,y,x2,y2,0 If pulldowntext2$ <> "" And click = 1 Then Color 230, 230, 230 Rect x,y+y2,rahmenbreite + 4,y2,1 Color 0, 0, 0 EndIf If pulldowntext2$ <> "" And click = 1 Then Color 230, 230, 230 Rect x,y+y2*2,rahmenbreite + 4,y2,1 Color 0, 0, 0 EndIf If pulldowntext2$ <> "" And click = 1 Then Color 230, 230, 230 Rect x,y+y2*3,rahmenbreite + 4,y2,1 Color 0, 0, 0 EndIf If pulldowntext2$ <> "" And click = 1 Then Color 230, 230, 230 Rect x,y+y2*4,rahmenbreite + 4,y2,1 Color 0, 0, 0 EndIf Color 0, 0, 0 Text x+2, y+2, pulldowntext1$ If click = 1 Then Color 0, 0, 0 Rect x,y+y2,rahmenbreite + 4,y2*4,0 Text x+2, y+2+y2, pulldowntext2$ Text x+2, y+2+y2*2, pulldowntext3$ Text x+2, y+2+y2*3, pulldowntext4$ Text x+2, y+2+y2*4, pulldowntext5$ EndIf If RectsOverlap(MouseX(),MouseY(),1,1,x,y,x2,y2) Then If click > 1 Then click = 0 Select click Case 1 If MouseHit(1) Then click = 0 Case 0 If MouseHit(1) Then click = 1 End Select EndIf If RectsOverlap(MouseX(),MouseY(),1,1,x,y+y2,rahmenbreite,y2) Then If MouseHit(1) Then click = 2 EndIf If RectsOverlap(MouseX(),MouseY(),1,1,x,y+y2*2,rahmenbreite,y2) Then If MouseHit(1) Then click = 3 EndIf If RectsOverlap(MouseX(),MouseY(),1,1,x,y+y2*3,rahmenbreite,y2) Then If MouseHit(1) Then click = 4 EndIf If RectsOverlap(MouseX(),MouseY(),1,1,x,y+y2*4,rahmenbreite,y2) Then If MouseHit(1) Then click = 5 EndIf Return click End Function Function Screensaver(status, bunt) If status = 0 Then SetBuffer FrontBuffer () ; Color 0, 0, 0 ; Rect 0,0,GraphicsWidth(),GraphicsHeight(),1 minuten = MilliSecs()/60000 mausx = MouseX() mausy = MouseY() FlushMouse While status = 0 If mausx <> MouseX() Or mausy <> MouseY() Or GetKey() <> 0 Or GetMouse() <> 0 Then status = 1 Color 250, 250, 250 If bunt = 1 Then Color Rnd(1, 250), Rnd(1, 250), Rnd(1, 250) Rect Rnd(1, GraphicsWidth()), Rnd(1, GraphicsHeight()), 5, 5, 1 reinigen = reinigen + 1 ;If MilliSecs()/60000 - minuten > 1 Then Color 0, 0, 0 ;If MilliSecs()/60000 - minuten > 1 Then Rect 0,0,GraphicsWidth,GraphicsHeight,1 If reinigen = 100000 Then Color 0, 0, 0 If reinigen = 100000 Then Rect 0,0,GraphicsWidth(),GraphicsHeight(),1 If reinigen = 100000 Then Delay 1000 If reinigen = 100000 Then reinigen = 0 Wend SetBuffer BackBuffer () EndIf Return status End Function Function sshot () screenshot_name = MilliSecs()/1000 SaveBuffer FrontBuffer(), screenshot_name +".bmp" End Function Function dialogbox$(x, y, breite, hoehe, fenster, Titel$, Text$, status$, nr, option1$, option2$) If status$ = "mini_maximize" Then fenster = 1 If status$ = "mini_maximize" Then x = 1 : y = GraphicsHeight () - 20 If status$ = "mini_maximize" Then breite = StringWidth(titel$) + 70 If status$ = "mini_maximize" And nr = 2 Then x = (GraphicsWidth () - StringWidth(titel$) - 70) /2 : y = GraphicsHeight () - 20 If status$ = "mini_maximize" And nr = 3 Then x = GraphicsWidth () - StringWidth(titel$) - 71 : y = GraphicsHeight () - 20 If status$ = "mini_maximize" And nr = 4 Then x = 1 : y = GraphicsHeight () - 40 If status$ = "mini_maximize" And nr = 5 Then x = (GraphicsWidth () - StringWidth(titel$) - 70) /2 : y = GraphicsHeight () - 40 If status$ = "mini_maximize" And nr = 6 Then x = GraphicsWidth () - StringWidth(titel$) - 71 : y = GraphicsHeight () - 40 If status$ = "full_window" Then fenster = 0 If status$ = "close" Then fenster = 1 aufloesungbreite = GraphicsWidth () If breite = 0 Then breite = StringWidth(Text$) ;Feld Autodimensionieren If hoehe = 0 Then hoehe = StringHeight(Text$) + 25 + 20 + 20 ;Zeile, Kopfleiste, OK-Button If aufloesungbreite < breite Then breite = aufloesungbreite schaltelementx = x+breite-20 Select fenster Case 1 If status$ <> "close" Then Color 0, 0, 128 Rect x, y, breite, 17, 1 ;Kopfleiste Color 215, 215, 215 Rect schaltelementx, y+1, 16, 14, 1 ;Schaltelement -oX Color 255, 255, 255 Rect schaltelementx, y+1, 16, 1, 0 Rect schaltelementx, y+1, 1, 14, 0 Color 190, 190, 190 Rect schaltelementx, y+1+14, 16, 1, 0 Rect schaltelementx+16, y+1, 1, 15, 0 Color 200, 200, 200 Rect schaltelementx+1, y+1+14-1, 14, 1, 0 Rect schaltelementx+15, y+2, 1, 13, 0 Color 0, 0, 0 Line schaltelementx+3, y+5, schaltelementx+12, y+1+11 Line schaltelementx+4, y+5, schaltelementx+13, y+1+11 Line schaltelementx+3, y+1+11, schaltelementx+12, y+5 Line schaltelementx+4, y+1+11, schaltelementx+13, y+5 Color 215, 215, 215 Rect schaltelementx-20, y+1, 16, 14, 1 ;Schaltelement2 -oX Color 255, 255, 255 Rect schaltelementx-20, y+1, 16, 1, 0 Rect schaltelementx-20, y+1, 1, 14, 0 Color 190, 190, 190 Rect schaltelementx-20, y+1+14, 16, 1, 0 Rect schaltelementx-4, y+1, 1, 15, 0 Color 200, 200, 200 Rect schaltelementx-19, y+1+14-1, 14, 1, 0 Rect schaltelementx-5, y+2, 1, 13, 0 Color 0, 0, 0 Rect schaltelementx-17, y+4, 11, 10, 0 Rect schaltelementx-17, y+5, 11, 1, 0 Color 215, 215, 215 Rect schaltelementx-40, y+1, 16, 14, 1 ;Schaltelement3 -oX Color 255, 255, 255 Rect schaltelementx-40, y+1, 16, 1, 0 Rect schaltelementx-40, y+1, 1, 14, 0 Color 190, 190, 190 Rect schaltelementx-40, y+1+14, 16, 1, 0 Rect schaltelementx-24, y+1, 1, 15, 0 Color 200, 200, 200 Rect schaltelementx-39, y+1+14-1, 14, 1, 0 Rect schaltelementx-25, y+2, 1, 13, 0 Color 0, 0, 0 Rect schaltelementx-37, y+12, 10, 1, 0 Rect schaltelementx-37, y+13, 10, 1, 0 Color 255, 255, 255 Text x, y, Titel$ EndIf Case 0 Color 215, 215, 215 Rect x, y, breite, hoehe, 1 ;Fenster Color 0, 0, 128 Rect x, y, breite, 17, 1 ;Kopfleiste Color 215, 215, 215 Rect schaltelementx, y+1, 16, 14, 1 ;Schaltelement -oX Color 255, 255, 255 Rect schaltelementx, y+1, 16, 1, 0 Rect schaltelementx, y+1, 1, 14, 0 Color 190, 190, 190 Rect schaltelementx, y+1+14, 16, 1, 0 Rect schaltelementx+16, y+1, 1, 15, 0 Color 200, 200, 200 Rect schaltelementx+1, y+1+14-1, 14, 1, 0 Rect schaltelementx+15, y+2, 1, 13, 0 Color 0, 0, 0 Line schaltelementx+3, y+5, schaltelementx+12, y+1+11 Line schaltelementx+4, y+5, schaltelementx+13, y+1+11 Line schaltelementx+3, y+1+11, schaltelementx+12, y+5 Line schaltelementx+4, y+1+11, schaltelementx+13, y+5 Color 200, 200, 200 Rect x+breite/2/2-StringWidth(option1$)/2-2, y+hoehe-30, StringWidth(option1$)+4, 20, 1 ;Option1 Color 0, 0, 0 Rect x+breite/2/2-StringWidth(option1$)/2-2, y+hoehe-30, StringWidth(option1$)+4, 20, 0 Text x+breite/2/2-StringWidth(option1$)/2, y+hoehe-30+3, option1$ Color 200, 200, 200 Rect x+breite/2+breite/2/2-StringWidth(option2$)/2-2, y+hoehe-30, StringWidth(option2$)+4, 20, 1 ;Option2 Color 0, 0, 0 Rect x+breite/2+breite/2/2-StringWidth(option2$)/2-2, y+hoehe-30, StringWidth(option2$)+4, 20, 0 Text x+breite/2+breite/2/2-StringWidth(option2$)/2, y+hoehe-30+3, option2$ Color 215, 215, 215 Rect schaltelementx-20, y+1, 16, 14, 1 ;Schaltelement2 -oX Color 255, 255, 255 Rect schaltelementx-20, y+1, 16, 1, 0 Rect schaltelementx-20, y+1, 1, 14, 0 Color 190, 190, 190 Rect schaltelementx-20, y+1+14, 16, 1, 0 Rect schaltelementx-4, y+1, 1, 15, 0 Color 200, 200, 200 Rect schaltelementx-19, y+1+14-1, 14, 1, 0 Rect schaltelementx-5, y+2, 1, 13, 0 Color 0, 0, 0 Rect schaltelementx-17, y+4, 11, 10, 0 Rect schaltelementx-17, y+5, 11, 1, 0 Color 215, 215, 215 Rect schaltelementx-40, y+1, 16, 14, 1 ;Schaltelement3 -oX Color 255, 255, 255 Rect schaltelementx-40, y+1, 16, 1, 0 Rect schaltelementx-40, y+1, 1, 14, 0 Color 190, 190, 190 Rect schaltelementx-40, y+1+14, 16, 1, 0 Rect schaltelementx-24, y+1, 1, 15, 0 Color 200, 200, 200 Rect schaltelementx-39, y+1+14-1, 14, 1, 0 Rect schaltelementx-25, y+2, 1, 13, 0 Color 0, 0, 0 Rect schaltelementx-37, y+12, 10, 1, 0 Rect schaltelementx-37, y+13, 10, 1, 0 Color 255, 255, 255 Text x, y, Titel$ Color 0, 0, 0 zeichenkette_breite = StringWidth(Text$) zeile = 25 start = 1 If zeichenkette_breite <= breite Then Text x, y+zeile, Text$ If zeichenkette_breite > breite Then schriftbreite = FontWidth() zeilenzeichen = breite / schriftbreite zeichenanzahl = Len (Text$) While zeichenanzahl > start Text2$ = Mid$ (Text$, start, zeilenzeichen) start = start + zeilenzeichen Text x, y+zeile, Text2$ zeile = zeile + 20 Wend EndIf End Select If MouseX() > schaltelementx-40 And MouseX() < schaltelementx-24 And MouseY() > y+1 And MouseY() < y+15 Then If MouseHit(1) = 1 Then status$ = "mini_maximize" ;- EndIf If MouseX() > schaltelementx-20 And MouseX() < schaltelementx-4 And MouseY() > y+1 And MouseY() < y+15 Then If MouseHit(1) = 1 Then status$ = "full_window" ;o EndIf If MouseX() > schaltelementx And MouseX() < schaltelementx+16 And MouseY() > y+1 And MouseY() < y+15 Then If MouseHit(1) = 1 Then status$ = "close" ;X EndIf If MouseX() > x+(breite-72)/2 And MouseX() < x+(breite-72)/2+72 And MouseY() > y+hoehe-30 And MouseY() < y+hoehe-10 Then If MouseHit(1) = 1 Then status$ = "ok" ;OK EndIf If MouseX() > x+breite/2/2-StringWidth(option1$)/2 And MouseX() < x+breite/2/2-StringWidth(option1$)/2+StringWidth(option1$) And MouseY() > y+hoehe-30 And MouseY() < y+hoehe-10 Then If MouseHit(1) = 1 Then status$ = "option1" ;Option1 EndIf If MouseX() > x+breite/2+StringWidth(option2$)/2 And MouseX() < x+breite/2+StringWidth(option2$)/2+StringWidth(option2$) And MouseY() > y+hoehe-30 And MouseY() < y+hoehe-10 Then If MouseHit(1) = 1 Then status$ = "option2" ;Option2 EndIf Color 255, 255, 255 Return status$ End Function