delphi2007 教程

delphi2007 教程

首页 新随笔 联系 聚合 管理
  1013 Posts :: 0 Stories :: 28 Comments :: 0 Trackbacks
这个代码应该怎么写??? Delphi / Windows SDK/API
http://www.delphi2007.net/DelphiDB/html/delphi_20061222151309162.html
我用DELPHI和SQL   SEVER做了一个系统,现在一个窗口做了一个  
  帮助按键,我想点它就能打开一个名为help.txt的使用帮助文档,代码要怎么写?  
  麻烦高手指教     (是不是begin和end中间要加什么代码?)  
  procedure   Tmainform.N11Click(Sender:   TObject);  
  begin  
   
  end;

shelllexecute

这个是什么?高手能写具体点吗?

uses   shellapi;  
   
   
  ShellExecute(self.Handle,   'Open',   'C:\aa.txt',   Nil,   Nil,   SW_SHOWNORMAL);

我加了  
  uses   shellapi;  
   
   
  ShellExecute(self.Handle,   'Open',   'C:\help.txt',   Nil,   Nil,   SW_SHOWNORMAL);  
   
   
  这样会报错啊  
  [Error]   Unit3.pas(245):   Statement   expected   but   'USES'   found  
  [Error]   Unit3.pas(246):   Undeclared   identifier:   'ShellExecute'  
  [Fatal   Error]   Project1.dpr(26):   Could   not   compile   used   unit   'Unit3.pas'  
   
 

没见到更。。。  
   
  implementation  
   
  uses   shellapi;  
   
  {$R   *.dfm}  
   
  procedure   Tmainform.N11Click(Sender:   TObject);  
  begin  
      ShellExecute(self.Handle,   'Open',   'C:\aa.txt',   Nil,   Nil,   SW_SHOWNORMAL);  
  end;  
 

posted on 2008-12-11 10:09 delphi2007 阅读(87) 评论(0)  编辑 收藏 引用
只有注册用户登录后才能发表评论。