No fatto una picola palette di colori da cui sceglierne 1no per il sottofondo della finestra. Purtroppo mi appare sempre il nero e non capisco perchè. Potete aiutarmi?
GraphicsWindow.Top = 1
GraphicsWindow.Left = 1
GraphicsWindow.Width = 1400
GraphicsWindow.Height = 1400
GraphicsWindow.MouseDown = onmousedown
XXX = GraphicsWindow.MouseX
yYY = GraphicsWindow.MouseY
x = XXX
y = yyy
' GraphicsWindow.BackgroundColor = "BLACK"
graphicsWindow.BrushColor = "black"
GraphicsWindow.fillRectangle(1050,100,255,275)
GraphicsWindow.PenColor = "green"
GraphicsWindow.PenWidth = 5
GraphicsWindow.DrawRectangle(1060,150,50,50)
GraphicsWindow.BrushColor = "blue"
GraphicsWindow.fillRectangle(1120,150,50,50)
GraphicsWindow.BrushColor = "violet"
GraphicsWindow.fillRectangle(1180,150,50,50)
GraphicsWindow.BrushColor = "darkviolet"
GraphicsWindow.fillRectangle(1240,150,50,50)
GraphicsWindow.BrushColor = "green"
GraphicsWindow.fillRectangle(1060,210,50,50)
GraphicsWindow.BrushColor = "yellow"
GraphicsWindow.fillRectangle(1120,210,50,50)
GraphicsWindow.BrushColor = "red"
GraphicsWindow.fillRectangle(1240,210,50,50)
GraphicsWindow.BrushColor = "orange"
GraphicsWindow.fillRectangle(1180,210,50,50)
GraphicsWindow.BrushColor = "lime"
GraphicsWindow.fillRectangle(1060,270,50,50)
GraphicsWindow.BrushColor = "brown"
GraphicsWindow.fillRectangle(1120,270,50,50)
GraphicsWindow.BrushColor = "gray"
GraphicsWindow.fillRectangle(1180,270,50,50)
GraphicsWindow.BrushColor = "darkgray"
GraphicsWindow.fillRectangle(1240,270,50,50)
Sub onmousedown
If x > 1050 And x < 1200 And y > 150 And y < 200 Then
COLORE = "black"
GraphicsWindow.PenWidth = 1
GraphicsWindow.BrushColor = "black"
GraphicsWindow.fillrectangle(1090,350,50,10)
GraphicsWindow.pencolor = "green"
GraphicsWindow.Drawrectangle(1090,350,50,10)
GraphicsWindow.BackgroundColor = "blue" ' COLORE '"Black"
EndIf
If x > 1110 And x < 1160 And y > 150 And y < 200 Then
COLORE = "blue"
GraphicsWindow.PenWidth = 1
GraphicsWindow.pencolor = "green"
GraphicsWindow.Drawrectangle(1090,350,50,10)
GraphicsWindow.BrushColor = "blue"
GraphicsWindow.fillrectangle(1090,350,50,10)
GraphicsWindow.BackgroundColor = COLORE '"blue"
EndIf
If x > 1170 And x < 1210 And y > 150 And y < 200 Then
COLORE = "violet"
GraphicsWindow.PenWidth = 1
GraphicsWindow.pencolor = "green"
GraphicsWindow.Drawrectangle(1090,350,50,10)
GraphicsWindow.BrushColor = "violet"
GraphicsWindow.fillrectangle(1090,350,50,10)
GraphicsWindow.BackgroundColor = "violet"
EndIf
If x > 1230 And x < 1280 And y > 150 And y < 200 Then
COLORE = "darkviolet"
GraphicsWindow.PenWidth = 1
GraphicsWindow.pencolor = "green"
GraphicsWindow.Drawrectangle(1090,350,50,10)
GraphicsWindow.BrushColor = "darkviolet"
GraphicsWindow.fillrectangle(1090,350,50,10)
GraphicsWindow.BackgroundColor = "darkviolet"
EndIf
If x > 1050 And x < 1200 And y > 210 And y < 260 Then
COLORE = "green"
GraphicsWindow.PenWidth = 1
GraphicsWindow.pencolor = "white"
GraphicsWindow.Drawrectangle(1090,350,50,10)
GraphicsWindow.BrushColor = "green"
GraphicsWindow.fillrectangle(1090,350,50,10)
GraphicsWindow.BackgroundColor = "green"
EndIf
If x > 1100 And x < 1160 And y > 210 And y < 260 Then
COLORE = "yellow"
GraphicsWindow.PenWidth = 1
GraphicsWindow.pencolor = "green"
GraphicsWindow.Drawrectangle(1090,350,50,10)
GraphicsWindow.BrushColor = "yellow"
GraphicsWindow.fillrectangle(1090,350,50,10)
GraphicsWindow.BackgroundColor = "yellow"
EndIf
If x > 1170 And x < 1210 And y > 210 And y < 260 Then
COLORE = "orange"
GraphicsWindow.PenWidth = 1
GraphicsWindow.pencolor = "green"
GraphicsWindow.Drawrectangle(1090,350,50,10)
GraphicsWindow.BrushColor = "orange"
GraphicsWindow.fillrectangle(1090,350,50,10)
GraphicsWindow.BackgroundColor = "orange"
EndIf
If x > 1230 And x < 1280 And y > 210 And y < 260 Then
COLORE = "red"
GraphicsWindow.PenWidth = 1
GraphicsWindow.pencolor = "green"
GraphicsWindow.Drawrectangle(1090,350,50,10)
GraphicsWindow.BrushColor = "red"
GraphicsWindow.fillrectangle(1090,350,50,10)
EndIf
If x > 1050 And x < 1200 And y > 270 And y < 320 Then
COLORE = "lime"
GraphicsWindow.PenWidth = 1
GraphicsWindow.pencolor = "lime"
GraphicsWindow.drawrectangle(1090,350,50,10)
GraphicsWindow.pencolor = "lime"
GraphicsWindow.fillrectangle(1090,350,50,10)
GraphicsWindow.BackgroundColor = "lime"
EndIf
If x > 1110 And x < 1260 And y > 270 And y < 320 Then
COLORE = "brown"
GraphicsWindow.PenWidth = 1
GraphicsWindow.pencolor = "green"
GraphicsWindow.Drawrectangle(1090,350,50,10)
GraphicsWindow.BrushColor = "brown"
GraphicsWindow.fillrectangle(1090,350,50,10)
GraphicsWindow.BackgroundColor = "Brown"
EndIf
If x > 1170 And x < 1210 And y > 270 And y < 320 Then
COLORE = "darkgray"
GraphicsWindow.PenWidth = 1
GraphicsWindow.pencolor = "green"
GraphicsWindow.Drawrectangle(1090,350,50,10)
GraphicsWindow.BrushColor = "darkgray"
GraphicsWindow.fillrectangle(1090,350,50,10)
EndIf
If x > 1230 And x < 1280 And y > 270 And y < 320 Then
COLORE = "gray"
GraphicsWindow.PenWidth = 1
GraphicsWindow.pencolor = "green"
GraphicsWindow.Drawrectangle(1090,350,50,10)
GraphicsWindow.BrushColor = "gray"
GraphicsWindow.fillrectangle(1090,350,50,10)
GraphicsWindow.BackgroundColor = "gray"
EndIf
GraphicsWindow.BrushColor = colore
GraphicsWindow.FillRectangle(100,100,100,100)
GraphicsWindow.BackgroundColor = colore
endsub