开发者

Vb.net Read From Console When Using A Windows Form Application

Hi all I have a problem with reading and writing to the console from a windows form application.

I am running visual studios 2010 and I am coding in visual basic.

The current code that I have is as follows:

Declare Function AttachConsole Lib "kernel32.dll" (ByVal dwProcessId As Int32) As Boolean
Declare Function FreeConsole Lib "kernel32.dll" () As Boolean
System.Console.Write("abc")
Dim test as string = Console.ReadLine()
System.Console.Clear()
ect开发者_开发技巧
FreeConsole()

With the following code I can write to the console but I cannot read from it, any ideas?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜