Page 1 of 1

Close MessageBox through code

Posted: Mon Mar 24, 2014 8:38 am
by bjornidar
Hi,

I've done some searching and testing to try and close a messagebox through code - as well as using SendWait({ENTER}), though without any results.

Does anyone have an example/ method to get this working?

I've implemented some WCF to communicate with another .NET application and to keep the host open as long as MessageBox is open, it would be nice to close this box with code.

Re: Close MessageBox through code

Posted: Mon Mar 24, 2014 11:03 am
by stuartm
Hello Sir,

Don't use the Message.Show() dialog box.

1) Create a screen
2) Configure screen. General -> select Popup
3) Add a button. While selected -> close screen

The next is create an event in your script


Globals.Screen2.Closed += (s,ss) => {
MessageBox.Show("I'm closed!");
};

Replace MessageBox with your web service business logic.

Best Regards,
Stuart

Re: Close MessageBox through code

Posted: Tue Apr 01, 2014 5:33 am
by bjornidar
Hi, and thank's for your answer!

Will this keep the WCF-server allive without "crashing" the iX?
I've tried to keep the WCF-server alive with a while-loop and wait for a spesific reply from the WCF-client and then close the server.
But this only made the iX crash.