' Using the Common Dialog control - ShowColor
'
' Choosing colors with the CommonDialog control
'
' 1) Create a new project. Form1 will be created by default.
' 2) Select Project|Components from the menu and add the Microsoft Common Dialog Control to the project.
' 3) Add a Common Dialog Control to the form.
' 4) Add a Command Button to the form.
' 5) Paste the following code into the declarations section of Form1:
' --- Begin code for Form1
Option Explicit
Private Sub Form_Load()
Me.Caption = "CommonDialog Example - ShowColor"
Command1.Caption = "&ShowColor"
End Sub
Private Sub Command1_Click()
CommonDialog1.ShowColor
Me.BackColor = CommonDialog1.Color
End Sub
' --- End code for Form1 ---