"Gary Owsiany" <gar-car@swbell.net> schrieb[color=blue]
> Until now I have been using the default "windows application"
> template to create a new window. What I would like to do is play
> with dynamic window creation. However, when I just create a class
> that contains sub Main() it doesn't want to compile in the IDE.[/color]
Why? Error message? Which project type did you choose (Windowsapplication,
consoleapplicatoin or classlibrary)?
[color=blue]
> Is
> there some property I need to set? The code below is what I want to
> use to create my window class. How can I do it within the
> VisualStudio IDE? Thanks,
> Gary O.
>
> Public Shared Sub Main()
>
> Dim form1 As New Form
>
> Dim form2 As New Form
>
> form1.Text = "Form passed to Run()"
>
> form2.Text = "Second form"
>
> form2.Show()
>
> Application.Run(form1)
>
> MessageBox.Show("Application.Run() has returned " & _
>
> "control back to Main. Bye, Bye!", "Two Forms")
>
> End Sub[/color]
The code looks fine. What did you choose as the startup object in the
project properties?
--
Armin
http://www.plig.net/nnq/nquote.html http://www.netmeister.org/news/learn2quote.html