摘要:procedure TForm1.Button1Click(Sender: TObject); var m : TmetaFile; mc : TmetaFileCanvas; b : tbitmap; begin m := TMetaFile.Create; b := TBitmap.create; b.LoadFromFile('C:\SomePath\Som...
阅读全文
摘要:从资源里载入图象而不丢失调色板 procedure loadgraphic(naam:string);var { I've moved these in here, so they exist only during the lifetime of the procedure. } HResInfo
阅读全文
摘要:The Windows 3.1 and Windows 95 GDI heap is limited in regards to scan converting large and complex regions such as Ellipses, Polygons, and PolyPolygon
阅读全文
摘要:unit UWaterMark; interface uses {$IFNDEF DELPHIXE2ANDUP} windows,SysUtils,classes,graphics,Gdiplus; {$ELSE} winapi.windows, System.SysUtils,System.Classes,Vcl.Graphics,Gdiplus; {$ENDIF...
阅读全文
摘要:The TListView Delphi control displays a list of items in a fashion similar to how Windows Explorer displays files and folders. ViewStyle := Report; Ch
阅读全文
摘要:ListView.On Item Click & ListView.On Item Double Click To be able to locate the clicked (if there is one) item when the OnClick event for the list vie
阅读全文
摘要:在Windows高级设置中的视觉效果中可以设置是否开启“平滑屏幕字休边缘”,可以通过编程的方式来实现: SystemParametersInfo的第二个参数为1表示开启,0表示关闭。
阅读全文
摘要:Why do it? Sometimes we need a non-windowed component (i.e. one that isn't derived fromTWinControl) to receive Windows messages. To receive messages t
阅读全文
摘要:unit hzqEdit1; interface uses SysUtils, Classes, Controls, StdCtrls; type TEditDataType = (dtpString, dtpInteger, dtpFloat); ThzqEdit = class(TEdit) p
阅读全文
摘要:Use ComObj: procedure TorderMore1.BitBtn2Click(Sender: TObject);var xlsFile:WideString; var ExcelApp: Variant;begin SaveDialog1.FileName:= MyQuery3.Fi
阅读全文
摘要:摘要: 使用 ImageEnView 给图片加水印,及建缩略图 <!-- 正文 --> {Power by hzqghost@21cn.com}unit CutWater;interfaceuses Math,imageenview, SysUtils, Classes, Graphics;proc
阅读全文
摘要:网上关于消息队列技术原理说明的详细文档很多,但涉及到Delphi的具体实现很少,这是我从网上找了一上午的资料,自己整合和尝试的能运行的程序。 打开控制面板->程序->添加组件,添加消息队列 打开控制面板->计算机管理->服务与应用程序->消息队列,添加私有有消息Test. 在Delphi中添加MSM
阅读全文
摘要:function GetNBytesChar(s: Ansistring; n: Integer): string;var aStr: AnsiString; bStr: WideString;begin aStr := Copy(s, 1, n); bStr := aStr; if aStr =
阅读全文
摘要:function Bytes2HexStr(buf: TBytes; len: Integer): AnsiString; begin SetLength(Result, len*2); BinToHex(@buf[0], PAnsiChar(Result), len); end; procedur
阅读全文
摘要:procedure TMainForm.PageControl1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer) ; begin PageControl1.BeginDrag(Fal
阅读全文
摘要:procedure CutAFile(FileName: string; qry: TQuery);var i: Cardinal; FromStream, ToStream: TMemoryStream; SubFileName, Path, fName, MainName, ExtName: s
阅读全文
摘要:unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) ed
阅读全文
摘要:unit UColor; interface uses windows, sysutils, classes, graphics; function HexToInt(Hexa: String): LongWord; function ColorToString(color: TColor): String; function WebColorToDelphiTColor(webco...
阅读全文
摘要:TARec = record A1: string; A2: string; end; TBRec = record A1: string; A2: string; ARec: TARec; end; PAppWindow = ^TAppWindow; TAppWindow = Record Wid
阅读全文
摘要:{ WNetAddConnection2 的参数说明: dwFlags标志位用于指定登录时是否重新连接(0时表示不重新连接,CCONNECT_UPDATE_PROFILE登录时重新连接)。 }
阅读全文