System_Code
Member
- Joined
- Jul 29, 2008
- Messages
- 8
- Programming Experience
- 1-3
Ok, I'm relatively new to VB.NET. I used to program in Visual Basic Script for applications (mainly with Microsoft Access) and .vbs files (which run with WinScript) before. I also do java pretty well. I just joined this bulitin board, and this is my first post. I type my code into notepad and use v3.5's vbc.exe to compile my code into executables. I was working in dos-like console applications (/t:exe) before, but now I want to focus on Windows form based applications (/t:winexe). Below is the code for my Hello World Program, on which I am having a problem I want to get resolved before continuing on to any other applications:
It compiles fine. The problem: the form flashes on the screen for a fraction of a second, then disappears, the program stopping. Why is this happening? I'd really like to get this resolved. Thanks in advance!
VB.NET:
Imports System.Windows.Forms
Module Form_Class
Class Hello_World_Form
Inherits Form
Public Sub New()
InitializeComponent()
End Sub
Private Sub InitializeComponent()
Me.Text = "Hello World!"
Me.Width = 400
Me.Height = 500
End Sub
End Class
Sub Main()
Dim f As New Hello_World_Form
f.Visible = True
End Sub
End Module
It compiles fine. The problem: the form flashes on the screen for a fraction of a second, then disappears, the program stopping. Why is this happening? I'd really like to get this resolved. Thanks in advance!
Last edited by a moderator: