12 2013 档案

摘要:TMS Component Pack v7.0.0.0 TMS Component Pack 版本为Delphi和C++ Builder提供了超过350个VCL组件,用以创建功能丰富的、现代的和原生Windows应用程序。www.tmssoftware.comDemo http://www.tmssoftware.com/site/tmspcksamples.asp支持delphi 版本:Delphi 7~Delphi XE5 附件:http://yunpan.cn/QDP5pIs9HXQzA44.6 MB Raize Components 6.1.5.7zwww.raize.comRaize 阅读全文
posted @ 2013-12-21 18:28 XE2011 阅读(500) 评论(0) 推荐(0) 编辑
摘要://判断文件是否正在被使用 function FileINUse(filename:String):boolean;var usein:file;begin result:=false; assignfile(usein,FileName); try reset(Usein); except on E:EInOutError do begin if e.ErrorCode=32 then begin result:=true; exit; end; end; end; closefile(usein... 阅读全文
posted @ 2013-12-21 14:26 XE2011 阅读(431) 评论(2) 推荐(0) 编辑
摘要:WINDOWS发送消息This function sends the specified message to a window or windows. SendMessage calls the window procedure for the specified window and does not return until the window procedure has processed the message. The PostMessage function, in contrast, posts a message to a thread's message queu 阅读全文
posted @ 2013-12-21 13:59 XE2011 阅读(675) 评论(0) 推荐(0) 编辑
摘要:获取一个文件夹下的所有文件 //不包括文件夹里面的文件 获取一个文件夹下的所有文件 //包括文件夹里面的文件 阅读全文
posted @ 2013-12-21 12:11 XE2011 阅读(364) 评论(0) 推荐(0) 编辑
摘要:方法1procedure TForm2.Button1Click(Sender: TObject);var Pt: TPoint;begin GetCursorPos(Pt); PopupMenu1.Popup(Pt.X, Pt.Y);end;方法2设置控件的DropDownMenu 为右键单击(可手动设置) 这个功能只对ToolBar的 Button有效PopMenu为右键单击procedure TForm1.Button1Click(Sender: TObject);begin ToolButton1.DropdownMenu := PopupMenu1;end; 阅读全文
posted @ 2013-12-21 11:51 XE2011 阅读(245) 评论(0) 推荐(0) 编辑
摘要:选中第5行//转到指定行并选中这行的文本procedure SelectLine(Memo1: TMemo; ln: Integer);begin Memo1.SelStart := SendMessage(Memo1.Handle, EM_LINEINDEX, ln - 1, 0); Memo1.SelLength := Length(Memo1.Lines[ln - 1]);end;http://bbs.csdn.net/topics/110143548//将滚动条定位到指定行procedure ScrollToLine(Memo1: TMemo; ln: Integer);begin.. 阅读全文
posted @ 2013-12-20 17:15 XE2011 阅读(652) 评论(0) 推荐(0) 编辑
摘要:EXE:http://files.cnblogs.com/xe2011/Text_EditorRelease2013-12-20-185320.rarDelphi XE5 PAS:http://files.cnblogs.com/xe2011/Text_Editor_Pascal2013-12-20-185320.rar字符处理单元 1 // 字符串处理功能 2 3 unit StringFunctions; 4 5 interface 6 7 uses 8 Windows, Messages, SysUtils, Variants, Classes, Forms, ... 阅读全文
posted @ 2013-12-20 14:27 XE2011 阅读(1054) 评论(0) 推荐(0) 编辑
摘要:EXE: http://files.cnblogs.com/xe2011/FamousWord-Release-2013-12-22-113350.rarPASCAL: http://files.cnblogs.com/xe2011/FamousWord-Pascal-2013-12-22-113350.rarDELPHI XE5【2013年12月21日 19:10:12】【2013-12-20 23:01:37】【2013-12-20 18:01:37】 1 unit Unit2; 2 3 interface 4 5 uses 6 Winapi.Windows, Win... 阅读全文
posted @ 2013-12-19 20:17 XE2011 阅读(866) 评论(0) 推荐(0) 编辑
摘要:if (richTextBox1.SelectedRtf.IndexOf(@"{\pict") > -1) { Text = "Img"; } else { Text = "Form1"; } 阅读全文
posted @ 2013-12-17 17:11 XE2011 阅读(398) 评论(0) 推荐(0) 编辑
摘要:数组 arr = { 9,2,42,12,34,0,-11,45};数组的长度 = 8(个元素)数组的第0个元素为 9数组的第1个元素为2...数组的第N个元素为 N-1using System;namespace ConsoleApplication1{ class Program { static void Main(string[] args) { int[] arr = { 9,2,42,12,34,0,-11,45}; Console.WriteLine("arr={ 9,2,42,12,34,0,-... 阅读全文
posted @ 2013-12-15 13:31 XE2011 阅读(145) 评论(0) 推荐(0) 编辑
摘要:using System;using System.Data;using System.Windows.Forms;namespace WindowsFormsApplication1{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { DataTabl... 阅读全文
posted @ 2013-12-14 23:42 XE2011 阅读(212) 评论(0) 推荐(0) 编辑
摘要:附件:http://files.cnblogs.com/xe2011/CSHARP_RichTextBoxEditor.rar完整的转到这里 http://www.cnblogs.com/xe2011/p/3449333.html主要的类 1 using System; 2 //using System.Collections.Generic; 3 //using System.Linq; 4 using System.Text; 5 using System.Drawing; 6 //using System.Windows.Forms; 7 using System.Runt... 阅读全文
posted @ 2013-12-13 15:03 XE2011 阅读(1463) 评论(0) 推荐(0) 编辑
摘要:附件 http://files.cnblogs.com/xe2011/richTextBox_EM_SETRECT.rarusing System.Runtime.InteropServices; public struct Rect { public int Left; public int Top; public int Right; public int Bottom; } [DllImport("user32.dll")] private s... 阅读全文
posted @ 2013-12-11 16:28 XE2011 阅读(1360) 评论(1) 推荐(0) 编辑
摘要:附件 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 阅读(368) 评论(0) 推荐(0) 编辑
摘要:附件:http://files.cnblogs.com/xe2011/WindowsFormsFontCombox.rar 自定义组件的做法 1 新个新的工程,先做一个想要达到效果的样子来。 2 然后转到 InitializeComponent(); 把相关代码复制过来 3 选中工程添加一个类然后继 阅读全文
posted @ 2013-12-09 22:49 XE2011 阅读(724) 评论(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 阅读(714) 评论(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 阅读(475) 评论(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 阅读(2241) 评论(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 阅读(294) 评论(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 阅读(715) 评论(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 阅读(221) 评论(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 阅读(349) 评论(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 阅读(558) 评论(1) 推荐(0) 编辑
摘要:打开一个文件 private void button1_Click(object sender, EventArgs e) { openFileDialog1.InitialDirectory = "c:\\"; openFileDialog1.Filter = "文本文件 (*.txt)|*.tx 阅读全文
posted @ 2013-12-03 21:28 XE2011 阅读(221) 评论(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 阅读(759) 评论(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 阅读(1505) 评论(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 阅读(1555) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示