[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Initialize All forms in a VB.NET application at Startup

Posted on 2007-03-28
3
Medium Priority
?
299 Views
Last Modified: 2013-11-27
I am developing a program in Visual Studio 2005. There will be more than 50 forms. I was wondering if it a good idea to initialize all forms in a module and define a Sub Main and show the first form.
For example
in Module InitializeForms
Public frmMain1 as new frmMain
.....etc

Sub Main
frmMain.showdialog
end Main
End Module

Any suggestions/ideas would be greatly appreciated.
0
Comment
Question by:vamshi25
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 14

Accepted Solution

by:
shahprabal earned 75 total points
ID: 18810363
Initializing the forms upfront will take up a lot of memory and possibly increase the start time... even though you have 50 forms if only one or two are going to be up at one time then it (how many forms the application has) wont make any difference if you initialize the forms as needed cause you are only initializing one or two forms at a time.

HTH
0
 
LVL 86

Assisted Solution

by:Mike Tomlinson
Mike Tomlinson earned 75 total points
ID: 18810865
It would just be a waste of memory.  .Net is already a memory hog...why give it more stuff to load?

I agree with shahprabal...there is rarely ever a time when you need to "preload" 50 forms...the user can't deal with that many at once.  =)
0
 

Author Comment

by:vamshi25
ID: 18810967
Thank you shahprabal and Idle_Mind for prompt reponses and explaining the memory wastage part.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question