Controls:
-Command Button (1)
-Common Dialog (1)
For common dialog press ctrl+t then select "Microsoft Common Dialog Control" or something like that.
1. Place the controls...anyhwere.
2. Name your command1 ColorButton, and choose a good caption for it like "Choose Skin" or "Change Background". Users will unfortunately not be able to change the caption themselves.
3. Plob this whole slab of code into your user control's code:
When colorbutton gets clicked, the commondialog's color dialog pops up. The color selected is then stored. That last part is the fix to allow resising when a user uses the control in their applications.
4. EXAMPLE USAGE:
-Command Button (1)
-Common Dialog (1)
For common dialog press ctrl+t then select "Microsoft Common Dialog Control" or something like that.
1. Place the controls...anyhwere.
2. Name your command1 ColorButton, and choose a good caption for it like "Choose Skin" or "Change Background". Users will unfortunately not be able to change the caption themselves.
3. Plob this whole slab of code into your user control's code:
Code:
Event Click()
Private Sub ColorButton_Click()
CommonDialog1.ShowColor
RaiseEvent Click
End Sub
Public Property Get Color() As Long
Color = CommonDialog1.Color
End Property
Private Sub UserControl_Resize()
ColorButton.Move 0, 0, ScaleWidth, ScaleHeight
End Sub
When colorbutton gets clicked, the commondialog's color dialog pops up. The color selected is then stored. That last part is the fix to allow resising when a user uses the control in their applications.
4. EXAMPLE USAGE:
Code:
Form1.BackColor = (control name).Color














