delphi 下的日期计算
在项目中,需要做一个日期的提醒功能,挺郁闷的,对日期的计算:
很幸运的是在delphi 中有现有的计算函数,DateUtils单元;
路径:*\Delphi7\Source\Rtl\Common 目录下。
贴出一部分:
function IncYear(const AValue: TDateTime;
const ANumberOfYears: Integer = 1): TDateTime;
// function IncMonth is in SysUtils
function IncWeek(const AValue: TDateTime;
const ANumberOfWeeks: Integer = 1): TDateTime;
function IncDay(const AValue: TDateTime;
const ANumberOfDays: Integer = 1): TDateTime;
function IncHour(const AValue: TDateTime;
const ANumberOfHours: Int64 = 1): TDateTime;
function IncMinute(const AValue: TDateTime;
const ANumberOfMinutes: Int64 = 1): TDateTime;
function IncSecond(const AValue: TDateTime;
const ANumberOfSeconds: Int64 = 1): TDateTime;
function IncMilliSecond(const AValue: TDateTime;
const ANumberOfMilliSeconds: Int64 = 1): TDateTime;
参考地址:http://info.52z.com/html/24801.html
相关文档:
Delphi编写系统服务二:系统服务和桌面程序的区别 收藏
Windows 2000/XP/2003等支持一种叫做“系统服务程序”的进程,系统服务和桌面程序的区别是:
系统服务不用登陆系统即可运行;
系统服务是运行在System Idle Process/System/smss/winlogon/services下的,而桌面程序是运行在Explorer下的;
......
procedure TForm1.Button2Click(Sender: TObject);
var
o : Olevariant;
begin
webbrowser1.Navigate('http://www.163.com');
delay(2000);
o := WebBrowser1.OleObject.document.all.item('username',0);
o.value := 'username';
o := W ......
delphi中的DLL中的声明原码如下:
这里声明了输出性参数分别为数字与字符类型
library dll1;
uses
SysUtils,
Classes;
{$R *.res}
Function mymax(x, y: Integer; out jj: Integer; out abc: PChar): Integer; stdcall;
begin
jj := x * y;
abc := PChar(StrPas(abc) + '这是传出的' ......
如何在Delphi里面利用Word的VBA代码进行一些总结。
1、 生成VBA代码。Word本身具有很强的可扩展性,尤其是支持用户自定义功能,其实现
的主要方式就是通过VBA代码来实现的。在“工具->宏->Visual Basic编辑器”里面就可以看
到具体的宏代码,可以直接进行编辑。而且还可以使用录制宏的功能自动 ......