We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

Dashut
Posts: 142
Joined: Tue May 04, 2010 4:41 pm

MessageBox appear in the background instead of foreground

Using AI 7.7:
At some stage in the installation, I want to show a messageBox, but for some reason this messageBox appears in the background and not in the foreground.
What this means is that the person installing waits, and maybe at some later stage notices that something is not "moving" and somehow notices that the installer has created another window in the taskbar which has my message....

I have tried showing the messageBox with your custom action dll and function "MessageBox", but it was in the background.
I also tried showing my message with the VisualBasic Script: MsgBox "my message", but that also appeared in the background.

Maybe this has to do with a previous custom action that was run in the background - I'm not sure, but I would for sure want that the message will appear in the foreground (setfocus).

What must I do to achieve this?
Dashut.
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: MessageBox appear in the background instead of foreground

Hi Dashut,

This probably happens because the message box doesn't receives the handle for the parent window.

I recommend you use our "Message Box" predefined custom action to show the desired message. This is a custom message box created by us which enumerates all the windows
from the desktop in order to obtain the handle for the parent windows and displays the message in the foreground.

Please let me know if you have other questions.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Dashut
Posts: 142
Joined: Tue May 04, 2010 4:41 pm

Re: MessageBox appear in the background instead of foreground

Using AdvancedInstaller 7.7: there's no such thing as:

Code: Select all

On the Custom Actions page, right click where you want to add your message box, then from the context menu select "New Custom Action"->"Message Box" 
from "New Custom Action", there's: "Error Message".
And it doesn't have "Action Data" as said:

Code: Select all

Parameters for this custom action must be placed in the "Action Data" field. Data in the "Action Data" field must be placed in the following format:
instead: there's "Message Text:".

I think this means that your link is not updated (http://www.advancedinstaller.com/user-g ... e-box.html)

Please advise, Dashut.
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: MessageBox appear in the background instead of foreground

Hi,

It seems there is a small mistake in the article, I shall correct it as soon as possible.

It should have said this: "... from the context menu select "Add Predefined Custom Action" -> "Message Box"".

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Dashut
Posts: 142
Joined: Tue May 04, 2010 4:41 pm

Re: MessageBox appear in the background instead of foreground

Oh, yes, that one I see now.
One question though on the "Error Message":
If what I experience is correct: after displaying the "Error Message": the installation terminates. Is that exactly what this is intended for? (to show a message box that after that the installer fails the installation?).

Dashut.

P.S: I've noticed that the title for this Error message window is "Installer information". Can this be changed (for example to be "Error" or something like that...)?
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: MessageBox appear in the background instead of foreground

Hi Dashut,
. Is that exactly what this is intended for?
Yes, this is the exact purpose of this custom action.
P.S: I've noticed that the title for this Error message window is "Installer information". Can this be changed ?
No, if the window title is "Installer Information" it means the error message is given by Windows Installer and you cannot change it.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Feature Requests”