CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
不看会后悔的Windows XP之经验谈 简单快捷DIY实用家庭影院
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  Delphi >  网络通信/分布式开发

如何做超链接??

楼主ymhf19373200(菁雪)2003-09-01 20:45:25 在 Delphi / 网络通信/分布式开发 提问

我现在正在做一个医院管理系统,需要做一个超链接即将形如http://www.sina.com/做一个超链接???是用代码,还是有属性可以解决? 问题点数:20、回复次数:5Top

1 楼sixgj(轰炸机)回复于 2003-09-01 22:19:53 得分 5

代码了:  
   
   
  在uses中加:   ShellAPI  
   
  事件为:  
   
  procedure   TAboutForm.Label7Click(Sender:   TObject);  
  var  
      EmailAddr:   array[0..100]   of   Char;  
  begin  
      ShellExecute(Handle,   nil,StrPCopy(EmailAddr,   'mailto:'+lbMailAddress.Caption),   nil,   nil,   SW_SHOW);  
  end;  
  Top

2 楼yckxzjj(Delphi编程驿站[www.delphidak.com])回复于 2003-09-01 22:35:14 得分 0

楼上的方法不错Top

3 楼kukuasir(kuku)回复于 2003-09-01 23:04:29 得分 5

ShellExecute(   Handle,   'open',   'www.sina.com','','',SW_SHOWNORMAL   );Top

4 楼jpyc(九品-沉默)回复于 2003-09-02 07:45:06 得分 5

http://218.56.11.178:8020/web/index.aspx  
   
  ->     下载基地   ->例程-基础应用->实现发送邮件的链接和打开网页的连接Top

5 楼long102(龙102)回复于 2003-09-02 08:27:06 得分 5

ShellExecute(   Handle,   'open',   'http://www.sina.com/','','',SW_MAXIMIZE   );  
   
  USE   SHELLAPI  
  用法:HINSTANCE   ShellExecute(  
   
          HWND   hwnd, //   handle   to   parent   window  
          LPCTSTR   lpOperation, //   pointer   to   string   that   specifies   operation   to   perform  
          LPCTSTR   lpFile, //   pointer   to   filename   or   folder   name   string  
          LPCTSTR   lpParameters, //   pointer   to   string   that   specifies   executable-file   parameters    
          LPCTSTR   lpDirectory, //   pointer   to   string   that   specifies   default   directory  
          INT   nShowCmd   //   whether   file   is   shown   when   opened  
        );  
     
   
  Parameters  
   
  hwnd  
   
  Specifies   a   parent   window.   This   window   receives   any   message   boxes   that   an   application   produces.   For   example,   an   application   may   report   an   error   by   producing   a   message   box.  
   
  lpOperation  
   
  Pointer   to   a   null-terminated   string   that   specifies   the   operation   to   perform.   The   following   operation   strings   are   valid:  
   
  String Meaning  
  "open" The   function   opens   the   file   specified   by   lpFile.   The   file   can   be   an   executable   file   or   a   document   file.   The   file   can   be   a   folder   to   open.  
  "print" The   function   prints   the   file   specified   by   lpFile.   The   file   should   be   a   document   file.   If   the   file   is   an   executable   file,   the   function   opens   the   file,   as   if   "open"   had   been   specified.  
  "explore" The   function   explores   the   folder   specified   by   lpFile.    
     
   
  The   lpOperation   parameter   can   be   NULL.   In   that   case,   the   function   opens   the   file   specified   by   lpFile.    
   
  lpFile  
   
  Pointer   to   a   null-terminated   string   that   specifies   the   file   to   open   or   print   or   the   folder   to   open   or   explore.   The   function   can   open   an   executable   file   or   a   document   file.   The   function   can   print   a   document   file.    
   
  lpParameters  
   
  If   lpFile   specifies   an   executable   file,   lpParameters   is   a   pointer   to   a   null-terminated   string   that   specifies   parameters   to   be   passed   to   the   application.  
  If   lpFile   specifies   a   document   file,   lpParameters   should   be   NULL.    
   
  lpDirectory  
   
  Pointer   to   a   null-terminated   string   that   specifies   the   default   directory.    
   
  nShowCmd  
   
  If   lpFile   specifies   an   executable   file,   nShowCmd   specifies   how   the   application   is   to   be   shown   when   it   is   opened.     This   parameter   can   be   one   of   the   following   values:    
   
  Value Meaning  
  SW_HIDE Hides   the   window   and   activates   another   window.  
  SW_MAXIMIZE Maximizes   the   specified   window.  
  SW_MINIMIZE Minimizes   the   specified   window   and   activates   the   next   top-level   window   in   the   Z   order.  
  SW_RESTORE Activates   and   displays   the   window.   If   the   window   is   minimized   or   maximized,   Windows   restores   it   to   its   original   size   and   position.   An   application   should   specify   this   flag   when   restoring   a   minimized   window.  
  SW_SHOW Activates   the   window   and   displays   it   in   its   current   size   and   position.    
  SW_SHOWDEFAULT Sets   the   show   state   based   on   the   SW_   flag   specified   in   the   STARTUPINFO   structure   passed   to   the   CreateProcess   function   by   the   program   that   started   the   application.   An   application   should   call   ShowWindow   with   this   flag   to   set   the   initial   show   state   of   its   main   window.  
  SW_SHOWMAXIMIZED Activates   the   window   and   displays   it   as   a   maximized   window.  
  SW_SHOWMINIMIZED Activates   the   window   and   displays   it   as   a   minimized   window.  
  SW_SHOWMINNOACTIVE Displays   the   window   as   a   minimized   window.   The   active   window   remains   active.  
  SW_SHOWNA Displays   the   window   in   its   current   state.   The   active   window   remains   active.  
  SW_SHOWNOACTIVATE Displays   a   window   in   its   most   recent   size   and   position.   The   active   window   remains   active.  
  SW_SHOWNORMAL Activates   and   displays   a   window.   If   the   window   is   minimized   or   maximized,   Windows   restores   it   to   its   original   size   and   position.   An   application   should   specify   this   flag   when   displaying   the   window   for   the   first   time.  
     
   
  If   lpFile   specifies   a   document   file,   nShowCmd   should   be   zero.    
   
     
   
  Top

相关问题

  • 如何做超级链接?
  • 如何在label中做超链接?
  • 如何用VC++在对话框上做一个超级链接?
  • vb中如何做一个象网页中的mail超链接?
  • 请教:java的application里如何做超链接的效果?
  • 如何建立简单的超链接?
  • 如何给按扭加超链接?????????????
  • 如何在form上建个超链接?
  • 如何识别超链接的文字?
  • CRichEdit 中如何实现超链接?

关键词

  • sina
  • shellexecute
  • 超链接
  • lpctstr
  • sw
  • nil
  • pointer
  • handle
  • 做一个
  • that specifies

得分解答快速导航

  • 帖主:ymhf19373200
  • sixgj
  • kukuasir
  • jpyc
  • long102

相关链接

  • Delphi类图书
  • Delphi类源码下载
  • Delphi控件下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
北京创新乐知广告有限公司 版权所有, 京 ICP 证 070598 号
世纪乐知(北京)网络技术有限公司 提供技术支持
Copyright © 2000-2008, CSDN.NET, All Rights Reserved
GongshangLogo