Page 1 of 1

Displaying a messagebox from a plugin ??

PostPosted: Tue Nov 15, 2016 5:58 am
by beefy
I noticed in macros there is "Messagebox.Show()" but that is not available in the plugin.

The list of methods available in Entry UC does not seem to have anything related to showing a message box.

I tried "Console.WriteLine()" but that just doesn't seem to work from a plugin.

Keith.

Re: Displaying a messagebox from a plugin ??

PostPosted: Tue Nov 15, 2016 8:43 am
by shad
Hello Keith!
For example you have to use this C# operator:
Code: Select all
MessageBox.Show("Your message", "MessageBox caption text", MessageBoxButtons.OK, MessageBoxIcon.Error);

Or make dialog:
Code: Select all
if (MessageBox.Show("Your question", "NeMessageBox caption text", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{

}

Re: Displaying a messagebox from a plugin ??

PostPosted: Tue Nov 15, 2016 12:12 pm
by beefy
Aha, that's how it's done. I got locked into thinking it was a function built into the plugin.

I'm so happy with you Andrew it's a good job you are not near me, I might just give you a big manhug :lol:

Thanks very much,

Keith.

Re: Displaying a messagebox from a plugin ??

PostPosted: Tue Nov 15, 2016 1:22 pm
by ger21
Standard .NET function. It's almost the exact same thing in VB.net

Re: Displaying a messagebox from a plugin ??

PostPosted: Tue Nov 15, 2016 7:30 pm
by beefy
ger21 wrote:Standard .NET function. It's almost the exact same thing in VB.net


Cheers Gerry.

Yes, I realised that after Andrew showed it to me (and then gave myself a good slap).

Keith.