加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

如何在vb.net中启动一个不可见的进程?

发布时间:2020-12-17 00:07:36 所属栏目:大数据 来源:网络整理
导读:是否可以使用system.diagnostics.process.start(“Process.exe”) 但是这个过程不会被用户看到? 例如,我想使用 Windows媒体播放器在后台播放音频,音频将播放,但wmp将不可见.可能吗? 试试这个: Dim startInfo As New ProcessStartInfo("mplayer2.exe")star
是否可以使用system.diagnostics.process.start(“Process.exe”)
但是这个过程不会被用户看到?
例如,我想使用 Windows媒体播放器在后台播放音频,音频将播放,但wmp将不可见.可能吗?
试试这个:
Dim startInfo As New ProcessStartInfo("mplayer2.exe")
startInfo.WindowStyle = ProcessWindowStyle.Hidden

Process.Start(startInfo)

ProcessWindowStyle.Hidden:

The hidden window style. A window can be either visible or hidden. The system displays a hidden window by not drawing it. If a window is hidden,it is effectively disabled. A hidden window can process messages from the system or from other windows,but it cannot process input from the user or display output. Frequently,an application may keep a new window hidden while it customizes the window’s appearance,and then make the window style Normal.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读