See code below. Everything works as far as opening, reading and closing the console. The write and writeline do not output to be displayed.
Public Class Form1
<System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint:="AllocConsole")>
Private Shared Function AllocConsole() As <System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.Bool)> Boolean
End Function
<System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint:="FreeConsole")>
Private Shared Function FreeConsole() As <System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.Bool)> Boolean
End Function
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
getpassword()
End Sub
Private Sub getpassword()
AllocConsole()
Console.Write("Here I am! ")
Console.WriteLine("Hello World!")
Console.WriteLine("Enter Password: ")
Dim name As String = Console.ReadLine()
FreeConsole()
End Sub

