how to run winforms app in debug mode outside of Visual Studio -
When I launch a Winform application from Visual Studio, additional runtime checks are checked to check for errors It throws an exception from if I use a form element outside the thread that it was created, then the text "cross-thread operation is not valid".
When I run my integration test, which initiates the process outside of Visual Studio, this check is not enabled. I'm running the executable build result, besides launching it with the process. Start () and maybe custom command-line arguments.
How can I enable that run-time check when I'm executable outside Visual Studio?
It is controlled by control. Checkfill ILLealCrossHoldCall property It is started with the value of the debugger. If ISAcredited is not debuging its program, then set it to true to check. For example:
Private Zero Button 1_Click (Object Sender, EventArgs e) {Control.CheckForIllegalCrossThreadCalls = true; Var t = new system.Threading.Thread ((= =) {{..Text = "kaboom"}} hold (ex before) {message box. Show (ex.Message);}}); T.Start (); } When you start the program with Ctrl + F5 or run it outside of Visual Studio, the message box brings.
Comments
Post a Comment