miwaypro Posted October 18, 2003 Posted October 18, 2003 VB: -------------------------------------------------------------------------------- Module modFirst Sub main() Console.WriteLine("Welcome to .NET") End Sub End Module -------------------------------------------------------------------------------- Error message Quote: -------------------------------------------------------------------------------- 'Sub Main' was not found in 'ConsoleApplication2.Module1'. -------------------------------------------------------------------------------- Can someone tell me what's wrong with my code? Quote programing programer program
*Experts* Volte Posted October 18, 2003 *Experts* Posted October 18, 2003 It's because you renamed your module. If you are in the IDE, double click on the error in the Task Pane and select the name of your module (modFirst) from there. Quote
miwaypro Posted October 18, 2003 Author Posted October 18, 2003 y my output is just display for 1 second only and then disappear? what should i do to make the screen appear on my screen and only disappear when i click at one of the key from the keyboard? Quote programing programer program
Administrators PlausiblyDamp Posted October 18, 2003 Administrators Posted October 18, 2003 Sub main() Console.WriteLine("Welcome to .NET") Console.ReadLine() 'Will pause till enter pressed End Sub Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
jorge Posted October 18, 2003 Posted October 18, 2003 or add application.run(), keep open till close with [X] Quote Jorge - http://www.blackdot.be/?page=apache.htm
Administrators PlausiblyDamp Posted October 18, 2003 Administrators Posted October 18, 2003 (edited) IIRC Application.Run doesn't work from a console application - it is designed to keep the windows message pump working if the original form is closed. Edited February 21, 2007 by PlausiblyDamp Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
jorge Posted October 18, 2003 Posted October 18, 2003 O, sry, i thout it would work, well maybe i schould look into console apps a litle deeper lol Quote Jorge - http://www.blackdot.be/?page=apache.htm
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.