XiaoFaye
Posts: 11
Joined: Mon Jun 16, 2014 9:22 pm

Installer change it's location after return from a Dialog

Hi,

In my Installer, I added a custom action which is launch attached file, this custom action will be executed when I click the "Next" button of the WelcomeDlg.

The attached file is a .NET exe file I made, following are what it does:
1. get the handle of the installer main window.
2. call the ShowDialog function of a Windows Form and pass the handle in step 1.
3. return "OK" dialog result when closing the Windows Form.

when I was testing the Installer, it works fine. the windows form shows on the screen after I click the "Next" button, and I can't go back to the installer unless I close the windows form, which is exactly what I need.

however, after I close the windows form, the installer change it's location to the left bottom corner, I don't know why this is happening, in my little exe file, it doesn't change anything of the installer.

Works fine here
inst1.png
inst1.png (127.69 KiB) Viewed 4067 times
change it's location after I close the dialog.
inst2.png
inst2.png (81.1 KiB) Viewed 4067 times
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Installer change it's location after return from a Dialo

Hello,

I'm not sure why you encountered this behavior.
Did you center the window on the center screen? Please take a look on the How do I center a window onscreen in c#? thread which debates this subject.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
XiaoFaye
Posts: 11
Joined: Mon Jun 16, 2014 9:22 pm

Re: Installer change it's location after return from a Dialo

Hi

I found the problem. it turns out that I forgot to release the handle in my little exe file, now, it's working fine.

Cheers,
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Installer change it's location after return from a Dialo

Hi,

I'm glad you got this working. If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”