Jump to content

Multiply panels or forms?


Guest Wavid

Recommended Posts

Been woundering for a while if using multiply panels on a single form is faster or more benefical than using lots of forms. Wouldn't mind getting some other peoples opinions of the advantages and disadvantages

Link to comment
Share on other sites

Guest babybob

No idea about the speed, but interested to find out.

From purely a dev view I would rather use multipleforms for 2 reasons:

1) The ide wysiwyg view would be unusable with multiple pannels

2) I believe that until you show a form it will not use any resources, whereas a hidden pannel is just not rendered to the screen it still uses resources

Any other comments?

Brian

www.bbpsoftware.co.uk

Link to comment
Share on other sites

1) The ide wysiwyg view would be unusable with multiple pannels  

2) I believe that until you show a form it will not use any resources, whereas a hidden pannel is just not rendered to the screen it still uses resources

Yeah these are the 2 things ive come up with to.

1) I had the same problem at first. So in the design view i layed all the panels out next to each other so at runtime when i wanted a panel i called a method that moved it to 0,0 and moved it to the front.

2) This is the other thing i was thinking. It will take the form longer to load at first since everythign will be loaded. However like you say it would use more resources.

Think i might try using multiply forms see how it affects performance. Still wouldn't mind hearing other peoples views on the matter.

Link to comment
Share on other sites

Guest NeilC_MVP

From a pure performance perspective, multiple forms is the way to go. Loading all the controls on all the panels at start-time is not going to do you startup time any favours. Also, as it is so rightly pointed out, loading all the controls at start-up will consume vital resources when it's unnecessary.

Funnily, this is actually the same feature that I'm dealing with at work right now. I'm using a strongly-typed stack with a capacity threshold to manage form navigation. The threshold limits the number of forms I can have open (which is what I need). Also, the strongly typed nature of the stack elimates unnecessary boxing/unboxing. Two pluses for perf :lol:

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.