摘要:unit UWaterMark; interface uses {$IFNDEF DELPHIXE2ANDUP} windows,SysUtils,classes,graphics,Gdiplus; {$ELSE} winapi.windows, System.SysUtils,System.Classes,Vcl.Graphics,Gdiplus; {$ENDIF...
阅读全文
摘要:bat 批量更改文件名的批处理文件 最近下了不少动画,不过文件名都太长,一般都是 [字幕组][名称][集数][语言][分辨率][编码].后缀 这样的格式 我喜欢简单的名字,比如 01.rmvb 之类,可是手动改很麻烦,于是就写了这个 bat,希望对大家有帮助 2009-10-16: * 修正了更改文
阅读全文
摘要: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登录时重新连接)。 }
阅读全文
摘要:本文转载自Top.hand《delphi的ArrayList》 本文转载自Top.hand《delphi的ArrayList》 delphi可以用Classes.TList类来实现ArrayList功能.注意:add()方法存入的类型是TPoint,所以必须根据实际类型定义好相关的指针类型. pro
阅读全文
摘要:判断头几个字节: function IsJpegFile(FileName: string): Boolean;constRightBuf : array[0..3] of Byte = ($FF,$D8,$FF,$D9);varBuf: array[0..3] of Byte;beginFillC
阅读全文
摘要:Delphi 停靠技术的应用3(两个窗体停靠成PageControl样式, 分页停靠) 因为TPageControl组件重载了TWinControl组件的DoAddDockClient和DoRemoveDockClient方法,能过自动响应停靠动作添加新的也没,而当浮动被停靠的窗口后将自动的将先前创
阅读全文
摘要:Unit Unit1; Interface Uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; Type TForm1 = Class(TForm) ReleaseScrollLockBtn: TButton; SetScrol...
阅读全文
摘要:procedure CreateURLShortcut(const ShortcutFile, URL: string); var F: TextFile; // text file begin {$I+} // ensure file i/o raises exception on error // Open new file for writing (overwrites an...
阅读全文
摘要:filepath := PathJoin(['C:', 'path1', 'path2\', 'a.doc']); // filepath = 'C:\path1\path2\a.doc' 代码: function PathJoin(const Args: array of string): string; var len: Integer; i: Integer; s: strin...
阅读全文
摘要:// http://www.outofmemory.cn function ExpandEnvironment(const strValue: string): string; var chrResult: array[0..1023] of Char; wrdReturn: DWORD; begin wrdReturn := ExpandEnvironmentStrings(PCh...
阅读全文
摘要:unit Unit1; interface usesWindows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, StdCtrls, ComCtrls; type TForm1 = class(T
阅读全文
摘要:Uses TypInfo; {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); var I: Integer; begin for I := 0 to ComponentCount - 1 do if IsPublishedProp(
阅读全文
摘要:TIntArray = array of Integer; function MergeArray(const ArrayA, ArrayB: TIntArray): TIntArray; var ilen: Integer; begin//Copy(intArray, iFromPos, Coun
阅读全文
摘要:心血来潮,为了实现更好的通用性和封装性,需要把类方法作为回调函数,搜得一篇好文,节选转发。命名似乎应该是MethodToCallback才合适,可惜调试时总是报错,debugging。 原文地址:http://blog.csdn.net/linzhengqun/article/details/145
阅读全文
摘要:对于php时间表示有两种: 一、‘xxxx-xx-xx'这种容易分辨的格式 二、unix时间戳格式 他们的之间的转换关系是: 常规格式转时间戳 [php] view plain copy print? $T='2014-05-24'; $Tr=strtotime($T); echo $Tr; [ph
阅读全文
摘要:目录(?)[+] 做了这么多年项目,以前只是在别人的项目中了解过PHP生成pdf文件,知道并不难,但是涉及到了pdf开发库,首先介绍pdf库。 多种多样的pdf开发库 1.WKHTMLTOPDF wkhtmltopdf是一个很好的解决方案,基本上可以原样输出html页面中的内容,包括:图片/代码高亮
阅读全文
摘要:怎么使用Cookie? 通常我们有两种方式给浏览器设置或获取Cookie,分别是HTTP Response Headers中的Set-Cookie Header和HTTP Request Headers中的Cookie Header,以及通过JavaScript对document.cookie进行赋
阅读全文
摘要:jquery实现的仿淘宝规格颜色选择效果源代码如下 jquery仿淘宝规格颜色选择效果 -收缩HTML代码 运行代码 [如果运行无效果,请自行将源代码保存为html文件运行] jquery仿淘宝规格颜色选择效果 尺寸: S M L XS 颜色: 黑色 白色 红色 黄色 蓝色 数量: (剩余:)
阅读全文
摘要:JQuery实现的模块交换动画效果 其他内容 其他内容
阅读全文
摘要:javascript如何检查移动设备,如手机平台是否支持重力或者方向感应。 可以使用html5提供的重力和方向感应接口来判断。 html5 中针对高端手机提供了重力感应和重力加速的接口,开发可以利用这个接口获取到移动设备重力加速感应数据。 目前已经支持的浏览器只有chrome和firefox,以及IOS的webkit(貌似android上因为版本差异很大,部分低版本的系统不支...
阅读全文
摘要:jquery实现章节目录效果 anchor1 anchor2 anchor3 anchor4anchor1anchor2anchor3anchor4
阅读全文
摘要:procedure TForm29.FormCreate(Sender: TObject); begin Windows.SetParent(Self.Handle, FindWindowEx(FindWindow('Progman', nil), 0, 'shelldll_defview', nil)); end;
阅读全文