Click here to Skip to main content
16,011,608 members
Home / Discussions / C#
   

C#

 
GeneralRe: Close Form when not focused Pin
alfie.max151-Jan-14 5:08
alfie.max151-Jan-14 5:08 
AnswerRe: Close Form when not focused Pin
qbeenslee2-Jan-14 22:16
professionalqbeenslee2-Jan-14 22:16 
QuestionHow to create a console window along with a GUI application ? Pin
LongFangFang30-Dec-13 21:39
LongFangFang30-Dec-13 21:39 
AnswerRe: How to create a console window along with a GUI application ? Pin
BillWoodruff30-Dec-13 21:49
professionalBillWoodruff30-Dec-13 21:49 
GeneralRe: How to create a console window along with a GUI application ? Pin
LongFangFang30-Dec-13 21:55
LongFangFang30-Dec-13 21:55 
GeneralRe: How to create a console window along with a GUI application ? Pin
BillWoodruff31-Dec-13 0:02
professionalBillWoodruff31-Dec-13 0:02 
GeneralRe: How to create a console window along with a GUI application ? Pin
LongFangFang30-Dec-13 22:22
LongFangFang30-Dec-13 22:22 
GeneralRe: How to create a console window along with a GUI application ? Pin
Dave Kreskowiak31-Dec-13 2:10
mveDave Kreskowiak31-Dec-13 2:10 
This will create a Console application, not a WinForms. It's not a good idea because this creates a few problems for your WinForms app that you have to code around.

Put it back to what it was. In your application, you have a couple of ways of creating a console window. One is to use the Win32 functions AllocConsole and AttachConsole. You then have to get the streams from the console and attach them to .NET streams, ... It's pretty messy.

A simple method it to launch CMD.EXE as a new Process, then you've already got the stream objects to write to. You can't use Console.WriteLine, but you can use something like myCmdProcess.StandardInput.WriteLine. StandardInput is a normal StreamWriter object which has all the usual methods you would expect[^].

AnswerRe: How to create a console window along with a GUI application ? Pin
OriginalGriff30-Dec-13 22:35
mveOriginalGriff30-Dec-13 22:35 
AnswerRe: How to create a console window along with a GUI application ? Pin
Ravi Bhavnani31-Dec-13 5:54
professionalRavi Bhavnani31-Dec-13 5:54 
Question[Solved] How to check what makes Windows Service stops automatically? Pin
emma.sun.sts30-Dec-13 14:06
emma.sun.sts30-Dec-13 14:06 
AnswerRe: How to check what makes Windows Service stops automatically? Pin
thatraja30-Dec-13 16:12
professionalthatraja30-Dec-13 16:12 
GeneralRe: How to check what makes Windows Service stops automatically? Pin
emma.sun.sts30-Dec-13 22:50
emma.sun.sts30-Dec-13 22:50 
GeneralRe: How to check what makes Windows Service stops automatically? Pin
Dave Kreskowiak31-Dec-13 1:41
mveDave Kreskowiak31-Dec-13 1:41 
GeneralRe: How to check what makes Windows Service stops automatically? Pin
emma.sun.sts1-Jan-14 14:28
emma.sun.sts1-Jan-14 14:28 
GeneralRe: How to check what makes Windows Service stops automatically? Pin
Dave Kreskowiak1-Jan-14 15:14
mveDave Kreskowiak1-Jan-14 15:14 
GeneralRe: How to check what makes Windows Service stops automatically? Pin
emma.sun.sts1-Jan-14 22:15
emma.sun.sts1-Jan-14 22:15 
AnswerRe: How to check what makes Windows Service stops automatically? Pin
jschell31-Dec-13 8:04
jschell31-Dec-13 8:04 
Questionabout GostScript Arguments Pin
delphix530-Dec-13 12:16
delphix530-Dec-13 12:16 
QuestionRotate capture image pixel by pixel 180 degree Pin
Member 1047764030-Dec-13 10:53
Member 1047764030-Dec-13 10:53 
AnswerRe: Rotate capture image pixel by pixel 180 degree Pin
Richard MacCutchan30-Dec-13 22:59
mveRichard MacCutchan30-Dec-13 22:59 
QuestionData scaffolding dynamicdata page issue Pin
vkEE30-Dec-13 10:09
vkEE30-Dec-13 10:09 
AnswerRe: Data scaffolding dynamicdata page issue Pin
Richard MacCutchan30-Dec-13 22:59
mveRichard MacCutchan30-Dec-13 22:59 
QuestionTelerik Report Pin
Obulesh K30-Dec-13 1:18
Obulesh K30-Dec-13 1:18 
AnswerRe: Telerik Report Pin
thatraja30-Dec-13 1:47
professionalthatraja30-Dec-13 1:47 

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.