From: Armin Zingler on
Am 15.05.2010 00:11, schrieb AussieRules:
> Hi,
>
> I have tried to add a sub main, I just added this code into my form where I
> have all my other function and subs.
>
> <STAThread()> Shared Sub Main()
>
> ' Declare a variable named frm1 of type Form1.
> MsgBox("hello")
>
> Dim frm1 As frmMain
>
> ' Instantiate (create) a new Form1 object and assign
> ' it to variable frm1.
>
> frm1 = New frmMain()
>
> ' Call the Application class' Run method
> ' passing it the Form1 object created above.
>
> Application.Run(frm1)
>
> End Sub
>
>
>
> It doesn't seem to work as I never get the hello message box ???
>
> Have I done something wrong ??

Disable the "Application framework" and set Sub Main as the
"startup object". Both available in the project properties.

--
Armin
From: Herfried K. Wagner [MVP] on
Am 14.05.2010 12:24, schrieb AussieRules:
> I am able to run my application on my development machine with no problems.
>
> When I compile and install the application on the brand new computer, I
> am unable to start the application as it crashes.

Which Windows version? 32-bit or 64-bit? Did you compiler for x86, X64
or "Any CPU"? Does your application make use of COM/ActiveX components?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>