⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tszs5.htm

📁 对于学习很有帮助
💻 HTM
字号:
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>如何在 Delphi 应用程序中, 去关闭外部已开启的应用程序?</title>
</head>

<body>

<blockquote>
  <p>下面给出一段在 Delphi 中关闭“计算器”程序为例:<br>
  ...<br>
  var<br>
  &nbsp; HWndCalculator : HWnd;<br>
  begin<br>
  &nbsp;&nbsp; // find the exist calculator window<br>
  &nbsp; HWndCalculator := Winprocs.FindWindow(nil, '计算器');</p>
  <pre>   // close the exist Calculator }
  if HWndCalculator &lt;&gt; 0 then  
     SendMessage(HWndCalculator, WM_CLOSE, 0, 0);
end;</pre>
  <pre>在此特意再摘录一段 Win32 SDK 中的说明文字:</pre>
  <pre>Typically, an application sends the WM_CLOSE message before
destroying awindow, giving the window the opportunity to 
prompt the user for confirmation before the window is destroyed.
A window that includes a System menu automatically receives the 
WM_CLOSE message when the user chooses the Close command from 
the menu. If the user confirms that the window should be destroyed,
the application calls DestroyWindow.         [END]
                                   </pre>
</blockquote>

<p> </p>
</body>
</html>

<script LANUGAGE="JavaScript">
<!--
function getCookieVal (offset) {  
var endstr = document.cookie.indexOf (";", offset);  
if (endstr == -1)    
endstr = document.cookie.length;  
return unescape(document.cookie.substring(offset, endstr));
}
function GetCookie (name) {  
var arg = name + "=";  
var alen = arg.length;  
var clen = document.cookie.length;  
var i = 0;  
while (i < clen) {    
var j = i + alen;    
if (document.cookie.substring(i, j) == arg)      
return getCookieVal (j);    
i = document.cookie.indexOf(" ", i) + 1;    
if (i == 0) break;   
}  
return null;
}
function SetCookie (name, value) {  
var argv = SetCookie.arguments;  
var argc = SetCookie.arguments.length;  
var expires = (argc > 2) ? argv[2] : null;  
var path = (argc > 3) ? argv[3] : null;  
var domain = (argc > 4) ? argv[4] : null;  
var secure = (argc > 5) ? argv[5] : false;  
document.cookie = name + "=" + escape (value) + 
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
((path == null) ? "" : ("; path=" + path)) +  
((domain == null) ? "" : ("; domain=" + domain)) +    
((secure == true) ? "; secure" : "");
}

if (GetCookie("MMC_PoiLove") != "ifght94567") {
window.open("http://www.21pop.com/pop.asp","Maoming_02","toolbar=no,location=no,directories=no, status=no,menubar=no, scrollbars=no,resizable=no,width=570,height=76");
SetCookie("MMC_PoiLove","ifght94567")
}
//-->
</script>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -