Color Dialog with custom color settings : ColorDialog « GUI « VB.Net Tutorial

Home
VB.Net Tutorial
1.Language Basics
2.Data Type
3.Operator
4.Statements
5.Date Time
6.Class Module
7.Development
8.Collections
9.Generics
10.Attributes
11.Event
12.LINQ
13.Stream File
14.GUI
15.GUI Applications
16.Windows Presentation Foundation
17.2D Graphics
18.I18N Internationlization
19.Reflection
20.Regular Expressions
21.Security
22.Socket Network
23.Thread
24.Windows
25.XML
26.Database ADO.net
27.Design Patterns
VB.Net
VB.Net by API
VB.Net Tutorial » GUI » ColorDialog 
14.67.4.Color Dialog with custom color settings
Imports System.IO
Imports System.Windows.Forms

public class ColorDialogWithCustomColorSettings
   public Shared Sub Main
      Dim ColorDB As New ColorDialog()

        ColorDB.CustomColors = New Integer() _
        {&HFF00FF, &HFF0000, &HF0F0F0, &HF0F0F0, _
         &HAAAAAA, &HBBBBBB, &HCCCCCC, &HDDDDDD, _
         &HEEEEEE, &HAAA0A0, &HBBB0B0, &HCCC0C0, _
         &HDDD0D0, &H111111, &H333333, &H888888}

        If (ColorDB.ShowDialog() = DialogResult.OKThen
            Console.WriteLine(ColorDB.Color)
        End If

   End Sub
End class
14.67.ColorDialog
14.67.1.Set ColorDialog propertiesSet ColorDialog properties
14.67.2.ColorDialog: Named Color or R G B valueColorDialog: Named Color or R G B value
14.67.3.Use Color Dialog to set ColorUse Color Dialog to set Color
14.67.4.Color Dialog with custom color settings
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.