ColorDialog CodeSample - Selecting color
From Visual WebGui Wiki
| This article will have a few sections added to it soon, based on the following article type skeleton: NewCodeSampleTemplate |
Overview
An example on how you use the ColorDialog to pick a color. Note that the control is a DialogForm so the usage is similar to other such Forms in that you register a handler for the Closed event.
VB.NET Code
Imports Gizmox.WebGui.Forms Public Class Form1 Friend WithEvents ColorDialog1 As Gizmox.WebGui.Forms.ColorDialog Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.ColorDialog1 = New Gizmox.WebGui.Forms.ColorDialog ColorDialog1.ShowDialog() End Sub Private Sub ColorDialog1_Closed(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ColorDialog1.Closed If ColorDialog1.DialogResult = Gizmox.WebGui.Forms.DialogResult.OK Then MessageBox.Show("You selected " + ColorDialog1.Color.ToString()) End If End Sub End Class
C# Code
| The conversion of this code to C# has not been completed yet. Please feel free to contribute and add contents to the Wiki |
