请问:如何弹出windows的调色板
解决方案 »
- 用Graphics绘图如果控制字间距和文本的对齐?
- 求b/s、c/s混搭的聊天软件原理
- Chrome浏览器无法查看用ASPX开发的网站
- asp.net刚毕业找工作问题?
- 新人报到请求devexpress 9.1.2
- 如何在asp+sql中调用数据库的图片,产生连动效果
- 比如:一张图片长宽为:600x600转换--128x128、101x101、96x96这样可以不会变形,可转换成101x128、196x128等,即不正比的转换就变形!请
- 关于在线检测客户机的软件信息
- 我要将一个CheckBox设为不可见,但它所占的位置保留,怎么设置它的属性?
- 数据库链接不上
- SQL 2000 中 有一个书名字段 用VARCHAR 好还是 NVARCHAR ??
- 有关C#里头的换行?谢谢
什么意思?
在 ASP.NET 里?不可能吧
有关此类型所有成员的列表,请参阅 ColorBuilder 成员。
System.Object
System.Web.UI.Design.ColorBuilder
[Visual Basic]
NotInheritable Public Class ColorBuilder
[C#]
public sealed class ColorBuilder
[C++]
public __gc __sealed class ColorBuilder
[JScript]
public class ColorBuilder
线程安全
此类型的所有公共静态(Visual Basic 中为 Shared)成员对多线程操作而言都是安全的。但不保证任何实例成员是线程安全的。
备注
BuildColor 方法启动用于选择颜色值的用户界面。ColorBuilder 类不能在设计时环境外使用。ColorBuilder 需要 IWebFormsBuilderUIService(通常可在设计时在 Web 窗体项目中获得)。如果要生成 HTML 颜色字符串,可能需要实现一个方法,将 Color 对象的 RGB 值转换为与 HTML 兼容的 RRGGBB 格式字符串。如果打算使用控件来选择颜色或配置颜色,则可以为此生成一个用户界面,或者可以使用 PropertyGrid 控件,通过该控件使用默认的、具有颜色选择界面的 ColorEditor 来编辑 Color 属性。
示例
[Visual Basic]
' Create a parent control.
Dim c As New System.Windows.Forms.Control()
c.CreateControl()' Launch the Color Builder using the specified control
' parent and an initial HTML format ("RRGGBB") color string.
System.Web.UI.Design.ColorBuilder.BuildColor(Me.Component, c, "405599")
[C#]
// Create a parent control.
System.Windows.Forms.Control c = new System.Windows.Forms.Control();
c.CreateControl(); // Launch the Color Builder using the specified control
// parent and an initial HTML format ("RRGGBB") color string.
System.Web.UI.Design.ColorBuilder.BuildColor(this.Component, c, "405599");
[C++]
// Create a parent control.
System::Windows::Forms::Control* c = new System::Windows::Forms::Control();
c->CreateControl();// Launch the Color Builder using the specified control
// parent and an initial HTML format (S"RRGGBB") color String*.
System::Web::UI::Design::ColorBuilder::BuildColor(this->Component, c, S"405599");
[Visual Basic]
' Example designer provides a designer verb menu command to launch the
' BuildColor method of the ColorBuilder.
Public Class ColorBuilderDesigner
Inherits System.Web.UI.Design.UserControlDesigner Public Sub New()
End Sub ' Provides a designer verb menu command for invoking the BuildColor
' method of the ColorBuilder.
Public Overrides ReadOnly Property Verbs() As System.ComponentModel.Design.DesignerVerbCollection
Get
Dim dvc As New DesignerVerbCollection()
dvc.Add(New DesignerVerb("Launch Color Builder UI", New EventHandler(AddressOf Me.launchColorBuilder)))
Return dvc
End Get
End Property ' This method handles the "Launch Color Builder UI" menu command.
' Invokes the BuildColor method of the System.Web.UI.Design.ColorBuilder.
Private Sub launchColorBuilder(ByVal sender As Object, ByVal e As EventArgs)
' Create a parent control.
Dim c As New System.Windows.Forms.Control()
c.CreateControl() ' Launch the Color Builder using the specified control
' parent and an initial HTML format ("RRGGBB") color string.
System.Web.UI.Design.ColorBuilder.BuildColor(Me.Component, c, "405599")
End SubEnd Class' Example web control displays the value of its text property.
' This control is associated with the ColorBuilderDesigner.
<DesignerAttribute(GetType(ColorBuilderDesigner), GetType(IDesigner))> _
Public Class ColorBuilderControl
Inherits System.Web.UI.WebControls.WebControl
Private [text_] As String <Bindable(True), Category("Appearance"), DefaultValue("")> _
Public Property [Text]() As String
Get
Return [text_]
End Get Set(ByVal Value As String)
[text_] = Value
End Set
End Property Protected Overrides Sub Render(ByVal output As HtmlTextWriter)
output.Write([Text])
End SubEnd Class
<head>
<title>choose your color</title>
<script>
function callcolor()
{
var myresult;
myresult = dlghelper.choosecolordlg()
document.bgcolor = myresult
alert(myresult);
}
</script>
</head>
<body>
<object id=dlghelper width="0px" height="0px"
classid="clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b">
</object>
<button onclick="callcolor()">use color dialog</button>
</body>
</html>
不过好象不完全。