N N1c0_ds Active Member Licensed User Jan 7, 2009 #1 Is there a way to store a color as a variable? I want to save color information in a text file and then set it to a control at launch. Any idea on how I could do that?
Is there a way to store a color as a variable? I want to save color information in a text file and then set it to a control at launch. Any idea on how I could do that?
klaus Expert Licensed User Longtime User Jan 7, 2009 #2 No problem: For example: Col=Button1.Color in the Save routine FileWrite(c1,Col) in the Load routine Col=FileRead(c1) Panel1.Color=Col Best regards.
No problem: For example: Col=Button1.Color in the Save routine FileWrite(c1,Col) in the Load routine Col=FileRead(c1) Panel1.Color=Col Best regards.
derez Expert Licensed User Longtime User Jan 18, 2009 #4 Getting the color coordinates Is there a way to get by code the color coordinates (R,G,B) of a color which is defined as a single (color) variable ? for example - how do you know the RGB of cYellow ? thanks
Getting the color coordinates Is there a way to get by code the color coordinates (R,G,B) of a color which is defined as a single (color) variable ? for example - how do you know the RGB of cYellow ? thanks
agraham Expert Licensed User Longtime User Jan 18, 2009 #5 Help->MainHelp->Keywords->General B4X: Sub Globals Dim Type (R,G,B) clr End Sub Sub App_Start Form1.Show clr() = GetRGB(Form1.Color) Msgbox("Red=" & clr.R & " Green=" & clr.G & " Blue=" & clr.B) End Sub
Help->MainHelp->Keywords->General B4X: Sub Globals Dim Type (R,G,B) clr End Sub Sub App_Start Form1.Show clr() = GetRGB(Form1.Color) Msgbox("Red=" & clr.R & " Green=" & clr.G & " Blue=" & clr.B) End Sub