请问:如何弹出windows的调色板

goodsun1 2005-03-21 05:51:22
请问:如何弹出windows的调色板
...全文
149 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
slhuang 2005-03-21
  • 打赏
  • 举报
回复
楼上的插入的是OCX的吧。
不过好象不完全。
upshania 2005-03-21
  • 打赏
  • 举报
回复
<html>
<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>
rickjelly2004 2005-03-21
  • 打赏
  • 举报
回复
在设计时提供一个 HTML 颜色字符串生成器,供用户选择颜色使用。
有关此类型所有成员的列表,请参阅 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 Sub

End 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 Sub

End Class
wq2000 2005-03-21
  • 打赏
  • 举报
回复
up
DeltaCat 2005-03-21
  • 打赏
  • 举报
回复
除非你用 客户端 控件
DeltaCat 2005-03-21
  • 打赏
  • 举报
回复
?
什么意思?
在 ASP.NET 里?

不可能吧
已经博主授权,源码转载自 https://pan.quark.cn/s/e577710b7191 ### 解决Win10系统中Word文件图标显示不正常问题 #### 问题描述 在Windows 10操作系统中,部分用户遇到Word文档图标呈现非正常状态的问题。具体表现为:本应展示为Microsoft Word图标的DOC或DOCX文件,在系统中却呈现为常规的文本文件图标。这种现象不仅降低了用户的视觉体验,还可能引发一定的操作不便。 #### 解决方案 ##### 方法一:借助注册表编辑来纠正图标显示异常 1. **进行注册表备份**:为了保障系统的稳定性,在开展任何注册表修改之前,必须对注册表进行备份。可以通过“导出”功能来达成备份目的。 - 启动“运行”对话框(快捷键:`Windows + R`),键入`regedit`,随后按回车键进入注册表编辑界面。 - 在注册表编辑界面中,找到菜单栏里的“文件”选项,点击后选择“导出”,依照提示完成注册表备份。 2. **移除相关注册表项**: - 在`HKEY_CLASSES_ROOT`下,删除以下四个注册表项: - `.doc` - `.docx` - `Word.Document.8` - `Word.Document.12` - 在`HKEY_LOCAL_MACHINE\SOFTWARE\Classes`下,同样移除上述四个注册表项。 3. **重新启动计算机**:执行完上述步骤后,重新启动计算机以使修改生效。 #### 方法二:通过调整文件关联来纠正图标显示异常 如果第一种方法未能解决难题,则可以尝试调整文件的关联方式,具体步骤如下: 1. **移除文件关联**: - 在`HKEY_CLASSES_ROOT`下删除`....

62,269

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧