游子日月长

笑渐不闻声渐悄,多情却被无情恼!

导航

随笔分类 -  Delphi

上一页 1 ··· 4 5 6 7 8 9 下一页

在MetaFile里放图片
摘要:procedure TForm1.Button1Click(Sender: TObject); var m : TmetaFile; mc : TmetaFileCanvas; b : tbitmap; begin m := TMetaFile.Create; b := TBitmap.create; b.LoadFromFile('C:\SomePath\Som... 阅读全文

posted @ 2017-02-07 12:33 游子日月长 阅读(194) 评论(0) 推荐(0)

取出资源文件中的bitmap,并将其保存到TMemoryStream中,从资源里载入图象而不丢失调色板
摘要:从资源里载入图象而不丢失调色板 procedure loadgraphic(naam:string);var { I've moved these in here, so they exist only during the lifetime of the procedure. } HResInfo 阅读全文

posted @ 2017-02-07 12:28 游子日月长 阅读(228) 评论(0) 推荐(0)

Canvas.Pixels 实例:判断一点是否在区域中
摘要: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 阅读全文

posted @ 2017-02-07 12:21 游子日月长 阅读(274) 评论(0) 推荐(0)

delphi 图片加水印源代码
摘要:unit UWaterMark; interface uses {$IFNDEF DELPHIXE2ANDUP} windows,SysUtils,classes,graphics,Gdiplus; {$ELSE} winapi.windows, System.SysUtils,System.Classes,Vcl.Graphics,Gdiplus; {$ENDIF... 阅读全文

posted @ 2017-01-23 10:29 游子日月长 阅读(444) 评论(0) 推荐(0)

Implementing the On Item Checked Event for the TListView Control
摘要:The TListView Delphi control displays a list of items in a fashion similar to how Windows Explorer displays files and folders. ViewStyle := Report; Ch 阅读全文

posted @ 2017-01-21 16:18 游子日月长 阅读(229) 评论(0) 推荐(0)

Implementing On Item Click / Double Click for TListView
摘要: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 阅读全文

posted @ 2017-01-21 16:14 游子日月长 阅读(469) 评论(0) 推荐(0)

Delphi编程实现是否开启“平滑屏幕字体边缘“
摘要:在Windows高级设置中的视觉效果中可以设置是否开启“平滑屏幕字休边缘”,可以通过编程的方式来实现: SystemParametersInfo的第二个参数为1表示开启,0表示关闭。 阅读全文

posted @ 2017-01-21 15:54 游子日月长 阅读(307) 评论(0) 推荐(0)

How a non-windowed component can receive messages from Windows
摘要: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 阅读全文

posted @ 2017-01-21 15:37 游子日月长 阅读(320) 评论(0) 推荐(0)

VCL编写笔记整理
摘要:unit hzqEdit1; interface uses SysUtils, Classes, Controls, StdCtrls; type TEditDataType = (dtpString, dtpInteger, dtpFloat); ThzqEdit = class(TEdit) p 阅读全文

posted @ 2017-01-20 22:06 游子日月长 阅读(193) 评论(0) 推荐(0)

Delphi操作Excel(Use Oel)
摘要:Use ComObj: procedure TorderMore1.BitBtn2Click(Sender: TObject);var xlsFile:WideString; var ExcelApp: Variant;begin SaveDialog1.FileName:= MyQuery3.Fi 阅读全文

posted @ 2017-01-20 22:04 游子日月长 阅读(298) 评论(0) 推荐(0)

使用 ImageEnView 给图片加水印,及建缩略图
摘要:摘要: 使用 ImageEnView 给图片加水印,及建缩略图 <!-- 正文 --> {Power by hzqghost@21cn.com}unit CutWater;interfaceuses Math,imageenview, SysUtils, Classes, Graphics;proc 阅读全文

posted @ 2017-01-20 22:02 游子日月长 阅读(498) 评论(0) 推荐(0)

Delphi下MSMQ(Mircosoft Message Queue)实例(私有队列)
摘要:网上关于消息队列技术原理说明的详细文档很多,但涉及到Delphi的具体实现很少,这是我从网上找了一上午的资料,自己整合和尝试的能运行的程序。 打开控制面板->程序->添加组件,添加消息队列 打开控制面板->计算机管理->服务与应用程序->消息队列,添加私有有消息Test. 在Delphi中添加MSM 阅读全文

posted @ 2017-01-20 21:57 游子日月长 阅读(375) 评论(0) 推荐(0)

从给定字符串中截取n个字节的字符(解决汉字截取乱码问题)
摘要:function GetNBytesChar(s: Ansistring; n: Integer): string;var aStr: AnsiString; bStr: WideString;begin aStr := Copy(s, 1, n); bStr := aStr; if aStr = 阅读全文

posted @ 2017-01-20 21:56 游子日月长 阅读(200) 评论(0) 推荐(0)

tbytes 转 十六进制 string
摘要:function Bytes2HexStr(buf: TBytes; len: Integer): AnsiString; begin SetLength(Result, len*2); BinToHex(@buf[0], PAnsiChar(Result), len); end; procedur 阅读全文

posted @ 2017-01-20 21:55 游子日月长 阅读(176) 评论(0) 推荐(0)

Delphi中拖动的方式来移动TPageControl的Tab
摘要:procedure TMainForm.PageControl1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer) ; begin PageControl1.BeginDrag(Fal 阅读全文

posted @ 2017-01-20 21:53 游子日月长 阅读(243) 评论(0) 推荐(0)

Imageen 图像切割 (JpegLosslessTrans)
摘要:procedure CutAFile(FileName: string; qry: TQuery);var i: Cardinal; FromStream, ToStream: TMemoryStream; SubFileName, Path, fName, MainName, ExtName: s 阅读全文

posted @ 2017-01-20 21:52 游子日月长 阅读(333) 评论(0) 推荐(0)

delphi TEdit透明
摘要:unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) ed 阅读全文

posted @ 2017-01-20 21:50 游子日月长 阅读(313) 评论(0) 推荐(0)

delphi 颜色转换函数总结
摘要:unit UColor; interface uses windows, sysutils, classes, graphics; function HexToInt(Hexa: String): LongWord; function ColorToString(color: TColor): String; function WebColorToDelphiTColor(webco... 阅读全文

posted @ 2017-01-20 10:20 游子日月长 阅读(561) 评论(0) 推荐(0)

Delphi声明Record变量后直接初始化
摘要:TARec = record A1: string; A2: string; end; TBRec = record A1: string; A2: string; ARec: TARec; end; PAppWindow = ^TAppWindow; TAppWindow = Record Wid 阅读全文

posted @ 2017-01-17 13:39 游子日月长 阅读(640) 评论(0) 推荐(0)

delphi实现映射和断开网络驱动器
摘要:{ WNetAddConnection2 的参数说明: dwFlags标志位用于指定登录时是否重新连接(0时表示不重新连接,CCONNECT_UPDATE_PROFILE登录时重新连接)。 } 阅读全文

posted @ 2017-01-17 13:17 游子日月长 阅读(601) 评论(0) 推荐(0)

上一页 1 ··· 4 5 6 7 8 9 下一页