Different between Form and Dialog

dezreena

Member
Joined
Mar 29, 2007
Messages
20
Programming Experience
Beginner
hye VB college!

I have a simple question .

What is the difference between Form and Dialog ?

When should i use Form and when should i use Dialog ?

Thanks !! :cool:
 
A dialog is a form, a form is a dialog.
 
In the VB sense of:

Form.Show()
Form.ShowDialog()

A dialog appears on top of all other windows, and it halts (that thread's) code execution until it is closed
 
hello guys,
i don think you understand what my question is.

in Window Application1 for example, there are tab call Project and under this tab there are command to add usercontrolelement,under this tab there will be a window will show, what type of Element that you want to add.
There are for example Windows Form, Dialogfeld, Infofeld, Modul and etc.

Im really curious what is Dialogfeld can do or what Windows Form can't do?

I don know which one should i choose to do my Project.

Thank guys!! :)
 
"Dialog" is here a regular form that have its properties set initially for common values when this form is to be displayed modally with ShowDialog method, this is the type of dialog that user have to finish with before returning to use other parts of application. Have a look at what values there are for properties FormBorderStyle, ShowInTaskBar, MaximizeBox, MinimizeBox and StartPosition. It also by default have added 'ok' and 'cancel' buttons which are linked to this forms properties AcceptButton and CancelButton, this will return specific DialogResult values form the ShowDialog call.

So it basically comes down to being a template based on form to save you a little work for common settings, it's the same with several of the other form templates, they reflect common settings you would add anyway to make a regular form a Mdiparent form or an About form etc.
 
Back
Top