上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 49 下一页
摘要: 附件 http://files.cnblogs.com/xe2011/CSharpTextRuler.rar原文 http://www.codeproject.com/Articles/22783/Advanced-Text-Editor-with-Ruler原文的附件:http://files.cnblogs.com/xe2011/TextRuler.rar 1 using System; 2 using System.Collections.Generic; 3 using System.ComponentModel; 4 using System.Drawing; 5 usin... 阅读全文
posted @ 2013-12-11 12:39 XE2011 阅读(367) 评论(0) 推荐(0) 编辑
摘要: 附件:http://files.cnblogs.com/xe2011/WindowsFormsFontCombox.rar 自定义组件的做法 1 新个新的工程,先做一个想要达到效果的样子来。 2 然后转到 InitializeComponent(); 把相关代码复制过来 3 选中工程添加一个类然后继 阅读全文
posted @ 2013-12-09 22:49 XE2011 阅读(712) 评论(1) 推荐(0) 编辑
摘要: .NET Framework 类库 ListBox.ItemHeight 属性 当 DrawMode 属性设置为 DrawMode.OwnerDrawFixed 时,所有项具有相同的高度。当 DrawMode 属性设置为 DrawMode.OwnerDrawVariable 时,ItemHeight 属性指定添加到 ListBox 中的每个项的高度。因为所有者描述的列表中的每个项可具有不同的高度,所以可使用 GetItemHeight 方法获取 ListBox 中特定项的高度。如果对具有可变高度的项的 ListBox 使用 ItemHeight 属性,则此属性返回控件中第一个项的高度。List 阅读全文
posted @ 2013-12-09 20:40 XE2011 阅读(709) 评论(0) 推荐(0) 编辑
摘要: 获得光标所在的行号获得光标所在的列号设置光标到指定行号设置光标到指定列号http://www.huifangseo.com/blog/6/7.html 获得光标所在的行号和列号方法1 int SelStart = richTextBox1.SelectionStart; int Line = 1 + richTextBox1.GetLineFromCharIndex(SelStart); //行值 int Column = 1 + SelStart - (richTextBox1.GetFirstCharIndexFromLine(Line - 1));//列值 Tex... 阅读全文
posted @ 2013-12-09 13:24 XE2011 阅读(457) 评论(0) 推荐(0) 编辑
摘要: 可以这么写,这个网页缩放了 同时滚动条也被绽放了,明显结果不正确webBrowser1.Document.Body.Style = "zoom:200%";正解http://stackoverflow.com/questions/738232/zoom-in-on-a-web-page-using-webbrowser-net-control这么写也可以//Zoom INwebBrowser1.Focus();SendKeys.Send("^{+}");// [CTRL]+[+]//Zoom OUTwebBrowser1.Focus();SendKeys 阅读全文
posted @ 2013-12-08 18:29 XE2011 阅读(2239) 评论(0) 推荐(0) 编辑
摘要: 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Windows.Forms; 6 using System.Drawing; 7 using mshtml; 8 9 //参考 10 11 //http://code.google.com/p/msit88-gold-coast/source/browse/sandbox/GoldCoastTestSolution/HtmlEdito... 阅读全文
posted @ 2013-12-08 18:22 XE2011 阅读(292) 评论(0) 推荐(0) 编辑
摘要: 附件:http://files.cnblogs.com/xe2011/Webbrowser_SelStart.rar1 获得webBrowser光标所在的位置2 设置webBrowser光标的位置3 获得webBrowser选中的文本长度4 选中webBrowser指定的字符串项目添加引用Microsoft.mshtml单元引用using mshtml; 获得webBrowser光标所在的位置当有文本被选中时返回 的位置应为当 getSelectionStart() - getSelectionLength() /* function getSelectionSta... 阅读全文
posted @ 2013-12-07 19:34 XE2011 阅读(709) 评论(0) 推荐(0) 编辑
摘要: if - elseif语句是一种控制语句,执行一代码块,如果一个表达式计算为trueif (expression) statement1else statement2如果 expression 条件为成立 执行 statement1否则 执行 statement21. if ()if (true) 语句1;语句2;privatevoidbutton1_Click(objectsender,Even... 阅读全文
posted @ 2013-12-05 13:58 XE2011 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 普通方法这种方法尽管很SB但确实可以解决问题 private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { string SelPath = ""; switch (comboBox1.SelectedIndex) { case 0: SelPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Applicat... 阅读全文
posted @ 2013-12-04 19:00 XE2011 阅读(346) 评论(0) 推荐(0) 编辑
摘要: 调用代码:head为head.png的文件名 private void button1_Click(object sender, EventArgs e) { Image img1 = global::WindowsFormsApplication4.Properties.Resources.head; button1.Image = img1; } 阅读全文
posted @ 2013-12-04 12:38 XE2011 阅读(214) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.IO;using System.Runtime.InteropServices;namespace WindowsFormsApplication2{ public partial class Form1 : For... 阅读全文
posted @ 2013-12-03 23:59 XE2011 阅读(549) 评论(1) 推荐(0) 编辑
摘要: 打开一个文件 private void button1_Click(object sender, EventArgs e) { openFileDialog1.InitialDirectory = "c:\\"; openFileDialog1.Filter = "文本文件 (*.txt)|*.tx 阅读全文
posted @ 2013-12-03 21:28 XE2011 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 附件:http://files.cnblogs.com/xe2011/CSharp_DragQueryFile.rarusing System.Runtime.InteropServices; this.AllowDrop = true; [DllImport("shell32.dll")] public static extern uint DragQueryFile(int hDrop, uint iFile, StringBuilder lpszFile, uint cch); [DllImport("shell32.dll")] ... 阅读全文
posted @ 2013-12-03 20:33 XE2011 阅读(750) 评论(0) 推荐(0) 编辑
摘要: 附件 http://files.cnblogs.com/xe2011/richTextBox_InsertTable_Full.rar调用 richTextBoxTableDlg dlg = new richTextBoxTableDlg(); dlg.richTextBox = richTextBox51; if (dlg.ShowDialog() ==DialogResult.OK) { richTextBoxTable r1 = new richTextBoxTable(); ... 阅读全文
posted @ 2013-12-03 17:08 XE2011 阅读(1434) 评论(0) 推荐(0) 编辑
摘要: 附件:http://files.cnblogs.com/xe2011/richTextBox_InsertTable.rar插入表格 /// /// 插入表格 /// /// /// 行 /// 列 /// =TRUE:自动设置每个单元格的大小 private void InsertTable(RichTextBox richTextBox,int col, int row,bool AutoSize) { StringBuilder rtf ... 阅读全文
posted @ 2013-12-03 14:17 XE2011 阅读(1331) 评论(0) 推荐(0) 编辑
上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 49 下一页