Displaying a messagebox from a plugin ??

This is where you talk about Plugins. How they are made and how they work, show examples.

Displaying a messagebox from a plugin ??

Postby beefy » Tue Nov 15, 2016 5:58 am

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.
beefy
 
Posts: 449
Joined: Mon Sep 05, 2016 10:34 am

Re: Displaying a messagebox from a plugin ??

Postby shad » Tue Nov 15, 2016 8:43 am

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)
{

}
-- Andrew
UC400ETH
UC300ETH-5LPT
NEURON Lite THC
http://neuroncnc.com/
shad
 
Posts: 331
Joined: Thu Sep 15, 2016 5:23 pm

Re: Displaying a messagebox from a plugin ??

Postby beefy » Tue Nov 15, 2016 12:12 pm

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.
beefy
 
Posts: 449
Joined: Mon Sep 05, 2016 10:34 am

Re: Displaying a messagebox from a plugin ??

Postby ger21 » Tue Nov 15, 2016 1:22 pm

Standard .NET function. It's almost the exact same thing in VB.net
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2663
Joined: Sat Sep 03, 2016 2:17 am

Re: Displaying a messagebox from a plugin ??

Postby beefy » Tue Nov 15, 2016 7:30 pm

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.
beefy
 
Posts: 449
Joined: Mon Sep 05, 2016 10:34 am


Return to Plugins

Who is online

Users browsing this forum: Bing [Bot] and 6 guests