How can I do uble click a WORD do cument,then run WORD with DELPHI?(200分)

  • 主题发起人 主题发起人 houdeping
  • 开始时间 开始时间
H

houdeping

Unregistered / Unconfirmed
GUEST, unregistred user!
1.我想用双击一个WORD文档,则执行WORD程序,并编辑此文档,应怎么编写?
(DELPHI 5)?
2.怎样在DEPHI中,运行另一个WINDOWS程序?
------------
1.I want to double click a WORD document,then windows run WORD PROGRAM,
and edit this document,what can I do in a Delphi Development Envirenment?
2.How to run a WINDOWS PROGRAM (EG. NOTE PAD) in DELPHI project?
 
1.使用 OleContainer ,选择好Object 就是 InsertObject
TOleContainer.AutoActivate 设置为aaGetFocus
2。使用~
第一下
 
你可以研究一下注册表!!!
ok?!
 
2。使用WinExec
UINT WinExec(
LPCSTR lpCmdLine, // 你要允许的命令
UINT uCmdShow // SW_SHOW 程序的显示方式
);
还可以使用CreateProcess,这样在NT下也可以使用
 
>>aolong
为什么要研究一下注册表??
 
2.uses ShellApi,调用函数ShellExecute,只需注意其中的一个PChar
类型参数的写法即可。如调用主页用 PChar('http://www.edu.cn'),
而调用邮件用 PChar('mailsto:yoller@263.net')。
 
1.使用 CreateOleObject('Excel.Application');
I have a Excel Ex.

2.procedure unitentry(execfilename:pchar);
var pno:integer;
begin
pno:=findwindow(nil,execfilename);
if pno<>0 then
begin
setforegroundwindow(pno);
showwindow(pno,sw_showdefault);
end
else
begin
if winexec(execfilename,sw_showdefault)<=31 then
begin
showmessage('对不起!该功能还未加入!');
abort;
end;
end;
end;
 
>>houdeping
解决了跟我说一下,因为,~我估计你又会遇到
许多新问题~
 
1、主要是shell编程;
2、user shellapi;
shellexecute;
 
多人接受答案了。
 
后退
顶部