gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-04 01:16:06 25 4
gpt4 key购买 nike

是否可以使用 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.

关于vb.net - 如何在 vb.net 中启动一个不可见的进程?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2048035/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com