Click here to Skip to main content
15,888,212 members
Home / Discussions / C#
   

C#

 
AnswerRe: Creating Blank if zero decimal format string Pin
Wendelius30-Aug-08 7:50
mentorWendelius30-Aug-08 7:50 
GeneralRe: Creating Blank if zero decimal format string Pin
AndrusM31-Aug-08 5:58
AndrusM31-Aug-08 5:58 
GeneralRe: Creating Blank if zero decimal format string Pin
Wendelius31-Aug-08 6:33
mentorWendelius31-Aug-08 6:33 
GeneralRe: Creating Blank if zero decimal format string Pin
AndrusM31-Aug-08 9:57
AndrusM31-Aug-08 9:57 
GeneralRe: Creating Blank if zero decimal format string Pin
Wendelius31-Aug-08 10:24
mentorWendelius31-Aug-08 10:24 
GeneralRe: Creating Blank if zero decimal format string Pin
AndrusM31-Aug-08 10:35
AndrusM31-Aug-08 10:35 
GeneralRe: Creating Blank if zero decimal format string Pin
Wendelius31-Aug-08 10:58
mentorWendelius31-Aug-08 10:58 
QuestionCommandLineProcess Pin
netDeveloper30-Aug-08 5:34
netDeveloper30-Aug-08 5:34 
Hi
I want to start a console app from a windows form(VS 2005) and show messages sent by the console app in a textbox, so I've used CommandLineProcess.
I declared an instance like this:

CommandLineProcess cmdLP = new CommandLineProcess();


then, I attached an event handler to the outputline event in the constuctor like this:

cmdLP.OutputLine += new CommandLineProcess.OutputLineEventHandler(OnOutputLine)


The OnOutputLine method looks like this:

private void OnOutputLine(object sender, CommandLineProcess.OutputLineEventArgs e)
       {
           try
           {
               if ((e.Text == null) || (e.Text.Length == 0))
               {
                   return;
               }

               //txtDepDetails is static textbox
               Form1.txtDepDetails.Text = e.Text;
           }
           catch (Exception ex)
           {
               throw ex;
           }
       }

The error i get when i try to run this line

Form1.txtDepDetails.Text = e.Text;



"Source = Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack."

I have searched the web but found solutions for web apps, not for win forms.
And i have already made sure that the app is starting in debug mode and that Supress JIT optimization is checked.

Could you give me some suggestions?
Thank you very much.
AnswerRe: CommandLineProcess Pin
Daniel Grunwald30-Aug-08 10:09
Daniel Grunwald30-Aug-08 10:09 
GeneralRe: CommandLineProcess Pin
netDeveloper31-Aug-08 0:26
netDeveloper31-Aug-08 0:26 
QuestionHow not to close the window Pin
Silvyster30-Aug-08 2:52
Silvyster30-Aug-08 2:52 
AnswerRe: How not to close the window Pin
Anthony Mushrow30-Aug-08 2:58
professionalAnthony Mushrow30-Aug-08 2:58 
AnswerRe: How not to close the window Pin
Abhijit Jana30-Aug-08 3:03
professionalAbhijit Jana30-Aug-08 3:03 
AnswerRe: How not to close the window Pin
DaveyM6930-Aug-08 8:43
professionalDaveyM6930-Aug-08 8:43 
QuestionListviewcontrol and background color Pin
Yustme30-Aug-08 1:09
Yustme30-Aug-08 1:09 
AnswerRe: Listviewcontrol and background color Pin
Wendelius30-Aug-08 3:02
mentorWendelius30-Aug-08 3:02 
GeneralRe: Listviewcontrol and background color Pin
Yustme30-Aug-08 7:47
Yustme30-Aug-08 7:47 
GeneralRe: Listviewcontrol and background color Pin
Wendelius30-Aug-08 8:03
mentorWendelius30-Aug-08 8:03 
GeneralRe: Listviewcontrol and background color Pin
Yustme30-Aug-08 8:40
Yustme30-Aug-08 8:40 
GeneralRe: Listviewcontrol and background color Pin
Wendelius30-Aug-08 8:57
mentorWendelius30-Aug-08 8:57 
GeneralRe: Listviewcontrol and background color Pin
Yustme30-Aug-08 10:50
Yustme30-Aug-08 10:50 
GeneralRe: Listviewcontrol and background color Pin
Wendelius30-Aug-08 11:05
mentorWendelius30-Aug-08 11:05 
GeneralRe: Listviewcontrol and background color Pin
Yustme30-Aug-08 22:08
Yustme30-Aug-08 22:08 
GeneralRe: Listviewcontrol and background color Pin
Wendelius30-Aug-08 22:27
mentorWendelius30-Aug-08 22:27 
GeneralRe: Listviewcontrol and background color [modified] Pin
Yustme31-Aug-08 0:14
Yustme31-Aug-08 0:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.