摘要: 用try catch来实现 try { int i = Convert.ToInt32((textBox1.Text)); BtnOK.Enabled = true; } catch (System.Exception ex) ... 阅读全文
posted @ 2013-11-27 20:19 XE2011 阅读(211) 评论(0) 推荐(0)
摘要: 使用private void button1_Click(object sender, EventArgs e){ RichTextBoxCtrl.richTextBoxFontClass r = new RichTextBoxCtrl.richTextBoxFontClass(); r.richTextBox = richTextBox1; r.ToggleBold();}using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows... 阅读全文
posted @ 2013-11-27 16:54 XE2011 阅读(297) 评论(0) 推荐(0)
摘要: 执行一次设置选中的字体样式 再执行一次恢复正常 //粗体 public void ToggleBold(){ if (richTextBox1.SelectionFont == null) richTextBox1.SelectionFont = richTextBox1.Font; FontStyle style = richTextBox1... 阅读全文
posted @ 2013-11-27 16:37 XE2011 阅读(796) 评论(0) 推荐(0)
摘要: http://blog.csdn.net/thirdapple/article/details/2755684 附件 http://files.cnblogs.com/xe2011/CSharpWinForm_WM_NCACTIVATE.rar 这个效果就像 你单击Combobox 下拉按钮或者菜单 主窗体不会失去焦点一样 Form1 using System;... 阅读全文
posted @ 2013-11-27 13:01 XE2011 阅读(466) 评论(0) 推荐(0)
摘要: 设置和获取选中的样式为 1. 2. 3. #region 数字序列 1. 2. 3. 4. 5. ... private bool bOrder = false; public bool SelectionOrderList { get { return ( (GetSelectionParaformat2wNumbering() == Paraformat2Numbering.ArabicNumbers) && ... 阅读全文
posted @ 2013-11-27 11:44 XE2011 阅读(358) 评论(0) 推荐(0)