This project has moved and is read-only. For the latest updates, please go here.

Wrong/strange automatic clicking of buttons...

Feb 17, 2014 at 10:03 AM
Hi there,

I am using InfoBox in my project and noticed a very strange effect.

Right from the start of my application a password modal dialog is presented; after password is introduced, splash screen is shown and some checks are done; based on this, a warning InfoBox should appear. Problem is that, the "Enter" I hit for login form is carried on for the warning dialog and clicked automatically on "Yes" button, without even seeing the Infobox dialog.

Is important to mention that when I use mouse click on login form, the issue is not present and InfoBox warning is shown correctly.

I am suspecting that maybe parent window could be wrongly assigned, but I don't have control over it.

I saw you are mentioning in the change-log that this is available, but cannot figure out how to use it.

Could you help?
Feb 17, 2014 at 10:10 AM

If you pass an instance of a class inheriting from System.Windows.Forms to the InfoShow.Show method, it will be used as the parent form for the InfoBox.

Hope this helps,
Feb 17, 2014 at 10:38 AM
Right, thanks for your fast reply.

Actually I already tried to change the code a bit by using:
"internal new InformationBoxResult Show(IWin32Window owner = null)"

I am curious if this would help to solve the mistery.

Feb 17, 2014 at 11:08 AM
When your app starts, can you please describe how the forms are created and displayed ?
It might be a problem regarding which one is the opening form.
Normally, the main form should open first, then it should prompt for the password, and then display the warning if applicable.
Feb 17, 2014 at 2:15 PM
Edited Feb 17, 2014 at 2:16 PM
Hi Johann,

Thanks for this. Actually, my application is quite big:
First a singleton static form is displayed for password handling. Only if password is valid, the application will prepare loading plugins with visual feedback on a splash-screen which is opened in parallel (a new thread and message pump). After loading all plugins successfully, the main form and message pump is created and UI is getting initialized (based on plugins; special checks are performed here - Infobox is being used here); during this time splash screen is still active. Splash-screen closes at the end of "MainForm_Loaded".

Anyway... I am trying also a workaround of performing plugin checks after splash screen is closed... let's see...

Feb 17, 2014 at 2:54 PM
I am completely confused, nothing from what I've tried worked...

When I have a second InfoBox dialog, as a confirmation after pressing "YES" on the first one... I see only the 2nd one, never the first one.

Maybe there is something else, but no idea what.