开发者

Show form in Custom Installer in C#.Net

开发者 https://www.devze.com 2023-03-10 08:51 出处:网络
[RunInstaller(true)] public partial class Installer1 : Installer { public Installer1() { InitializeComponent();
 [RunInstaller(true)]
public partial class Installer1 : Installer
{
    public Installer1()
    {
        InitializeComponent();
    }

    public override void Install(System.Collections.IDictionary stateSaver)
    {
        base.Install(stateSaver);
    }
    private void In开发者_运维百科staller1_AfterInstall(object sender, InstallEventArgs e)
    {
        Form1 topmostForm = new Form1();
        topmostForm.BringToFront();
        topmostForm.TopMost = true;            
        topmostForm.ShowDialog();
     }
 }

When i Call topmostForm.ShowDialog() that time form is shown in back side of default installer screen. I want to it front side. I think you got my idea.... Please help me....


What worked for me was to call Activate from the Form.Load event.

private void Form1_Load(object sender, EventArgs e)
{
  Active();
}
0

精彩评论

暂无评论...
验证码 换一张
取 消