游子日月长

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

导航

01 2017 档案

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 游子日月长 阅读(448) 评论(0) 推荐(0)

bat 批量更改文件名的批处理文件
摘要:bat 批量更改文件名的批处理文件 最近下了不少动画,不过文件名都太长,一般都是 [字幕组][名称][集数][语言][分辨率][编码].后缀 这样的格式 我喜欢简单的名字,比如 01.rmvb 之类,可是手动改很麻烦,于是就写了这个 bat,希望对大家有帮助 2009-10-16: * 修正了更改文 阅读全文

posted @ 2017-01-22 17:39 游子日月长 阅读(403) 评论(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 游子日月长 阅读(231) 评论(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 游子日月长 阅读(471) 评论(0) 推荐(0)

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

posted @ 2017-01-21 15:54 游子日月长 阅读(308) 评论(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 游子日月长 阅读(323) 评论(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 游子日月长 阅读(194) 评论(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 游子日月长 阅读(299) 评论(0) 推荐(0)

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

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

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

posted @ 2017-01-20 21:57 游子日月长 阅读(386) 评论(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 游子日月长 阅读(201) 评论(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 游子日月长 阅读(247) 评论(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 游子日月长 阅读(334) 评论(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 游子日月长 阅读(314) 评论(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 游子日月长 阅读(563) 评论(0) 推荐(0)

win10为什么不能把文件直接拖拽
摘要: 阅读全文

posted @ 2017-01-18 15:14 游子日月长 阅读(600) 评论(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 游子日月长 阅读(641) 评论(0) 推荐(0)

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

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

delphi的ArrayList
摘要:本文转载自Top.hand《delphi的ArrayList》 本文转载自Top.hand《delphi的ArrayList》 delphi可以用Classes.TList类来实现ArrayList功能.注意:add()方法存入的类型是TPoint,所以必须根据实际类型定义好相关的指针类型. pro 阅读全文

posted @ 2017-01-16 11:47 游子日月长 阅读(268) 评论(0) 推荐(0)

Delphi判断一个文件是不是JPG图片
摘要:判断头几个字节: function IsJpegFile(FileName: string): Boolean;constRightBuf : array[0..3] of Byte = ($FF,$D8,$FF,$D9);varBuf: array[0..3] of Byte;beginFillC 阅读全文

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

Delphi 停靠技术的应用3(两个窗体停靠成PageControl样式, 分页停靠)
摘要:Delphi 停靠技术的应用3(两个窗体停靠成PageControl样式, 分页停靠) 因为TPageControl组件重载了TWinControl组件的DoAddDockClient和DoRemoveDockClient方法,能过自动响应停靠动作添加新的也没,而当浮动被停靠的窗口后将自动的将先前创 阅读全文

posted @ 2017-01-12 11:16 游子日月长 阅读(556) 评论(0) 推荐(0)

Delphi 操作键盘按下和释放操作
摘要:Unit Unit1; Interface Uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; Type TForm1 = Class(TForm) ReleaseScrollLockBtn: TButton; SetScrol... 阅读全文

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

Delphi 创建一个url网址快捷方式代码
摘要: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... 阅读全文

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

delphi实现两个目录路径的链接
摘要: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... 阅读全文

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

Delphi 解析系统环境变量
摘要:// http://www.outofmemory.cn function ExpandEnvironment(const strValue: string): string; var chrResult: array[0..1023] of Char; wrdReturn: DWORD; begin wrdReturn := ExpandEnvironmentStrings(PCh... 阅读全文

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

DELPHI WM_CopyData 用法
摘要:unit Unit1; interface usesWindows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, StdCtrls, ComCtrls; type TForm1 = class(T 阅读全文

posted @ 2017-01-11 11:51 游子日月长 阅读(670) 评论(0) 推荐(0)

delphi 中判断对象是否具备某一属性
摘要:Uses TypInfo; {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); var I: Integer; begin for I := 0 to ComponentCount - 1 do if IsPublishedProp( 阅读全文

posted @ 2017-01-11 11:43 游子日月长 阅读(342) 评论(0) 推荐(0)

Delphi 动态数组合并
摘要:TIntArray = array of Integer; function MergeArray(const ArrayA, ArrayB: TIntArray): TIntArray; var ilen: Integer; begin//Copy(intArray, iFromPos, Coun 阅读全文

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

将Delphi的对象方法设为回调函数
摘要:心血来潮,为了实现更好的通用性和封装性,需要把类方法作为回调函数,搜得一篇好文,节选转发。命名似乎应该是MethodToCallback才合适,可惜调试时总是报错,debugging。 原文地址:http://blog.csdn.net/linzhengqun/article/details/145 阅读全文

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

php 时间操作归类
摘要:对于php时间表示有两种: 一、‘xxxx-xx-xx'这种容易分辨的格式 二、unix时间戳格式 他们的之间的转换关系是: 常规格式转时间戳 [php] view plain copy print? $T='2014-05-24'; $Tr=strtotime($T); echo $Tr; [ph 阅读全文

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

使用TCPDF插件生成pdf以及pdf的中文处理
摘要:目录(?)[+] 做了这么多年项目,以前只是在别人的项目中了解过PHP生成pdf文件,知道并不难,但是涉及到了pdf开发库,首先介绍pdf库。 多种多样的pdf开发库 1.WKHTMLTOPDF wkhtmltopdf是一个很好的解决方案,基本上可以原样输出html页面中的内容,包括:图片/代码高亮 阅读全文

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

HostOnly Cookie和HttpOnly Cookie
摘要:怎么使用Cookie? 通常我们有两种方式给浏览器设置或获取Cookie,分别是HTTP Response Headers中的Set-Cookie Header和HTTP Request Headers中的Cookie Header,以及通过JavaScript对document.cookie进行赋 阅读全文

posted @ 2017-01-04 17:38 游子日月长 阅读(4376) 评论(0) 推荐(1)

jquery仿淘宝规格颜色选择效果
摘要:jquery实现的仿淘宝规格颜色选择效果源代码如下 jquery仿淘宝规格颜色选择效果 -收缩HTML代码 运行代码 [如果运行无效果,请自行将源代码保存为html文件运行] jquery仿淘宝规格颜色选择效果 尺寸: S M L XS 颜色: 黑色 白色 红色 黄色 蓝色 数量: (剩余:) 阅读全文

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

JQuery实现的模块交换动画效果
摘要:JQuery实现的模块交换动画效果 其他内容 其他内容 阅读全文

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

javascript检查移动设备是否支持重力方向感应
摘要:javascript如何检查移动设备,如手机平台是否支持重力或者方向感应。 可以使用html5提供的重力和方向感应接口来判断。 html5 中针对高端手机提供了重力感应和重力加速的接口,开发可以利用这个接口获取到移动设备重力加速感应数据。 目前已经支持的浏览器只有chrome和firefox,以及IOS的webkit(貌似android上因为版本差异很大,部分低版本的系统不支... 阅读全文

posted @ 2017-01-04 16:58 游子日月长 阅读(294) 评论(0) 推荐(0)

JavaScript如何检查网站是可以访问
摘要:JavaScript如何检查网站是可以访问 阅读全文

posted @ 2017-01-04 16:56 游子日月长 阅读(870) 评论(0) 推荐(0)

jquery实现章节目录效果
摘要:jquery实现章节目录效果 anchor1 anchor2 anchor3 anchor4anchor1anchor2anchor3anchor4 阅读全文

posted @ 2017-01-04 16:53 游子日月长 阅读(306) 评论(0) 推荐(0)

Delphi里如何让程序锁定在桌面上,win+d都无法最小化
摘要:procedure TForm29.FormCreate(Sender: TObject); begin Windows.SetParent(Self.Handle, FindWindowEx(FindWindow('Progman', nil), 0, 'shelldll_defview', nil)); end; 阅读全文

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