How to select back color of your form in run time using Common Dialog
Posted on January 5, 2009
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 'Forms - How to select back color of your form in run time using Common Dialog Option Explicit 'Add a Common Dialog Control to your form (Choose Project -> Components, then 'select the Microsoft Common Dialog Control Check Box, and press OK) Private Sub Command1_Click() CommonDialog1.CancelError = True On Error GoTo CancelPressed CommonDialog1.ShowColor Form1.BackColor = CommonDialog1.Color Exit Sub CancelPressed: MsgBox "Cancel button Pressed" End Sub |