posts - 124,  comments - 29,  trackbacks - 0
字体对话框,包括字体和字体颜色的设置
            FontDialog fd = new FontDialog();
            fd.ShowColor = true;
            fd.Font = txtCmdInput.Font;
            fd.Color = txtCmdInput.ForeColor;
            if(fd.ShowDialog()!= DialogResult.Cancel)
            {
                txtCmdInput.Font = fd.Font;
                txtCmdInput.ForeColor = fd.Color;
            }

颜色对话框,设置控件背景色
            ColorDialog cd = new ColorDialog();
            cd.Color = txtCmdInput.BackColor;
            if(cd.ShowDialog()!= DialogResult.Cancel)
            {
                txtCmdInput.BackColor = cd.Color;
            }
posted on 2008-09-16 15:21 天书 阅读(647) 评论(0)  编辑 收藏 引用

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理



<2010年1月>
272829303112
3456789
10111213141516
17181920212223
24252627282930
31123456

常用链接

留言簿(5)

随笔档案

文章分类

文章档案

好友的Bolg

搜索

  •  

最新评论

阅读排行榜

评论排行榜