在C#.Net中的自定义安装程序中显示表单

在C#.Net中的自定义安装程序中显示表单,c#,C#,当我调用topmostForm.ShowDialog()时,时间表单显示在默认安装程序屏幕的背面。 我想把它放在前面。 我想你明白我的意思了。。。。 请帮帮我……对我有效的方法是从表单.Load事件中调用激活 [RunInstaller(true)] public partial class Installer1 : Installer { public Installer1() { InitializeComponent(); } publi

当我调用topmostForm.ShowDialog()时,时间表单显示在默认安装程序屏幕的背面。 我想把它放在前面。 我想你明白我的意思了。。。。
请帮帮我……

对我有效的方法是从
表单.Load
事件中调用
激活

 [RunInstaller(true)]
public partial class Installer1 : Installer
{
    public Installer1()
    {
        InitializeComponent();
    }

    public override void Install(System.Collections.IDictionary stateSaver)
    {
        base.Install(stateSaver);
    }
    private void Installer1_AfterInstall(object sender, InstallEventArgs e)
    {
        Form1 topmostForm = new Form1();
        topmostForm.BringToFront();
        topmostForm.TopMost = true;            
        topmostForm.ShowDialog();
     }
 }

对我来说,有效的方法是从
Form.Load
事件调用
Activate

 [RunInstaller(true)]
public partial class Installer1 : Installer
{
    public Installer1()
    {
        InitializeComponent();
    }

    public override void Install(System.Collections.IDictionary stateSaver)
    {
        base.Install(stateSaver);
    }
    private void Installer1_AfterInstall(object sender, InstallEventArgs e)
    {
        Form1 topmostForm = new Form1();
        topmostForm.BringToFront();
        topmostForm.TopMost = true;            
        topmostForm.ShowDialog();
     }
 }