以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  关于颜色拾取框  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=71889)

--  作者:cyl123
--  发布时间:2015/7/20 10:25:00
--  关于颜色拾取框
关于颜色拾取框colorDialog
代码如下:
If e.Col.Name="单元格颜色" Then
Dim cd As new system.windows.forms.colorDialog
cd.ShowDialog
cd.
Dim c1 As Color = cd.Color
e.Row(e.Col.Name)= c1.toargb
End If

有个问题,如果打开颜色拾取框,不作选择,同样会赋值(默认值黑色)。如何使不选择颜色时,不赋值?

--  作者:大红袍
--  发布时间:2015/7/20 10:45:00
--  
Dim cd As new system.windows.forms.colorDialog
If cd.ShowDialog = 1 Then
    msgbox(cd.Color.toargb)
End If

--  作者:cyl123
--  发布时间:2015/7/20 10:51:00
--  
谢谢大红袍
不另开贴了,继续请假个问题。
如何获取狐表所有字体的集合?

--  作者:大红袍
--  发布时间:2015/7/20 10:52:00
--  
Dim MyFont As New InstalledFontCollection()
Dim MyFontFamilies As FontFamily() = MyFont.Families
Dim Count As Integer = MyFontFamilies.Length
For i As Integer = 0 To Count - 1
    Dim FontName As String = MyFontFamilies(i).Name
    output.show(fontName)
Next