is there a way to start your program from the sub main() like you could with vb.net

Why are you wanting to do this?

sorry - i ment like you could with vb6.

three reasons ...

1. in vb6, it was a faster more efficient way of loading your application instead of using frmmain_load event

2. i have a few things i want to run before my main form needs to be loaded into memory.

3. my co-worker is migrating a 13meg vb6 application into vb.net, and it does alot in sub main that he doesnt want it to do in frmmain_load

Ahh OK.

The only work around I've come across (as I usually set my startup form):
-Add a module to your project and within it create the sub Main procedure

-Open Project settings -> select Application tab -> set application type = Console Application -> After VS flickers for a bit, select Sub Main in the Startup Object

Considering I've never started an application this way, I'm not sure where to go once it is directed toward Sub Main. But, from what I can tell it should work identically as in VB6.

Note: These steps work for VS 2008, let me know if I need to check VS 03 or 05.

HTH

nope im using 08.

do you know if it is as efficient to use it as it was in vb6 ?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.