Sdi and Mdi Application
Sdi and Mdi Application
SDI displays a single document and all the data’s are encapsulated
within a single form.
Example Calculator, Notepad in windows platform.
These applications will open in the same environment.
EXPLORER INTERFACES
Modal Dialog Box is the dialog box in which the user response is required
before continuing the program.
Example: open Dialog Box – when it is displaying the user can not use
any other operations on any windows. (ie) user has to first response for
that Dialog box.
Modeless Dialog Box is the dialog box in which the form or the dialog box
remains stable and available to the user for use at any time. So the user
can access other windows without responding to the Modeless Dialog
Box.
Differences
Example
Add two text boxes and change the name property as txtName
and txtAddress.
Change the Multiline property as true and Readonly property as
true for txtAddress.
Add two forms by Rightclicking the project and select Add ->
Windows Form.
Change the name property for two forms as AboutForm and
AddressDlg.
2. Design the AboutForm as Follows
i. Add a label and change the text property as Modal and Modeless
Dialog box.
3. Design the AddressDlg as follows
i. Changes in button ok
Name – btnok
DialogResult – ok
ii. Changes in button cancel
Name – btncancel
DialogResult – Cancel
iii. Change in Form Property
Acceptbutton – btnok
Cancelbutton – btncancel.
iv. Change the name of the textboxes as follows
txtDoor,txtSt,txtCity,txtState,txtPin.
4. Coding for Main Form
Button1 (About Button) click event:
AboutFrom abtfrm = new AboutForm();
abtfrm.Show();