UBBFriend: Email This Page to Someone!
  Computer Workshop User Forums
  EZGUI 4.0 Visual Designer
  A question about Forms and their different types ?

Post New Topic  Post A Reply
profile | register | preferences | faq | search

next newest topic | next oldest topic
Author Topic:   A question about Forms and their different types ?
Chris Boss
Administrator
posted 10-05-2006 12:50 PM     Click Here to See the Profile for Chris Boss     Edit/Delete Message Reply w/Quote
I was asked about Forms and what each different type of form is for. For newbies, this may seem a litle confusing, so here is a rundown of all the different form types and their use.

* Modal Form

Modal simply means that when it is displayed, the Parent form will be disabled (will ignore mouse and keypresses).
Also when a form is Modal, no code after the EZ_Form command that creates it, will be executed until after the form is closed.

* MDI Parent

MDI stands for Multipule Document Interface. The parent form for MDI is the main form which will get a MDIClient control on it. If you use a MDI client control, then the form must be a MDI parent form.

* MDI Child

MDI Child forms are the forms that will be displayed on the MDIClient control. The MDI Client control allows multiple forms to be displayed on it (as children) and scrollbars will appear when any form is outside the visible area. A MDI Child form must be a child form on a MDI parent form (and the parent must have a MDI Client control on it).

* Splash Form

A Splash form is simply a form with no caption bar or 3D border. Usually it is used as the first form of an application if you want to display some kind of Company Logo when the app starts. Usually this kind of form is displayed and uses a Timer (which you have to define) and then it closes itself after a specific amount of time and then the app displays the main form afterwards. Usually the best way to impliment this kind of form is to create the main form first, but give it the H (hidden) property. When the main form gets the %EZ_Started event, display the splash form. Use a timer for the splash form and when the time is up, close the splash form and in its %EZ_Close event show the main form (EZ_ShowForm).

* Page Form

A Page form is simply a form which is an embeded child form of another form !
There are two types of child forms. One is a form which is "associated" with another form as its child (you define the other form as its parent), but it floats above the parent form. A page form is a child form (you define a parent), but it is embeded within the parent form (like a control is). The page form doesn't float above its parent form, but is inside of it. No part of the page form can be seen outside of the parents client area (inside). If you move the page form outside of the visible area of its parent you simply won't see it.

* Horizontal Pager Form
* Vertical Pager Form

Both of these forms are technically page forms, but their parent is not another form, but is a Pager control.
The pager control acts like a scroller mechanism, where it can scroll the pager form either horizontally or vertically (not both, but one or the other). An example of a pager control with a pager form is in the EZGUI Designers Toolbar Builder dialog. There the two toolbars (the preview and the one for selecting toolbar icons) are actually on Page forms which are then children of pager controls on the dialog. You can see how they allow you to scroll left or right to see portions of the pager form (with its own toolbar on each one).

* Rebar Form

A Rebar form also is technically a page form, but is one where its parent is not a form but a Rebar control.
Rebar controls allow multiple child forms to be displayed on them and be moved around. The most common style of rebar forms are ones with a toolbar on it. This would allow you to embed multiple toolbars into a Rebar control, each one on its own Rebar Form.

* Owned Form

This form is a unique one ! It is like a Page form, where it gets embeded into another form, but it can have a caption bar and 3D border on it. It can be dragged around by it's caption bar too. It's an alternate means of embeding a floating form within another form, similiar to MDI, but it does not require the MDI Client control or MDI parent or child forms. The only problem is that there is not automatic scrollbars displayed when an Owned Forms moves outside the visible area of its parent form.


Some of the sample projects demonstrate a few of these form types. The MDI Editor and RTF Editor projects both demonstrate the use of a MDI parent form and a MDI child form. The RTF Editor demonstrates also a Rebar control with an embeded Rebar Form.

The codeclips sample programs demonstrate some of these form types too. The pager.bas sample program demonstrates using a Pager Form on a Pager control.

The ownforms.bas sample program demonstrates using Owned Forms on a Page form, which is on a regular form.

All times are EST (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | Computer Workshop ( EZGUI ) Home Page

Copyright 2000 to 2007 Christopher R. Boss

Powered by: Ultimate Bulletin Board, Version 5.44
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 - 2000.