Delphi实现操作Excel示例
implementation
uses ComOBJ;
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var ExcelAPP1:Variant;
ExcelApp2:Variant;
I,j: Integer;
ID,IDX:string;
begin
try
ExcelAPP1:=CreateOleObject('Excel.Application');
ExcelAPP1.Workbooks.Open('D:\Program Files\Embarcadero\Projects\操作Excel\奖.xls');
ExcelAPP2:=CreateOleObject('Excel.Application');
ExcelApp2.Workbooks.Open('D:\Program Files\Embarcadero\Projects\操作Excel\贫2.xls');
for I := 2 to 610 do
begin
Label1.Caption:=IntToStr(i)+'行';
ID:=trim(ExcelAPP1.cells[I,2].value);
for j := 4 to 549 do
begin
IDX:=trim(ExcelAPP2.cells[j,4].value);
if (IDX=ID) then
begin
ExcelAPP1.cells[i,12].value:='已建档';
Break;
end;
end;
end;
Label1.Caption:='全部完成,正在保存......';
ExcelAPP1.Save;
Label1.Caption:='全部完成,已保存';
finally
ExcelAPP1.WorkBooks.Close;
ExcelAPP1.Quit;
ExcelApp2.WorkBooks.Close;
ExcelAPP2.Quit;
end;
end;
相关文档:
uses WinInet;
procedure TForm1.Button1Click(Sender: TObject);
begin
if InternetGetConnectedState(nil, 0) then
ShowMessage('已连接')
else
ShowMessage('已断开');
end; ......
在群里看到有人发了个别人发给他的
我看了写的比较生动 在这转给大家看看
好的 拾取物体函数写好了 下步是如何将代码注入到游戏进程中执行??
1) 小偷开门
PHND:= OpenProcess (PROCESS_ALL_ACCESS, False, PID);得到游戏窗口句柄获得权限
2)小偷在房间搞个放作案方案的地方
TAdd := VirtualAllocEx(PHND, nil, 4096, ......
uses ShellAPI;
procedure TForm1.Button1Click(Sender: TObject);
begin
//用IE打开
ShellExecute(Handle, 'open', 'IExplore.EXE', 'about:blank', nil, SW_SHOWNORMAL);
//用火狐打开
ShellExecute(Handle, 'open', 'firefox.exe', 'about:blank', nil, SW_SHOWNORMAL);
//用默认浏览器打开
&nbs ......
flash是macromedia公司出品的,用在互联网上动态的、可互动的shockwave。它的优点是体积小,可边下载边播放,这样就避免了用户长时间的等待。
flash可以用其生成动画,还可在网页中加入声音。这样你就能生成多媒体的图形和界面,而使文件的体积却很小。
flash虽然不可以象一门语言 ......
要实现这一功能,首先要用到ActiveX控件中的TShockwaveFlash控件。
首先让我们来将TShockwaveFlash控件加入到Delphi的组件面板中(没有装Flash的朋友可以从网上下载一个Flash8.ocx文件来进行安装)
1.打开Delphi(本人用的是Delphi7.0)点击菜单中的Component->Import ActiveX Control...
2.在弹出的窗口中的Import ......