简体   繁体   中英

Mono & WInforms on OS X

I have just begun to explore the mono winforms environment and I cannot work out how to start a program from within monodevelop without a console session being started.

My simple program runs okay but when it exits a terminal session is always created & waiting for me to 'press any key'. I guess I could arrange things so that the terminal window closes automatically, but I would rather the app just ran 'natively', is this possible or does the way mono & .net function work preclude it?

As shown in the examples at Zetcode , in 'Main' the rest of the code is started with 'application.run(new aFunction());', I thought this might be the cause of the terminal session occurring but replacing it with:


myNewClass n = new myNewClass();
n.aFunction();

causes the program to not run at all (or maybe just exit without doing anything).

I am an experienced programmer but not familiar at all with C# or the mono/.net environment so 'stating the obvious' may be all that is required in an answer.

MonoDevelop will usually let you start a program with or without it running in an external console.

In MonoDevelop 2.8 on Linux you can control this by context clicking on a project in the solution tree and selecting Options ; then Run on external console under the Run section. I'm not sure if you can disable this on OSX.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM