dim miPanel as panel
Dialog.SelectColor()
miPanel.Background = dialog.Color
VBox1 As VBox
VBox2 As VBox
Splitter1 As Splitter
Label1 As Label
Label2 As Label
Label3 As Label
ColorChooser1 As ColorChooser
Public Sub ColorChooser1_Change()
Dim hColorInfo As ColorInfo
Me.Background = ColorChooser1.Value
hColorInfo = Color[ColorChooser1.Value]
Label1.Text = "Me.Background = " & Str(ColorChooser1.Value)
Label2.Text = "Me.Background = &h" & Str(Hex(ColorChooser1.Value))
Label3.Text = "Me.Background = Color.RGB(" & Str(hColorInfo.Red) & "," & Str(hColorInfo.Green) & "," & Str(hColorInfo.Blue) & ")"
End
Public Sub Form_Open()
Me.H = 400
Me.W = 800
Me.Arrangement = Arrange.Vertical
Me.Padding = 5
Me.Text = "Color"
Splitter1 = New Splitter(Me)
Splitter1.Expand = True
Splitter1.Spacing = True
VBox1 = New VBox(Splitter1)
VBox1.Expand = True
VBox2 = New VBox(Splitter1)
VBox2.Expand = True
Label1 = New Label(VBox1)
Label1.Font.Bold = True
Label1.H = 28
Label2 = New Label(VBox1)
Label2.Font.Bold = True
Label2.H = 28
Label3 = New Label(VBox1)
Label3.Font.Bold = True
Label3.H = 28
ColorChooser1 = New ColorChooser(VBox2) As "ColorChooser1"
ColorChooser1.Expand = True
Splitter1.Layout = [40, 60]
ColorChooser1.Value = 28900000
End