如何将MessageBox带到前台 [英] How to bring MessageBox to foreground

查看:65
本文介绍了如何将MessageBox带到前台的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是InstallShield-2010 XML脚本,消息将在后台显示。我希望它显示在前台。





The following is the InstallShield-2010 XML script with which the message will be displayed in the background. I want it to display in the foreground.


<setuplanncher.settings>
    <launcherextension>WarningMsgOp.dll</launcherextension> 
    <setup>
        <program>NDP40-KB982638-x86.exe</program> 
        <parameters>/q /norestart</parameters> 
    </setup>
    <postwarningmessage>If you choose to reboot, you must log-in under the same user name. </postwarningmessage> 
</setuplanncher.settings>





此处的消息如果您选择重启.....将显示在安装程序窗口后面。我希望它在前台。



使用C#创建一个exe,并将此xml作为命令行参数传递给该exe。



Here the message "If you choose to reboot....." will be displayed behind the installer window. I want it in foreground.

Using C#, an exe is created and this xml is passed as a command line argument to that exe.

推荐答案

如果您创建自己的表单来显示消息,那么将TopMost属性设置为true就足够了。
If you create your own form for displaying the message it's all a matter of setting it's TopMost property to true.


<setuplauncher.settings>
    <launcherextension>WarningMsgOp.dll<'/launcherextension> 
    <setup>
        <program>NDP40-KB982638-x86.exe<'/program> 
        <parameters>'/q '/norestart<'/parameters> 
    <'/setup>

<postwarningmessage>If you choose to reboot, you must log-in under the same user name. <'/postwarningmessage>

</postwarningmessage></parameters></program></setup></launcherextension></setuplauncher.settings>





或类似上述内容。如果您在设置启动器设置中执行发布警告消息,它将显示在后面,因此如果您在设置设置对话框后直接执行它,那么它将显示在顶部,因为它是最后一个语句执行。



哦,别忘了,拼写计数。



Or something like the above. If you execute the post warning message within the setup launcher settings, it gets displayed behind, so if you execute it directly after the setup settings dialog, then it will display on top, since it the last statement executed.

Oh, and don't forget, spelling counts.


这篇关于如何将MessageBox带到前台的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆