📄 229.htm
字号:
<!-- saved from url=(0022)http://internet.e-mail -->
<html>
<head>
<title>从当前的浏览器取得当前URL </title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="inc.css">
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#000000" vlink="195434" alink="195434">
<table width="621" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="621"><a href="http://www.CoDelphi.com"><img src="images/logo.gif" border="0" width="153" height="60"><img src="images/bigbanner.gif" border="0" width="468" height="60"></a></td>
</tr>
</table><br>
<br>
<table width="621" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td align="left" valign="top" class="font9" height="155">
<div align="center" class="btitle">从当前的浏览器取得当前URL <br>
<br>
</div>
<div align="center"><strong>Ruslan Abu Zant </strong></div>
<b><br>
摘 要</b>:我如何从浏览器得到默认的URL给程序,象Mirabilis&nbs<br>
<b> 关键字</b>:URL BROWSER <br>
<b> 类 别</b>:网络
<hr size="1" width="100%">
<span class="content"><br> 确定在uses子句中增加DDEMan。<br><br><br>uses windows, ddeman, ......<br><br><br>function Get_URL(Servicio: string): String;<br>var<br> Cliente_DDE: TDDEClientConv;<br> temp:PChar; //<<----------------这是新的<br>begin<br> Result := '';<br> Cliente_DDE:= TDDEClientConv.Create( nil );<br> with Cliente_DDE do<br> begin<br> SetLink( Servicio,'WWW_GetWindowInfo');<br> temp := RequestData('0xFFFFFFFF');<br> Result := StrPas(temp);<br> StrDispose(temp); //避免内存漏洞<br> CloseLink;<br> end;<br> Cliente_DDE.Free;<br>end;<br><br>procedure TForm1.Button1Click(Sender);<br>begin<br> showmessage(Get_URL('Netscape'));<br> or<br> showmessage(Get_URL('IExplore'));<br>end;</span>
<table border="0" cellspacing="0" cellpadding="1" class="font9" align="center" width="100%">
<tr align="left" valign="middle" bgcolor="195434">
<td height="1"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor="#C9C9C6" height="2"></td>
</tr>
</table>
<div align="center"><br>
中文开发在线<a href="http://www.codelphi.com" target="_blank">www.codelphi.com</a>授权使用。
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -