Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Share your Components here
#17
Nick, getting the hex color codes is not hard at all.
Fist you will need to add:
  • QColorPalette
Optional:
  • 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
The string named "color string" is your hex color code.
I hopes this helps you <!-- sBig Grin --><img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt="Big Grin" title="Very Happy" /><!-- sBig Grin -->
--VBCodeGeek--


Messages In This Thread
Share your Components here - by xolara - 03-23-2011, 12:12 PM
Re: Share your Components here - by xolara - 03-25-2011, 12:46 AM
Re: Share your Components here - by yjy1110 - 03-25-2011, 08:58 PM
Re: Share your Components here - by xolara - 03-25-2011, 11:29 PM
Re: Share your Components here - by yjy1110 - 03-25-2011, 11:44 PM
Re: Share your Components here - by Gamester699 - 05-06-2011, 05:24 PM
Re: Share your Components here - by xolara - 05-12-2011, 07:07 AM
Re: Share your Components here - by Gamester699 - 11-03-2011, 12:21 PM
Re: Share your Components here - by xolara - 11-07-2011, 10:20 AM
Re: Share your Components here - by xolara - 11-08-2011, 07:22 AM
Re: Share your Components here - by vbcodegeek - 11-08-2011, 04:34 PM
Re: Share your Components here - by vbcodegeek - 11-09-2011, 03:27 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)