简体   繁体   English

如何抑制您刚刚从 C# 代码启动的应用程序的对话框/弹出 window?

[英]How to suppress dialog/popup window of application that you have just launched from your C# code?

From my C# app I'm launching annother app, which before execution sometimes show dialog/popup with some info.从我的 C# 应用程序中,我正在启动另一个应用程序,在执行之前有时会显示带有一些信息的对话框/弹出窗口。

Is it possible to suppress or hide this dialog and taskbar icon of the dialog?是否可以抑制或隐藏此对话框和对话框的任务栏图标?

EDIT编辑


Is it possible to intercept a call to the win32 function which would show this dialog and thus preventing a popup?是否可以拦截对 win32 function 的调用,该调用会显示此对话框,从而防止弹出窗口?

You can FindWindow via PInvoke and then send message WM_CLOSE or click Cancel button or whatever.您可以通过PInvoke FindWindow然后发送消息 WM_CLOSE 或单击取消按钮或其他任何内容。

Why dont you launch this second app after your sure that your main (parent) app is fully launched and displayed its window?在确定您的主(父)应用程序已完全启动并显示其 window 之后,为什么不启动第二个应用程序?

Most of the time such applications provide "Run in background (invisible)" argument that you can give when initiating them.大多数情况下,此类应用程序提供“在后台运行(不可见)”参数,您可以在启动它们时给出这些参数。 Check whether you have such a argument.检查你是否有这样的论点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 禁止从无人参与的代码启动的.NET应用程序的异常弹出窗口 - Suppress exception popup window for .NET application launched from unattended code c#如何禁止cmd.exe进程中的“不支持的16位应用程序”窗口弹出 - c# how to suppress “Unsupported 16-Bit Application” window popup in cmd.exe process 你会在VB中开发然后将你的代码转换为C#只是让你的整个团队使用一种语言吗? - Would you develop in VB and then convert your code to C# just to have your entire team use one language? 按下任意键后,您将如何刷新应用程序? C# - How would you go about refreshing your application once you have pressed any key? C# 如何检测从C#启动的新应用程序? - how to detect a new application being launched from C#? 从C#启动的工作应用程序失败 - Working application launched from C# fails 您如何发布或部署您的 C# 桌面应用程序? - How do you publish or deploy your C# desktop application? 从后端 c# 代码单击 hfref 打开一个弹出窗口 - Open a popup window on a hfref click from Backend c# code 在C#代码中如何以及在何处使用断言? - How and where are you using Assertions in your c# code? 如何使用GetForeGroundWindow()获取C#中新启动的应用程序窗口句柄? - How to use GetForeGroundWindow() to get newly launched application window handle in C#?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM