本文整理汇总了VB.NET中System.Windows.Forms.ColorDialog.CustomColors属性的典型用法代码示例。如果您正苦于以下问题:VB.NET ColorDialog.CustomColors属性的具体用法?VB.NET ColorDialog.CustomColors怎么用?VB.NET ColorDialog.CustomColors使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类System.Windows.Forms.ColorDialog 的用法示例。
在下文中一共展示了ColorDialog.CustomColors属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的VB.NET代码示例。
示例1: ColorDialog
Dim MyDialog = New ColorDialog()
' Allows the user to select or edit a custom color.
MyDialog.AllowFullOpen = True
' Assigns an array of custom colors to the CustomColors property.
MyDialog.CustomColors = New Integer() {6916092, 15195440, 16107657, 1836924, _
3758726, 12566463, 7526079, 7405793, 6945974, 241502, 2296476, 5130294, _
3102017, 7324121, 14993507, 11730944}
' Allows the user to get help. (The default is false.)
MyDialog.ShowHelp = True
' Sets the initial color select to the current text color,
' so that if the user cancels out, the original color is restored.
MyDialog.Color = Me.BackColor
MyDialog.ShowDialog()
Me.BackColor = MyDialog.Color
开发者ID:VB.NET开发者,项目名称:System.Windows.Forms,代码行数:15,代码来源:ColorDialog.CustomColors
示例2: ColorDialogWithCustomColorSettings
' 导入命名空间
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.OK) Then
Console.WriteLine(ColorDB.Color)
End If
End Sub
End class
开发者ID:VB程序员,项目名称:System.Windows.Forms,代码行数:20,代码来源:ColorDialog.CustomColors
注:本文中的System.Windows.Forms.ColorDialog.CustomColors属性示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论