6 Replies - 1821 Views - Last Post: 07 December 2012 - 02:08 PM

#1 mattcash83  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 41
  • Joined: 23-June 12

Setting Form Locations

Posted 05 December 2012 - 08:49 PM

I have been dabbling my hands into creating applications that involve using various screens for various portions of the project. I have searched for a way to use multiple forms and, when the user wants to use switch to another function, open the corresponding form in the same location as the current form (and I really want it to be seamless; I do not want the user to be able to see that one form is closed and another has opened). No luck, so for now I am using one form with multiple panels using Z-order--this is becoming too time consuming to do properly (between designing and coding and trying to keep all panels together without combining any of them and etc...).

Is there a way to accomplish my original approach? Especially seamlessly??

Thanks for any help or direction in advance!

Is This A Good Question/Topic? 0
  • +

Replies To: Setting Form Locations

#2 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 574
  • View blog
  • Posts: 2,989
  • Joined: 19-May 09

Re: Setting Form Locations

Posted 05 December 2012 - 09:41 PM

I'm not sure what constitutes "seamless" in your mind, but when I show and hide forms (make them visible and invisible, whatever), I don't see anything that I would call a "seam".
Was This Post Helpful? 0
  • +
  • -

#3 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5572
  • View blog
  • Posts: 11,913
  • Joined: 02-June 10

Re: Setting Form Locations

Posted 06 December 2012 - 07:37 AM

Then don't use forms. Use UserControls. Don't swap forms. Keep one form open with an open workspace (commonly a panel). When the user wants to change mode take out one UserControl and put in another.
Was This Post Helpful? 1
  • +
  • -

#4 mattcash83  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 41
  • Joined: 23-June 12

Re: Setting Form Locations

Posted 06 December 2012 - 03:29 PM

tlhIn 'Toq,

Thank you for the idea off user forms. I am still fairly new to software development, and I have not explored the world of user controls yet. I have done a little bit of research after reading your suggestions, and I think this may be the answer. I just need to get used to working with them and I should be on my way.

Thanks for the help!
Was This Post Helpful? 0
  • +
  • -

#5 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 574
  • View blog
  • Posts: 2,989
  • Joined: 19-May 09

Re: Setting Form Locations

Posted 06 December 2012 - 11:01 PM

Or set up a Visible property or Show method on the control, which makes all the constituent controls visible or invisible. Then you can just have all the controls on the form, and keep track of the user's input.
Was This Post Helpful? 0
  • +
  • -

#6 mattcash83  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 41
  • Joined: 23-June 12

Re: Setting Form Locations

Posted 07 December 2012 - 02:04 PM

Just an update, the user controls idea was a smashing hit! This keeps the addition of screens a cinch, gives me the user interface I am looking for, and it keeps the code very VERY neat and tidy (better troubleshooting and the such). Thanks again to all of the suggestions!
Was This Post Helpful? 1
  • +
  • -

#7 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5572
  • View blog
  • Posts: 11,913
  • Joined: 02-June 10

Re: Setting Form Locations

Posted 07 December 2012 - 02:08 PM

Glad it worked out for ya
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1