Simple Form to Form process

  • Thread starter Thread starter Harry Simpson
  • Start date Start date
H

Harry Simpson

I've been exhausted trying to find a simple app showing movement from form
to form.

I understand the the

Dim Form1 as new Form

Form1.show

But say if you go here from a Splash screen. What's the excepted way in CF
to dispose of the Splash screen and free memory or do you simple have to
hide the screen.

Is the best practice to ONLY have one screen and add and remove controls as
needed for that one form?

TIA
Harry
 
Hi Harry:

It really depends on what the ultimate objective is. Hiding the form and
showing a new one is an option. So is calling the ShowDialog method of the
form as opposed to Show.

As far as the splash screen goes, it would kind of depend on how you set it
up and that's why I reference the Showdialog. If you wanted to make it an
annoyance style one that the user had to respond to, then ShowDialog would
get you there. on the other hand, you could simply call Close or Dispose on
the form. There's a fair amount of discussion on Close/Dispose in the
various ngs but essentially, Close calls dispose but it fires the Closing
event. If you call dispose, it will 'go away' but won't fire any closing
events.

Remember though that you are in a rather resource constrained environment
with a PDA so a lot of stuff that you can get away with on the desktop will
cause notable performance degradation. As such, you can instantiate and
dispose of forms all day on most desktop machines and no one would be the
wiser. However, loading a form into a PDA and disposing of it five or six
times would take a while. So it often makes more sense to hide it instead.

As far as Having only one screen, the answer is no unless of course, you
only needed one form. You could certainly do that, and there is an article
regarding loading the controls dynamically for a performance boost, but
that's not the same issue here.

HTH,

Bill
 
Thank you for taking the time to run over that. I was just worried about
memory consumption.
What do must developers design for? 32M, 64M, and what's a good way during
development to see how much memory your app is actually eating during
execution?
Is there a perf mon tool for this in CF.

Also, I have an app with some graphics, i've added them to a imagelist - is
this the best way top manage them? I've notice MS sample apps have
everything just loose in the directory. Do you buy anything by embedding
the resources rather than having them as just content for compile?

TIA
Harry
 
Back
Top