title: how to add form in main function (Visual Basic)
body: <p>i am trying to make a simple application in VB using main function , to show a form and with a text label on it . i can do it using form and adding label control to it , but for my project i need to do it using main .. its like i want to write code for whole application, my teacher said not to use graphical  interface to develop ..please help</p>
  
  <p>here is my code ... it shows empty form , no label....please tell me how to add controls in main function.....</p>
  
  <pre><code>    Module Module1
      Sub Main()
          Dim f As New Form
          Application.Run(New Form1())
          Dim z As Label
          z = New Windows.Forms.Label
          Form1.Controls.Add(z)
          z.Text = "Hello"
          z.Show()
      End Sub
  End Module
  </code></pre>