以下是引用hanxuntx在2013-5-16 16:44:00的发言:
其实我想说让老大 在 SetError 函数加个颜色参数 那么我们就可以绘制任意颜色的标志了 哪用途广多了
百度一下,
将 HTML 颜色表示形式翻译成 GDI+ Color 结构。
ColorTranslator.FromHtml 方法可以設置顏色的,
請Bin老師"翻譯"成FT可用的代碼
命名空间: System.Drawing
程序集: System.Drawing(在 System.Drawing.dll 中)
声明
Public
Shared
Function FromHtml ( _
htmlColor As
String _
) As Color
用法
Dim htmlColor As
String
Dim returnValue As Color
returnValue = ColorTranslator.FromHtml(htmlColor)
Public
Sub FromHtml_Example(ByVal e As PaintEventArgs)
' Create a string representation of an HTML color.
Dim htmlColor As
String = "Blue"
' Translate htmlColor to a GDI+ Color structure.
Dim myColor As Color = ColorTranslator.FromHtml(htmlColor)
' Fill a rectangle with myColor.
e.Graphics.FillRectangle(New SolidBrush(myColor), 0, 0, 100, 100)
End
Sub
[此贴子已经被作者于2013-5-16 17:21:20编辑过]