Windows Forms Transitions

  • Thread starter Thread starter GB21
  • Start date Start date
G

GB21

Hello Group,

Long time Asp.net programmer developing my first windows CE
application. I have a very basic question about windows forms
applications. Naturally, my application includes multiple forms
between which the user can navigate. Of course, as we get deeper into
the application, there is a natural progression back to through the
screens to the beginning. I think I may be handling something wrong
with moving from one screen to the next. I'm just creating an instance
of the next form. When I run my app on the mobile device, I see all of
the previous forms in the task bar. As I transition back through them,
they close one by one.

What am I missing? I did try doing a this.hide when I create a new
instance of the next form and a this.show when I return. However, I
get flashes of the desktop as the new form is being shown. I'm also
uncertain if this creates a memory problem to keep all of these forms
alive.

Any help would be greatly appreciated.

Thanks,

Glenn
 
It is common to use a collection class (e.g. Stack) to hold references
to form objects that you only want a single instance of. This approach
minimizes your memory usage. For smooth transitions between forms when
you are using a single UI thread, instance and show the next form
before you hide the current form. Use the same approach when you
return to a previous form.

Regards,
Thomas
 
Hi,
you can minimize the blinking if you use a blank white form as a lowest
form of your application. I use the same approach as you in one of my
applications and use a empty panel on main form - i maximize the panel
if the main form looses it's focus and hide the panel if user gets back
to main form.

Regarding the forms in the application - my application is wizard-based
(a queue of forms which user navigates through) and I use singleton
approach for the dialog forms and keep array of these forms (array of
typeof(formXY) to be precise) to enable navigation through the forms...

regards,

Filip
 
Early versions of CF 1.0 also had issues with blinking on FOrm transitions,
so make sure you're at least using SP3.
 
Back
Top