RE: Redirect

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Darren Shaffer (DarrenShaffer_at_discussions.microsoft.com)
Date: 10/05/04


Date: Tue, 5 Oct 2004 07:43:06 -0700

Robert,

When architecting a CF app with multiple forms, you should consider the
expense of loading and showing forms in your navigational model and the
member variables that need to be accessed across forms during design time. I
see a lot of new CF developers always using form.Show() and form.Close() and
attempting to pass or call back to previous forms for member variables. This
creates a lot of messy code and form loading overhead. Here are some ideas
to think about:

1. For forms that are likely to be shown multiple times in the course of
your application's use cases, make them singletons and only load them once.
Show and Hide them when needed. Performance is excellent.
2. Make a single Globals class that is also a singleton that contains
member variables and/or methods that more than one form require access to.
This keeps you from passing state information back and forth between forms.

For an even more advanced coverage of form management in CF apps, see this
excellent article on MSDN:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/html/netcfuiframework.asp

-Darren

"robert" wrote:

>
> How can i link (with a link and a button) from one Form of a Smart Device
> Application to another Form of that Application, especially with parameters?
>
> robert


Quantcast