上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 49 下一页
摘要: 在VS2008中做的附件:http://ys-e.ys168.com/2.0/276581430/j4G4J63367LMMJUJjsgW/CSHARP_WinCtrl21t_2014%E5%B9%B45%E6%9C%8831%E6%97%A592228.rar描述:文件以RTF格式保存在本地可以用... 阅读全文
posted @ 2013-11-29 12:23 XE2011 阅读(1354) 评论(1) 推荐(0)
摘要: 用try catch来实现 try { int i = Convert.ToInt32((textBox1.Text)); BtnOK.Enabled = true; } catch (System.Exception ex) ... 阅读全文
posted @ 2013-11-27 20:19 XE2011 阅读(213) 评论(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 阅读(468) 评论(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 阅读(359) 评论(0) 推荐(0)
摘要: 附件http://files.cnblogs.com/xe2011/CSharpWinForm_richTextBoxPrintClass.rar在窗体上一个Richtextbox 控件 和3个按钮调用页面设置 private void btnPageSetup_Click(object sender, EventArgs e) { richTextBoxPrintClass r = new richTextBoxPrintClass(); r.richTextBox = richTextBox1; r.Show... 阅读全文
posted @ 2013-11-26 21:40 XE2011 阅读(896) 评论(0) 推荐(0)
摘要: 附件http://files.cnblogs.com/xe2011/CSHARP_RichtextBox_PRINT.rar打印详情http://support.microsoft.com/kb/812425/zh-cn 阅读全文
posted @ 2013-11-26 21:02 XE2011 阅读(337) 评论(0) 推荐(0)
摘要: private void Form1_Load(object sender, EventArgs e) { richTextBox1.AllowDrop = true; richTextBox1.EnableAutoDragDrop = true; } 阅读全文
posted @ 2013-11-26 20:40 XE2011 阅读(368) 评论(0) 推荐(0)
摘要: 附件http://files.cnblogs.com/xe2011/ReadAndSaveTreeViewState.rar保存和读取TreeView展开的状态 节点{ImageIndex,IsExpland,Position,Tag,Text } //加载 private void buttonLoad_Click(object sender, EventArgs e) { treeView1.Focus(); string xmlFileName = "TreeView.xml"; if (System.IO... 阅读全文
posted @ 2013-11-26 16:12 XE2011 阅读(2413) 评论(0) 推荐(0)
摘要: http://files.cnblogs.com/xe2011/CustomRichTextBox_HideCaret.rarrichTextBox能高亮选择,光标仍在,没有光标闪烁把重RichTextBox类去除闪烁光标 http://msdn.microsoft.com/en-us/library/windows/desktop/ms648403%28v=vs.85%29.aspxusing System;using System.Windows.Forms;using System.Runtime.InteropServices;namespace WindowsFormsApplica 阅读全文
posted @ 2013-11-26 11:20 XE2011 阅读(3186) 评论(0) 推荐(0)
摘要: 编辑一下程序然后 手动打开EXE 能实现 自己关闭自己接着打开自己 private void button1_Click(object sender, EventArgs e){ Close(); string s = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName; S... 阅读全文
posted @ 2013-11-25 21:06 XE2011 阅读(217) 评论(0) 推荐(0)
摘要: FolderBrowserDialogfolderBrowserDialog1=newFolderBrowserDialog();folderBrowserDialog1.Description="请选择一个文件夹";if(folderBrowserDialog1.ShowDialog()==DialogResult.OK)MessageBox.Show(folderBrowserDialog1.... 阅读全文
posted @ 2013-11-25 15:31 XE2011 阅读(187) 评论(0) 推荐(0)
摘要: 通过这个提示可以以快速找到问题 阅读全文
posted @ 2013-11-25 14:45 XE2011 阅读(158) 评论(0) 推荐(0)
摘要: privatevoidbutton1_Click(objectsender,EventArgse){strings="是否要删除以下文件?\n";for(inti=0;i15){//产生1...10for(inti=1;i<11;i++){s2+=String.Format("{0,3}.{1}\n",i,str);}s2+="\n";s2+="...\n";s2+="\n";s2+=s1;... 阅读全文
posted @ 2013-11-25 13:44 XE2011 阅读(172) 评论(0) 推荐(0)
上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 49 下一页