Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Simple Question


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-23-2007, 06:22 PM
Knows the basics
 
Join Date: Jun 2007
Location: Netherlands (Arnhem)
Posts: 71
Default Simple Question

Sorry for this very basic question, but I just wanna know.

I have two screens. Every screen has the same menu and from that menu I can jump to screen 1 and 2.

Every screen has it's own sub and shows itself by issuing a screen.show
What happens with screen1 when I choose from screen 1 to go to screen 2

So i.e.

Screen1.Show - menu select screen 2
Screen2.Show - menu select screen 1
Screen1.Show - menu select screen 2
Screen2.Show

Is there a stack buildup? Should I issue a close of screen1 somehow before screen2.show or is the the way to do it?

Scub
__________________
PPC: IPAQ 2210, 2GB, CF GPS, CF Wireless
Reply With Quote
  #2 (permalink)  
Old 07-23-2007, 06:41 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,134
Default

I'm not sure if I understood your question.
Forms are stacked.
If you call Screen2.Show and then close Screen2 you will see Screen1.
If you call Screen2.Show and then Screen1.Show, Screen1 will show above Screen2 (and only above).
Remember that the first form that is shown will be the "main form" and the application will end when it will be closed.
Reply With Quote
  #3 (permalink)  
Old 07-23-2007, 08:39 PM
Knows the basics
 
Join Date: Jun 2007
Location: Netherlands (Arnhem)
Posts: 71
Default

Quote:
Originally Posted by Erel View Post
I'm not sure if I understood your question.
Yes you did and give me the answer I needed. I use a show routine to show the wanted screen which has a .show, but not a close of the screen it's coming from, so stacking screens.

So when I do a .close of a screen, the app only ends when the last screen is closed?

Scub.
__________________
PPC: IPAQ 2210, 2GB, CF GPS, CF Wireless
Reply With Quote
  #4 (permalink)  
Old 07-23-2007, 09:16 PM
Knows the basics
 
Join Date: Jun 2007
Location: Netherlands (Arnhem)
Posts: 71
Default

To get it all clear to me I have one question left:

Does the next code has the same result (from memory usage view)


From1.Show, Form2.Show, Form3.Show, Form2.Show, Form1.Show

and

Form1.Show
Form2.Show,Form2.Close
Form3.Show,Form3.Close
Form2.Show,Form2.Close
Form1.Show

And do I have two Form2 stacked in the first sample or will it just do a re-display of the already stacked Form2 when I do the Form2.Show the 2nd time?

Scub
__________________
PPC: IPAQ 2210, 2GB, CF GPS, CF Wireless
Reply With Quote
  #5 (permalink)  
Old 07-24-2007, 06:15 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,134
Default

Quote:
Originally Posted by Scubaticus View Post

So when I do a .close of a screen, the app only ends when the last screen is closed?
No.
The app ends when you close the "main form" - the first form that was shown.


Quote:
And do I have two Form2 stacked in the first sample or will it just do a re-display of the already stacked Form2 when I do the Form2.Show the 2nd time?
No. Form2 will be redisplayed, and will change its position in the stack.

When you close a form (not the main form) the form is not destroyed so there is no memory loss caused by showing and closing forms.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
simple chm reader Cableguy Chit Chat 5 05-19-2008 04:40 PM
Calendar control a simple and a complicated question Cableguy Questions & Help Needed 3 02-09-2008 06:45 PM
Simple Calculator RandomCoder Share Your Creations 8 11-02-2007 12:09 AM
Simple RPN - Calculator token Share Your Creations 4 10-08-2007 01:40 PM
Simple Programs to help in the gym XerVision Share Your Creations 2 07-27-2007 06:39 AM


All times are GMT. The time now is 04:32 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0