If you have a button you are probably creating a WinForms application that does not have a console. If you are running the code under Visual Studio, you might see the code in the Output window. However if you want to write to the output window you should use System.Diagnostics.Debug.WiteLine or System.Diagnostics.Trace.WiteLine.
You can see the output if you redirect it to a file so running the command
Code:
MyExe.exe > OutputFile.txt
will send all Console.WriteLine output to the OutputFile.txt.
If you want a proper console application you will have to open the project properties and on the Application tab set the Application Type to Console. You will then need to change the code to look something like this:
Code:
Module Module1
Sub Main()
Console.WriteLine("message")
Console.ReadLine()
End Sub
End Module
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.