易截截图软件、单文件、免安装、纯绿色、仅160KB

Delphi在Vasta/win 7下获取权限

毕竟Win32程序的开发,Delphi还是有顽强的生命力的。
操作步骤如下:
1.建立 res 文件
建立一个文本文件,名字可以自己起,我这里叫:UAC.manifest,内容:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
建立文本文件,名为 UAC.rc,内容:
1 24 UAC.manifest
编译成 uac.res 文件,运行:
brcc32 uac.rc -fouac.res
2.在代码中引入
打开项目文件,加入
{$R uac.res}
3.编译程序
这时程序就支持 VISTA 了,在运行的时候,会弹出 WINDOWS 的提示框,询问用户是否允许以管理员身份运行。
 通过我自己实践,在Delphi7下面是可以的,但是在Delphi2009下面测试没有通过。


相关文档:

Delphi调用outlook

 //定义全局变量
public
{ Public declarations }
outlook,MailItem,Recipient:variant;
OutlookNameSpace:variant;
OutlookFolder:variant;
OutlookAttachment:variant;
//创建打开outlook
procedure TForm1.CreateOutLook;
begin
try
outlook:=CreateOleObject('OutLook.app ......

Delphi调用VC++6.0编写的Dll

用VC++6.0编写了一个简单的dll,里面包含一个减法函数subtract(int a,int b),Dll命名为ff.Dll
代码如下:
1.ff.cpp:
// ff.cpp : Defines the entry point for the DLL application.
//
#include "StdAfx.h"
#include "ff.h"
BOOL APIENTRY DllMain( HANDLE hModule,
        ......

Delphi 中的 Var buffer 开类型参数

以下是在网上收集的一些对无类型参数的说明.个人理解无类型变量就是一个指针.
象Delphi中function   Read(var   Buffer;   Count:   Longint):   Longint;   override;象Buffer这样没有类型的参数究竟应该怎么给参数????  
  这说明Buffer是通过地址方式传递的,一般说来只 ......

Delphi文件操作常用函数

====================================================
Delphi操作文件的一般步骤:
1)关联文件:
 AssignFile(var F; FileName :string);
2)初始化文件:
 Append(var F :Text);   
 //只写,于文件最后追加数据
 Reset(var F [; RecSize :Word]);     ......

delphi编程里的bool跟boolean类型有什么区别

bool是LongBool类型。
Delphi中定义了四种布尔类型:Boolean,ByteBool,WordBool和LongBool。后面三种布尔类型是为了与其他语言兼容而引入的,一般情况下建议使用Boolean类型。
这四种类型的布尔值占用内存的数量如下:
Boolean 1 Byte
ByteBool 1 Byte
WordBool 2 Bytes(1 Word)
LongBool 4 Bytes(2 Words)
对 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号