|
-
Jan 30th, 2007, 02:33 PM
#1
Thread Starter
Lively Member
-
Jan 30th, 2007, 03:55 PM
#2
Re: In VB.NET 2005 how do u specify Module Subroutine as Application startup routine?
Turn off the Enable Application Framework.... then create a sub New in your module. Then you'll be able to select it as the start up point.
-tg
-
Jan 30th, 2007, 04:22 PM
#3
Thread Starter
Lively Member
Re: In VB.NET 2005 how do u specify Module Subroutine as Application startup routine?
Thats great thanks mate
-
Jan 30th, 2007, 05:24 PM
#4
Re: In VB.NET 2005 how do u specify Module Subroutine as Application startup routine?
That is generally a bad idea. There really are very few legitimate reasons to have to do that. In almost all cases you should leave the application framework enabled, leave your startup object as a form and simply handle the Startup event of the application. That event is raised BEFORE the startup form is created, so that's where you can, and should, do any processing that needs to be done prior to the main form being created. An example may be having the user log in. You display a login dialogue from the Startup event handler. If the login is successful you do nothing and the app starts normally. If the login fails then you set e.Cancel to True and the app will exit gracefully without ever creating the startup form.
-
Jan 30th, 2007, 05:36 PM
#5
Re: In VB.NET 2005 how do u specify Module Subroutine as Application startup routine?
I agree with John.
The application startup event is for all intensive purposes the same thing as a sub main.
-
Jan 30th, 2007, 05:43 PM
#6
Re: In VB.NET 2005 how do u specify Module Subroutine as Application startup routine?
 Originally Posted by kleinma
I agree with John.
The application startup event is for all intensive purposes the same thing as a sub main.
Yes, for all intents and purposes it is.
-
Jan 30th, 2007, 05:45 PM
#7
Re: In VB.NET 2005 how do u specify Module Subroutine as Application startup routine?
Sorry my fingers work about 1.8x the speed of my brain on most days 
English is my second language.. VB is my first
-
Jan 30th, 2007, 05:55 PM
#8
Re: In VB.NET 2005 how do u specify Module Subroutine as Application startup routine?
 Originally Posted by kleinma
English is my second language.. VB is my first
-
Jan 30th, 2007, 06:24 PM
#9
Thread Starter
Lively Member
Re: In VB.NET 2005 how do u specify Module Subroutine as Application startup routine?
Thanks for the additional info..
More in this article:
http://visualbasic.about.com/od/usin...nRoutine01.htm
Was wondering why form.show from my module subroutine would now open the form for long. Article explains it.
Thanks for raising the point regarding the use of app events
Last edited by ragstta; Jan 30th, 2007 at 06:38 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|