12 2008 档案
摘要:unit TestMemo; interface uses Windows, Classes, StdCtrls, Graphics, Controls, SysUtils, jpeg, Messages; type Test = class(TMemo) private Test: string; FCanvas: TCanvas; FPicture: TP...
阅读全文
摘要:透明的控件, 一般继承自TGraphicControl的(就是那些没有handle属性, 不能有focus的控件, 如image) 都有Transparent属性. 对TWinControl类的控件, 要实现透明只要完成以下 四步基本上就成了. 1.在Create中设定ControlStyle :=ControlStyle - [csOpaque]; 2. override 它的Create...
阅读全文
摘要:var Str: TPoint; BarHand: THandle; begin GetCursorPos(Str); BarHand := GetDC(0); Panel1.Color := GetPixel(BarHand, Str.X, Str.Y); Caption := IntToStr(Panel1.Color);
阅读全文
摘要:procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState); begin if StringGrid1.Cells[10,ARow] = TestNo then begin StringGrid1.Canvas.Fon...
阅读全文
该文被密码保护。
摘要:function ExportToWord(StrList: TStrings; SavePath: string): Boolean; var WordApp: TWordApplication; WordDoc: TWordDocume...
阅读全文
摘要:function GetNumSumFromStr(Str: string): Integer; function IsNumber(SoureChar: Char): Boolean; begin Result...
阅读全文
摘要:1 TClientDataSet.IndexFieldNames := '字段'
阅读全文
摘要:--测试环境 create table table1(id int primary key) insert table1 select 1 union all select 2 --查看表 select * from table1 --操作A(执行错误后,事务没有回滚) begin tran delete From table1 where id=1 Insert into A(Fie...
阅读全文
摘要:WebBrowser1.GoHome; //到浏览器默认主页 WebBrowser1.Refresh; //刷新 WebBrowser1.GoBack; //后退 WebBrowser1.GoForward; //前进 WebBrowser1.Navigate('...'); //打开指定页面 WebBrowser1.Navigate('about:blank'); //打开空页面 ...
阅读全文
摘要:procedure TForm1.Button1Click(Sender: TObject); var P: Pointer; begin P := nil;{洗得干干净净一尘不染} with TButton.Create(Self) do begin asm mov P, eax end; TButton(P).Caption := 'All R...
阅读全文
摘要:闲来无事,自己花了一天时间学习了下钩子在DELPHI中的使用,这只是一个局部变量的钩子, 1 首先定义钩子的基本变量 type THookDataOutputProc = procedure(PBuffer: PChar);stdcall; THookData = record Installed: Boolean; Hhk: HHook; CallBackProc: THookDataOut...
阅读全文