Manage Form Size since form's creation


Author
Message
Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi all,

In Visual FoxPro, when creating a form you can set the Maximum design area to the size of the target screen where the form will be used like (800x600, 1024x768, 1152x882, etc.)  that will show a white box with the preset size selected.

Is there a something like that in VS2008?  if not, what would be the best way to create forms with a size targeted to specific screen resolution and then allow the end user to resize those form if they have a bigger resolution?

Thanks.



Edhy Rijo

Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.3K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
That's pretty cool! I don't know of anyway to do this with VS. I just take a guess, then run the app at the desired resolution and see if it works. After a while I just sort of know how big is too big (or too small). I'll be interested in what others do.
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
You will just want to set the minimum size of your base dialog to whatever size you want to develop for.  This way you cannot make it smaller than that size.  However, you can leave the MaximumSize alone so that the dialog can be scaled to whatever size.  We created custom templates for our dialogs so that when we create them, they are already the correct size to develop on.  It actually is better in the long run than VFP...that feature generally caused me more problems than do me favors.  In any case, this is the approach we take.
Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Thanks Greg, Trent.

We created custom templates for our dialogs so that when we create them, they are already the correct size to develop on.

Trent if you don't mind, can you provide the steps to create such a template?  I believe it may be like creating the base form class, but honestly I really don't know where to start in order to create a form template which is what I really need.

Edhy Rijo

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
You can actually find a lot of samples out on the web showing how to create templates.  Here is a decent article that I found close to the top of the list when I did a search: http://codebetter.com/blogs/david.hayden/archive/2005/11/06/134343.aspx .  It isn't a great sample, but it covers the basics. 

The bottom line is that you create the classes just as you would like them inside of VS and everything.  Then you ultimately just create a ZIP package with a vstemplate file...and that is pretty much it.  You will use the "$command$" items as replacement characters for replacing the class name, etc.  If you don't get it going, then let me know.  Smile

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search