Julian
Posts: 4
Joined: Fri Sep 03, 2010 10:08 am

Uncheck a checkBox, then show a Message Box

Hello,

I want to show a MsgBox when the users unchecks a checkbox. Thats what I am trying:
  • Create a UI Custom Action (MessageBox)
  • Create a property P with value = "Lorem ipsum ad his scripta blandit partiendo.| Lorem Ipsum | MB_OK , MB_SETFOREGROUND , MB_ICONINFORMATION | | [CLIENTPROCESSID]"
  • Create a checkbox with two "Published Events"
  • The first published event makes the property [CustomActionData] point to the value of P when CHECKBOX <> "yes"
  • The second one is a DoAction of MessageBox with the same condition (CHECKBOX <> "yes")
The MessageBox appears when I check or uncheck the checkbox, I only want to show it in the second case. Why is the condition wrong?

Also, the text and title are right but the icon that should appear acording to MSDN doesnt appear, am I using bad arguments for MessageBox?

Thank very much
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Uncheck a checkBox, then show a Message Box

Hello,
The MessageBox appears when I check or uncheck the checkbox, I only want to show it in the second case. Why is the condition wrong?
Instead of (CHECKBOX <> "yes"), use the condition (NOT CHECKBOX) for both your "Check Box" control's published events.
Also, the text and title are right but the icon that should appear acording to MSDN doesnt appear, am I using bad arguments for MessageBox?
There has been a bug regarding this until the current version. It has been fixed and it is available starting with Advanced Installer 8.0.

Regards,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”