包含vb点虐 中shell的词条

VB点虐 显示 Shell 时 隐藏的程序

AppWinStyle.Hide 隐藏窗口并为隐藏的窗口提供焦点。

专注于为中小企业提供成都网站制作、网站建设、外贸网站建设服务,电脑端+手机端+微信端的三站合一,更高效的管理,为中小企业交口免费做网站提供优质的服务。我们立足成都,凝聚了一批互联网行业人才,有力地推动了上千企业的稳健成长,帮助中小企业通过网站建设实现规模扩充和转变。

AppWinStyle.NormalFocus 为窗口提供焦点,并以最近的大小和位置显示窗口。

AppWinStyle.MinimizedFocus 为窗口提供焦点,并以图标的形式显示窗口。

AppWinStyle.MaximizedFocus 为窗口提供焦点,并以全屏方式显示窗口。

AppWinStyle.NormalNoFocus 将窗口设置为最近的大小和位置。当前活动窗口保持焦点。

AppWinStyle.MinimizedNoFocus 以图标的形式显示窗口。当前活动窗口保持焦点。 ***********************你上面用的是AppWinStyle.Hide ,当然看不见窗口,应该使用AppWinStyle.NormalFocus就可以切换到新打开的程序了

vb点虐 中,Kill和Shell("del xxxx /f /q")这两个语句哪个更强力?

你可以直接用VB的Kill命令来删除文件:

Kill "C:\Program Files\3000soft\Red Spider\REDAgent.exe"

一定要用del的话则这样:

Shell "cmd /c del 'C:\Program Files\3000soft\Red Spider\REDAgent.exe'"

补充说一下:你要给整个路径加引号,而不是给每个文件夹名加引号!另外,在字符串内,要用单引号,或者用两个双引号来代表一个双引号,比如:

Shell "cmd /c del ""C:\Program Files\3000soft\Red Spider\REDAgent.exe"""

VB点虐 中的shell在C#中怎么写

下面是例子,或许对你有用:

using   System;   

using   System.Diagnostics;   

using   System.ComponentModel;   

namespace   MyProcessSample   

{   

///   summary   

///   Shell   for   the   sample.   

///   /summary   

public   class   MyProcess   

{   

//   These   are   the   Win32   error   code   for   file   not   found   or   access   denied.   

const   int   ERROR_FILE_NOT_FOUND   =2;   

const   int   ERROR_ACCESS_DENIED   =   5;   

///   summary   

///   Prints   a   file   with   a   .doc   extension.   

///   /summary   

public   void   PrintDoc()   

{   

Process   myProcess   =   new   Process();   

try   

{   

//   Get   the   path   that   stores   user   documents.   

string   myDocumentsPath   =     

Environment.GetFolderPath(Environment.SpecialFolder.Personal);   

myProcess.StartInfo.FileName   =   myDocumentsPath   +   "\\MyFile.doc";     

myProcess.StartInfo.Verb   =   "Print";   

myProcess.StartInfo.CreateNoWindow   =   true;   

myProcess.Start();   

}   

catch   (Win32Exception   e)   

{   

if(e.NativeErrorCode   ==   ERROR_FILE_NOT_FOUND)   

{   

Console.WriteLine(e.Message   +   ".   Check   the   path.");   

}     

else   if   (e.NativeErrorCode   ==   ERROR_ACCESS_DENIED)   

{   

//   Note   that   if   your   word   processor   might   generate   exceptions   

//   such   as   this,   which   are   handled   first.   

Console.WriteLine(e.Message   +     

".   You   do   not   have   permission   to   print   this   file.");   

}   

}   

}   

public   static   void   Main()   

{   

MyProcess   myProcess   =   new   MyProcess();   

myProcess.PrintDoc();   

}   

}   

}

本文标题:包含vb点虐 中shell的词条
URL标题:https://www.cdcxhl.com/article8/ddsphop.html

成都网站建设公司_创新互联,为您提供网站设计App开发品牌网站建设网站策划云服务器ChatGPT

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

搜索引擎优化