By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,877 Members | 1,109 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,877 IT Pros & Developers. It's quick & easy.

Create System.Console from a winforms app

P: n/a

Is there a way to create a System.Console from code. I periodically have a
WinForms app that needs to open a console window for progress tracking.

Thanks,
Mike Ober.

May 10 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hello,
Import 2 functions:

~
Friend Declare Function AllocConsole Lib "kernel32.dll" ( _
) As Boolean

Friend Declare Function FreeConsole Lib "kernel32.dll" ( _
) As Boolean
~

Use first, utilize usual System.Console.Write*/Read* methods and call
the second one when you're done.

Roman

"Michael D. Ober" <obermd.@.alum.mit.edu.nospam> сообщил/сообщила в
новостях следующее: news:#u**************@TK2MSFTNGP05.phx.gbl...

Is there a way to create a System.Console from code. I periodically have a WinForms app that needs to open a console window for progress tracking.
Thanks,
Mike Ober.

May 10 '06 #2

P: n/a

OK - sort of a mix of the full console class I wrote in VB 6 and the
system.console class in the framework.

Thanks,
Mike.

"Dragon" <no@spam.please> wrote in message
news:O4**************@TK2MSFTNGP02.phx.gbl...

Hello,
Import 2 functions:

~
Friend Declare Function AllocConsole Lib "kernel32.dll" ( _
) As Boolean

Friend Declare Function FreeConsole Lib "kernel32.dll" ( _
) As Boolean
~

Use first, utilize usual System.Console.Write*/Read* methods and call
the second one when you're done.

Roman

"Michael D. Ober" <obermd.@.alum.mit.edu.nospam> сообщил/сообщила в
новостях следующее: news:#u**************@TK2MSFTNGP05.phx.gbl...

Is there a way to create a System.Console from code. I periodically

have a
WinForms app that needs to open a console window for progress

tracking.

Thanks,
Mike Ober.



May 10 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.