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

📄 vb里怎么能关闭别的进程 vb - api - csdn社区 community_csdn_net.htm

📁 vb里怎么能关闭别的进程 VB - API
💻 HTM
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0048)http://topic.csdn.net/t/20030903/15/2219292.html -->
<HTML lang=zh-CN xml:lang="zh-CN" 
xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>vb里怎么能关闭别的进程? VB / API - CSDN社区 community.csdn.net</TITLE>
<META content=all name=robots>
<META http-equiv=Content-Language content=zh-CN>
<META http-equiv=Content-Type content="text/html; charset=utf-8"><LINK 
href="vb里怎么能关闭别的进程 VB - API - CSDN社区 community_csdn_net.files/topic.css" 
type=text/css rel=stylesheet>
<SCRIPT src="vb里怎么能关闭别的进程 VB - API - CSDN社区 community_csdn_net.files/Topic.js" 
type=text/javascript></SCRIPT>

<META 
content="hprogram terminateprocess byval openprocess kernel32 sub as long click lib command VB API" 
name=Keywords>
<META content=在XP下调用TerminateProcess(ProcessId,ExitCode)怎么都返回0,有其他函数可以用吗? 
name=description>
<META content="MSHTML 6.00.2800.1605" name=GENERATOR></HEAD>
<BODY>
<DIV id=wrapper>
<DIV id=innerWrapper>
<DIV id=logo>
<SCRIPT 
src="vb里怎么能关闭别的进程 VB - API - CSDN社区 community_csdn_net.files/csdn_ggmm.js"></SCRIPT>

<SCRIPT type=text/javascript>show_ads_zone(230);</SCRIPT>
<IMG style="DISPLAY: none" alt="" 
src="vb里怎么能关闭别的进程 VB - API - CSDN社区 community_csdn_net.files/pv.aspx"> 
<DIV>
<TABLE class=CSDN-PHF id=CSDNPHL cellSpacing=1 cellPadding=0 border=0>
  <TBODY>
  <TR>
    <TD><A href="http://www.csdn.net/" rel=external>CSDN首页</A></TD>
    <TD><A href="http://news.csdn.net/" rel=external>新闻</A></TD>
    <TD><A href="http://bbs.csdn.net/" rel=external><STRONG>论坛</STRONG></A></TD>
    <TD><A href="http://groups.csdn.net/" 
    rel=external><STRONG>小组</STRONG></A></TD>
    <TD><A href="http://blog.csdn.net/" 
    rel=external><STRONG>Blog</STRONG></A></TD>
    <TD><A href="http://dev.csdn.net/" rel=external>文档</A></TD>
    <TD><A href="http://download.csdn.net/" rel=external>下载</A></TD>
    <TD><A href="http://book.csdn.net/" rel=external>读书</A></TD>
    <TD><A href="http://tag.csdn.net/" 
rel=external><STRONG>Tag</STRONG></A></TD>
    <TD><A href="http://wz.csdn.net/" rel=external><STRONG>网摘</STRONG></A></TD>
    <TD><A href="http://search.csdn.net/" 
    rel=external><STRONG>搜索</STRONG></A></TD>
    <TD><A href="http://dotnet.csdn.net/" 
      rel=external><STRONG>.NET</STRONG></A></TD>
    <TD><A href="http://java.csdn.net/" 
    rel=external><STRONG>Java</STRONG></A></TD>
    <TD><A href="http://gamedev.csdn.net/" rel=external>游戏</A></TD>
    <TD><A href="http://live.csdn.net/" rel=external>视频</A></TD>
    <TD><A href="http://job.csdn.net/" rel=external>人才</A></TD>
    <TD><A href="http://prj.csdn.net/" rel=external>外包</A></TD>
    <TD><A href="http://www.dearbook.com.cn/" rel=external>第二书店</A></TD>
    <TD><A href="http://www.programmer.com.cn/" 
  rel=external>程序员</A></TD></TR></TBODY></TABLE>
<DIV id=logo>
<TABLE cellSpacing=0 cellPadding=0 width=760 border=0>
  <TBODY>
  <TR>
    <TD width=760 height=36><A href="http://g.csdn.net/5032319" 
      target=_blank><IMG height=40 
      src="vb里怎么能关闭别的进程 VB - API - CSDN社区 community_csdn_net.files/760.40.gif" 
      width=760 border=0></A></TD></TR>
  <TR id=bigFlash style="TEXT-ALIGN: center">
    <TD><A href="http://g.csdn.net/5032318" target=_blank><IMG height=300 
      src="vb里怎么能关闭别的进程 VB - API - CSDN社区 community_csdn_net.files/760.300.jpg" 
      width=760 border=0></A></TD></TR></TBODY></TABLE>
<SCRIPT type=text/javascript>setTimeout("document.getElementById('bigFlash').style.display='none'", 5000);</SCRIPT>
</DIV>
<TABLE>
  <TBODY>
  <TR>
    <TD><A href="http://community.csdn.net/" rel=external><IMG class=logo 
      alt=CSDN社区 
      src="vb里怎么能关闭别的进程 VB - API - CSDN社区 community_csdn_net.files/logo_csdn.gif"></A></TD>
    <TD>
      <SCRIPT type=text/javascript>show_ads_zone(228);</SCRIPT>
    </TD>
    <TD>
      <SCRIPT type=text/javascript>show_ads_zone(229);</SCRIPT>
    </TD></TR></TBODY></TABLE>
<DIV id=navigation>
<DIV id=search>
<DIV id=innerSearch><INPUT id=key onfocus="value=''"><A 
onclick="return Search()" 
href="http://topic.csdn.net/t/20030903/15/2219292.html#">搜索</A>&nbsp;|&nbsp;<A 
title=功能强大的网络收藏夹,一秒钟操作就可以轻松实现保存带来的价值、分享带来的快乐 
href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(saveit=window.open('http://wz.csdn.net/storeit.aspx?t='+escape(d.title)+'&amp;u='+escape(d.location.href)+'&amp;c='+escape(t),'saveit','scrollbars=no,width=590,height=300,left=75,top=20,status=no,resizable=yes'));saveit.focus();">收藏</A>&nbsp;|&nbsp;<A 
onclick="return Print()" 
href="http://topic.csdn.net/t/20030903/15/2219292.html#">打印</A>&nbsp;|&nbsp;<A 
onclick="return Close()" 
href="http://topic.csdn.net/t/20030903/15/2219292.html#">关闭</A> </DIV></DIV>
<DIV><A class=CSDNRoom href="http://community.csdn.net/" 
rel=external>CSDN社区</A>&nbsp;&gt;&nbsp; <A 
href="http://community.csdn.net/Expert/ForumsList.asp?typenum=1&amp;roomid=51" 
rel=external>VB</A>&nbsp;&gt;&nbsp; <A 
href="http://community.csdn.net/Expert/ForumList.asp?typenum=1&amp;roomid=5104" 
rel=external>API</A> </DIV></DIV>
<DIV id=mainWrapper>
<DIV id=pageContent>
<DIV id=innerContent>
<H1>vb里怎么能关闭别的进程?</H1>
<DIV class=author><A class=anchor name=Top>楼主</A>Bosee(電腦頑童)<INPUT class=user3 title="三级用户 该版得分小于等于1000分,大于500分" type=button>2003-09-03 
15:14:23 在 VB / API 提问</DIV>
<P>在XP下调用TerminateProcess(ProcessId,ExitCode)怎么都返回0,有其他函数可以用吗? 
<SPAN>问题点数:30、回复次数:1</SPAN><A 
href="http://topic.csdn.net/t/20030903/15/2219292.html#">Top</A> </P>
<DIV class=tagad><IFRAME 
src="vb里怎么能关闭别的进程 VB - API - CSDN社区 community_csdn_net.files/Board.htm" 
frameBorder=0 scrolling=no></IFRAME></DIV>
<H3><STRONG><A class=anchor name=r_15115084>1 楼</A>wyxxzg77(www)<INPUT class=user2 title="二级用户 该版得分小于等于500分,大于100分" type=button></STRONG><SPAN>回复于 
2003-09-03 15:21:06 得分 <EM>30</EM></SPAN></H3>
<P> <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Private &nbsp; Declare &nbsp; 
Function &nbsp; OpenProcess &nbsp; Lib &nbsp; "kernel32" &nbsp; (ByVal &nbsp; 
dwDesiredAccess &nbsp; _ &nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; As 
&nbsp; Long, &nbsp; ByVal &nbsp; bInheritHandle &nbsp; As &nbsp; Long, &nbsp; 
ByVal &nbsp; dwProcessId &nbsp; As &nbsp; Long) &nbsp; As &nbsp; Long &nbsp; 
<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Private &nbsp; Declare &nbsp; Function 
&nbsp; TerminateProcess &nbsp; Lib &nbsp; "kernel32" &nbsp; (ByVal &nbsp; 
hProcess &nbsp; _ &nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; As &nbsp; 
Long, &nbsp; ByVal &nbsp; uExitCode &nbsp; As &nbsp; Long) &nbsp; As &nbsp; Long 
&nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim &nbsp; x &nbsp; <BR>&nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
Private &nbsp; Sub &nbsp; Command1_Click() &nbsp; <BR>&nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; x &nbsp; = &nbsp; Shell("F:\财务成本核算\exe\menu.exe", &nbsp; 1) 
&nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End &nbsp; Sub &nbsp; <BR>&nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
Private &nbsp; Sub &nbsp; Command2_Click() &nbsp; <BR>&nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; hProgram &nbsp; = &nbsp; OpenProcess(1, &nbsp; False, 
&nbsp; x) &nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TerminateProcess 
&nbsp; hProgram, &nbsp; 0 &nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End 
&nbsp; Sub<A 
href="http://topic.csdn.net/t/20030903/15/2219292.html#">Top</A></P>
<H4><STRONG>相关问题</STRONG></H4>
<DIV class=relation>
<UL>
  <LI><A href="http://topic.csdn.net/t/20021113/12/1172409.html" 
  rel=external>如何在VB中正确将调用的Excel进程关闭?</A> 
  <LI><A href="http://topic.csdn.net/t/20021123/22/1200943.html" 
  rel=external>如何在vb中完全关闭excel进程?</A> 
  <LI><A href="http://topic.csdn.net/t/20050924/08/4290797.html" 
  rel=external>请教.....利用VB能否关闭win2000 进程中的system...</A> 
  <LI><A href="http://topic.csdn.net/t/20051102/16/4367011.html" 
  rel=external>用vb关闭外部正在运行的程序(进程),多谢,很急!~</A> 
  <LI><A href="http://topic.csdn.net/t/20020917/20/1031659.html" 
  rel=external>关于关闭进程</A> 
  <LI><A href="http://topic.csdn.net/t/20021203/14/1226795.html" 
  rel=external>怎么关闭excel进程!</A> 
  <LI><A href="http://topic.csdn.net/t/20050218/11/3789345.html" 
  rel=external>怎样关闭rar进程?</A> 
  <LI><A href="http://topic.csdn.net/t/20050418/10/3945104.html" 
  rel=external>如何关闭excel进程.</A> 
  <LI><A href="http://topic.csdn.net/t/20051031/14/4361422.html" 
  rel=external>如何关闭excel进程</A> 
  <LI><A href="http://topic.csdn.net/t/20051118/23/4403858.html" 
  rel=external>无法关闭EXCEL.EXE进程</A> </LI></UL></DIV></DIV></DIV>
<DIV id=sidebar>
<H3>关键词</H3>
<DIV>
<UL>
  <LI><A href="http://tag.csdn.net/tag/hprogram/" rel=external>hprogram</A> 
  <LI><A href="http://tag.csdn.net/tag/terminateprocess/" 
  rel=external>terminateprocess</A> 
  <LI><A href="http://tag.csdn.net/tag/byval/" rel=external>byval</A> 
  <LI><A href="http://tag.csdn.net/tag/openprocess/" 
  rel=external>openprocess</A> 
  <LI><A href="http://tag.csdn.net/tag/kernel32/" rel=external>kernel32</A> 
  <LI><A href="http://tag.csdn.net/tag/sub/" rel=external>sub</A> 
  <LI><A href="http://tag.csdn.net/tag/as%20long/" rel=external>as long</A> 
  <LI><A href="http://tag.csdn.net/tag/click/" rel=external>click</A> 
  <LI><A href="http://tag.csdn.net/tag/lib/" rel=external>lib</A> 
  <LI><A href="http://tag.csdn.net/tag/command/" rel=external>command</A> 
</LI></UL></DIV>
<H3>得分解答快速导航</H3>
<DIV>
<UL>
  <LI>帖主:<A 
  href="http://topic.csdn.net/t/20030903/15/2219292.html#Top">Bosee</A> 
  <LI><A 
  href="http://topic.csdn.net/t/20030903/15/2219292.html#r_15115084">wyxxzg77</A> 
  </LI></UL></DIV>
<H3>相关链接</H3>
<DIV>
<UL>
  <LI><A 
  href="http://www.dearbook.com.cn/Book/SearchBook.aspx?sortid=8&amp;sorttype=smallsort" 
  target=_blank>Visual Basic类图书</A> 
  <LI><A href="http://www.codechina.net/resource/sort.php/18" 
  target=_blank>Visual Basic类源码下载</A> </LI></UL></DIV>
<H3>广告也精彩</H3>
<DIV>
<SCRIPT 
src="vb里怎么能关闭别的进程 VB - API - CSDN社区 community_csdn_net.files/show_ads.js" 
type=text/javascript></SCRIPT>
</DIV>
<H3>反馈</H3>
<DIV>请通过下述方式给我们反馈<BR><IMG alt=反馈 
src="vb里怎么能关闭别的进程 VB - API - CSDN社区 community_csdn_net.files/feedback.gif"></DIV></DIV>
<DIV class=clear></DIV></DIV>
<DIV style="TEXT-ALIGN: center">
<DIV id=pubfooter style="WIDTH: 770px"><LINK 
href="vb里怎么能关闭别的进程 VB - API - CSDN社区 community_csdn_net.files/public_header_footer.css" 
type=text/css rel=stylesheet>
<DL>
  <DT>
  <DD><A href="http://www.csdn.net/help/intro.htm" target=_blank>网站简介</A>|<A 
  href="http://www.csdn.net/help/ads.htm" target=_blank>广告服务</A>|<A 
  href="http://www.csdn.net/help/vip.htm" target=_blank>VIP资费标准</A>|<A 
  href="http://www.csdn.net/help/bankaccount.htm" target=_blank>银行汇款帐号</A>|<A 
  href="http://www.csdn.net/help/sitemap.htm" target=_blank>网站地图</A>|<A 
  href="http://www.csdn.net/help/help.htm" target=_blank>帮助</A>|<A 
  href="http://www.csdn.net/help/contact.htm" target=_blank>联系方式</A>|<A 
  href="http://job.csdn.net/Jobs/f9c75c9f2ad14404a604669b757b9ed0/viewcompany.aspx" 
  target=_blank>诚聘英才</A>|<A href="http://www.csdn.net/help/english.htm" 
  target=_blank>English</A>|<A 
  onclick="window.location.href='mai'+'lto:'+'webm'+'aster@c'+'sdn.n'+'et?subject=Report To CSDN';return false" 
  href="http://topic.csdn.net/t/20030903/15/2219292.html#">问题报告</A> 
  <DD>世纪乐知(北京)网络技术有限公司 版权所有,&nbsp;京&nbsp;ICP&nbsp;证&nbsp;020026&nbsp;号 
  <DD>北京创新乐知广告有限公司 提供技术支持 
  <DD class=small>Copyright © 2000-2007, CSDN.NET, All Rights Reserved 
  <DD><A 
  href="http://www.hd315.gov.cn/beian/view.asp?bianhao=010202001032100010" 
  target=_blank><IMG alt=GongshangLogo 
  src="vb里怎么能关闭别的进程 VB - API - CSDN社区 community_csdn_net.files/gongshang_logos.gif"></A> 
  </DD></DL>
<SCRIPT src="vb里怎么能关闭别的进程 VB - API - CSDN社区 community_csdn_net.files/counter.js" 
type=text/javascript></SCRIPT>

<SCRIPT 
src="vb里怎么能关闭别的进程 VB - API - CSDN社区 community_csdn_net.files/clickeye.js"></SCRIPT>

<HR>
<!--google   Analytics begin -->
<SCRIPT src="vb里怎么能关闭别的进程 VB - API - CSDN社区 community_csdn_net.files/urchin.js" 
type=text/javascript>
        </SCRIPT>

<SCRIPT type=text/javascript>
_uacct = "UA-2688088-7";
urchinTracker();
        </SCRIPT>
<!--google   Analytics end --><!-- Control Code/Caption.Yo-Focus-->
<SCRIPT language=JavaScript1.1>
var afp_keyword_BDA9CBA6_5658_A4DB_7E1D_1B781AF3DEE8 = "";
if (document.title != "")
	afp_keyword_BDA9CBA6_5658_A4DB_7E1D_1B781AF3DEE8 = document.title;
if (window.keywords)
	afp_keyword_BDA9CBA6_5658_A4DB_7E1D_1B781AF3DEE8 += window.keywords.content;
if (window.description)
	afp_keyword_BDA9CBA6_5658_A4DB_7E1D_1B781AF3DEE8 += window.description.content;

if (document.innerTEXT)
	afp_all_keyword_BDA9CBA6_5658_A4DB_7E1D_1B781AF3DEE8 = document.innerTEXT;

if(afp_keyword_BDA9CBA6_5658_A4DB_7E1D_1B781AF3DEE8.length > 273) 
{
	afp_keyword_BDA9CBA6_5658_A4DB_7E1D_1B781AF3DEE8 = afp_keyword_BDA9CBA6_5658_A4DB_7E1D_1B781AF3DEE8.substring(0,273);
}

document.write("<scr"+"ipt src='http://server.yoyi.com.cn/afp/get/;pl_id=BDA9CBA6_5658_A4DB_7E1D_1B781AF3DEE8;tp=js;sk=0;ck=0;ext_key="+afp_keyword_BDA9CBA6_5658_A4DB_7E1D_1B781AF3DEE8+";u_id=afu;ex_id=;/?'></scr"+"ipt>");
        </SCRIPT>
<!-- Control Code End/No.csdn--></DIV></DIV></DIV></DIV></DIV></DIV></BODY></HTML>

⌨️ 快捷键说明

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