11-09-2011, 03:27 PM
Nick, getting the hex color codes is not hard at all.
Fist you will need to add:
You may move the controls around on your form, and size them. Get them where you want.
Next comes the code. All you should need to do is copy and paste this code into your project
The string named "color string" is your hex color code.
I hopes this helps you <!-- s --><img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt="" title="Very Happy" /><!-- s -->
Fist you will need to add:
- QColorPalette
- QColorDisplay
You may move the controls around on your form, and size them. Get them where you want.
Next comes the code. All you should need to do is copy and paste this code into your project
Code:
Imports System.Drawing
Public Class ColorForm
Private Sub ColorButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Colorbutton.Click
Dim x As String = QColorPalette1.CurrentColor.ToRGB()
Dim myColor As Drawing.Color = Drawing.Color.FromArgb(x)
Dim colorString As String
colorString = String.Format("#{0:X2}{1:X2}{2:X2}", myColor.R, myColor.G, myColor.B)
QColorDisplay1.CurrentColor = QColorPalette1.CurrentColor
End Sub
End Class
I hopes this helps you <!-- s --><img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt="" title="Very Happy" /><!-- s -->
--VBCodeGeek--