Create System.Console from a winforms app

  • Thread starter Thread starter Michael D. Ober
  • Start date Start date
M

Michael D. Ober

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.
 
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
 
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.
 
Back
Top