10 2013 档案
摘要:uses CommCtrl, httpApp, ShellApi;{GetWebPath(WebBrowser1);}function GetWebPath(web: TWebBrowser): string;var item: TLvItem; clsName: array [0 .. MAX_PATH] of char; hwndLv: HWND; selCount, fileCount, selMark: Integer; fileName: array [0 .. MAX_PATH] of char;begin hwndLv := GetWindow(web.Handle, GW_CH
阅读全文
摘要:繁体与简体之间的转换DELPHI XE5测试通过 http://download.csdn.net/detail/teststudio/6464553 类unit SimpleConvert;interfaceuses Classes, Windows;type TTraditional = class(TObject) public function ConvertComplex(Text: String): AnsiString; function ConvertSimple(Text: String): AnsiString; end;implementation{ ...
阅读全文
摘要:http://files.cnblogs.com/xe2011/VCL_TColorPB12.rar在DELPHI7中可以正常使用 在DELPHI XE5中 下面会有些问题安装方法 打开 DELPHI 新建 - Package选中Package.BPL,右键 ADD找到本并添加.PAS源文件选中Package.BPL,右键 Compile选中Package.BPL,右键 Instal 卸载这个组件的时候,找到这个安装包 选中Package.BPL,右键 UnInstal 说明TColorPickerButton is a special speed button which can be us
阅读全文
摘要:保存 和 打开 TREE VIEW的节点已经展开的状态
如果每次打开后能自动读取上次展开的状态就会非常快捷 下载地址: 实现方法 将已经展开的节点索引 放在一个文本中最后选中的那个节点索引放在最后一位然后通过下面这个代码这实现
{ TreeView1.Items[0].Expand(False);//按节点索引 展开节点一级 TreeView1.S...
阅读全文
摘要:DELPHI TreeView 文件目录树和 设置节点图标 下载地址 http://download.csdn.net/detail/teststudio/6448293 需要制作文档管理软件 这个非常有用的 <!--more--> 1 文件夹 设置图标为 2 文件夹里没有文件的文件夹 设置图标为
阅读全文
摘要:TreeView设置节点图标没子节点的设置其图标为 0有节点的设置其图标为 1procedure TForm1.Button1Click(Sender: TObject);var i:Integer;begin with TreeView1 do begin for i:= 0 to Items.Count -1 do begin if Item...
阅读全文
摘要:procedure TForm1.Button1Click(Sender: TObject);var Dir, FileTitle, FileExt: string; s,s1: string; j:Integer;begin Dir := 'C:\'; FileTitle := '新建 文本文档'; FileExt := '.txt'; s1:=Dir+FileTitle+FileExt; j:=2; if FileExists(s1) then //C:\新建 文本文档.txt begin s:=Format('%s%s(%d)%s&
阅读全文
摘要:unit Unit1;interfaceuses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;type TForm1 = class(TForm) Button1: TButton; Button2: TButton; Memo1: TMemo; procedure Button1Click(Sender: TObject); proc...
阅读全文
摘要:Windows记事本记事本描述:用Delphi模仿的Windows记事本 界面和功能都和Windows的记事本一样,是用Memo实现的而不是RichEdit可以执行以下功能 文件 打开,保存,打印, 页面设置,撤销,复制,粘贴,查找,替换,插入时间日期,转到行,保存窗体大小 位置 和读取配置信息支持拖拽文件到记事本中...下载地址:http://download.csdn.net/detail/teststudio/6414215难点 对文件的新建 打开 保存 另存 退出文件件是否保存的判断 TMemo的打印和页面设置TMemo的文字查找和替换Memo的常用属性 property A...
阅读全文
摘要:加入Printers单元,varLeft,Top,PageHeight,i,x,y,LineSpace : integer;beginTop := 20;Left := 20;y := Top;//Top 起始行的位置,比如设置 Top := 20;x := Left;//Left 左边的起始位置,比如设置:Left := 20;PageHeight := 2600;//A4得纸张大概是这么多,我既不太清,你可以通过某个过程先得到这个数据,LineSpace := 24;//行间距Printer.BeginDoc;for i := 0 to Memo1.Lines.Count - 1 dobe
阅读全文
摘要:Delphi 打印Memo里面的内容 实现的功能和记事本的打印的功能一样打印保存为文件时此时的文件名如何设置?当Memo里的文本数量巨大时 窗体正在打印会出现点数字显示问题 闪烁PageSetup没做任何功能unit Unit1;interfaceusesWindows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, StdCtrls;typeTForm1 = class(TForm)Memo1: TMemo;Button1: TButton;PrinterSetupDialog1: TPri
阅读全文
摘要:Delphi Memo的记事本功能下载地址 : http://download.csdn.net/detail/teststudio/6412883这个代码实现了Windows记事本的主要功能。新建,打开,保存,另存,退出。文件拖拽打开文件 这主要是判断Memo内容是否修改过unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialog...
阅读全文
摘要:设置前先获得Memo的字体属性并设置给FontDialog 然后再设置MEMO的字体属性 //设置Memo的字体属性 procedure TForm1.mni_FontClick(Sender: TObject);beginwith TFontDialog.Create(nil) dobeginFont:=Memo1.Font; Options := ...
阅读全文
摘要:TOpenDialog procedure TForm1.Button1Click(Sender: TObject);beginwith TOpenDialog.Create(nil) dobeginFilter:='Text files (*.txt)|*.txt)|All Files(*.*)|*.*';if Execute then...
阅读全文
摘要:TSaveDialog
预览 实现过程 动态创建和使用保存文件对话框 procedure TForm1.Button1Click(Sender: TObject);beginwith TSaveDialog.Create(nil) dobeginFilter:='Text files (*.txt)|*.txt)|All...
阅读全文
摘要:Delphi中一些常用的组合键值CTRL+A: #1CTRL+B: #2CTRL+C: #3CTRL+D: #4CTRL+E: #5CTRL+F: #6CTRL+G: #7CTRL+H: #8CTRL+I: #9CTRL+J: #10CTRL+K: #11CTRL+L: #12CR: #13 //回车M ?CTRL+N: #14CTRL+O: #1...
阅读全文
摘要:TColorDialog
预览 实现过程 动态创建和使用颜色对话框function ShowColorDlg:TColor;begin with TColorDialog.Create(nil) do begin Options :=[cdFullOpen,cdPreventFullOpen,cdShowHelp,cdSolidColor,...
阅读全文
摘要:Delphi TFindDialog TReplaceDialog对话框的使用下载地址1: http://download.csdn.net/detail/teststudio/6408383下面这段代码已经完全的解决Memo的查找对话框 和 替换对话框功能 的所有功能查找对话框部件 查找对话框部件为应用程序提供查找对话框,用户可使用查找对话框在文本文件中查找字符串。 可用Execult方法显示查找对话框,如图4.8。应用程序要查找的字符放到FindText属性中。Options 属性可决定查找对话框中有哪些选项。例如,用户可选择是否显示匹配检查框。Options的常用选项如表4.2所示。..
阅读全文
摘要://增加项或列(字段) ListView1.Clear; ListView1.Columns.Clear; ListView1.Columns.Add; ListView1.Columns.Add; ListView1.Columns.Add; ListView1.Columns.Items[0].Caption:='id'; ListView1.Columns.Items[1...
阅读全文
摘要:《地球帝国3》(Empire Earth III)秘籍 说明: 1. 启动游戏 2. 在游戏中按回车键启动控制台 3. 输入下列代码: icheat 启动密技 idontcheat 解除密技 loot 所有资源+10000 taxes 资源减少100 punish 被选定的单位减少20点生命 con
阅读全文