PC Review


Reply
Thread Tools Rate Thread

About dialog

 
 
Tony Johansson
Guest
Posts: n/a
 
      7th Jul 2008
Hello!

I know there exist some commonDialogs in .NET
such as SaveFileDialog,OpenFileDialog printDialog and so.

I just want to know if a dialog is the same as a form ?
I mean when these dialogs was created it uses
the form as the base for creating these dialog.

When I create a window form application I use form to create the window.
I can't use dialog to create a window except for these common dialogs that
is
passed along with the .NET.

//Tony


 
Reply With Quote
 
 
 
 
raylopez99
Guest
Posts: n/a
 
      8th Jul 2008
On Jul 7, 9:32*am, "Peter Duniho" <NpOeStPe...@nnowslpianmk.com>
wrote:
> > I just want to know if a dialog is the same as a form ?

>
> Yes and no. *For your purposes, mostly yes. *You can design a dialog *
> exactly as a form, using the Visual Studio Designer. *Then, instead of *
> calling Form.Show() to display the form, call Form.ShowDialog(). *That *
> will display the form as a modal window, just as any dialog would be shown.


I agree with this statement, that Dialog Boxes** are just Forms that
pass and/or return data and return a DialogResult*, but for historical
reasons a dialog also has imbedded in it a so-called "message map"
that's a sort of macro to pass information to and from the user. At
least that's the way I think of it, based on Visual C++ MFC, which had
such a macro that you could not edit, but was generated by the VS
wizard.

RL
[resident C# n00b 'expert' or MVP of sorts]

* DialogResults include: Ignore, No, None, OK, Retry and Yes

** Common Dialog Boxes include: ColorDialog, FolderBrowserDialog,
FontDialog, OpenFileDialog, PageSetupDialog, PrintDialog and
SaveFileDialog
 
Reply With Quote
 
Ken Foskey
Guest
Posts: n/a
 
      8th Jul 2008
On Mon, 07 Jul 2008 12:41:04 +0000, Tony Johansson wrote:

> Hello!
>
> I know there exist some commonDialogs in .NET such as
> SaveFileDialog,OpenFileDialog printDialog and so.
>
> I just want to know if a dialog is the same as a form ? I mean when
> these dialogs was created it uses the form as the base for creating
> these dialog.
>
> When I create a window form application I use form to create the window.
> I can't use dialog to create a window except for these common dialogs
> that is
> passed along with the .NET.


I just added an about box today, VS 2008. It was simply a matter of
adding to the project an about box and then creating an instance of it in
the form. In my case on click in the menu.

If you set the owner of the aboutbox form to this when you create it, it
behaves like a dialogue box because you must close the about box for the
owner form to become active.

Ken
 
Reply With Quote
 
raylopez99
Guest
Posts: n/a
 
      9th Jul 2008
On Jul 8, 12:38*am, "Peter Duniho" <NpOeStPe...@nnowslpianmk.com>
wrote:
> MFC message maps applied to any kind of window, not just dialogs, and they *
> have basically nothing at all to do with .NET development (.NET uses *
> events, and in particular Click events for most situations where you'd *
> have a message map entry in MFC).


We know that Peety. I was simply making an analogy.


>
> The message map was something that MFC used in the message processing for*
> the window, and it was not at all "embedded" in a dialog. *It was part of *
> the code supporting the dialog. *And again, completely irrelevant for .NET.


"embedded" vs. "code supporting"--same thing.

>
> > that's a sort of macro to pass information to and from the user.

>
> The message map used macros to declare it yes,


Yes, so you finally agree.

> but I don't understand what *
> you mean by "pass information to and from the user". *


Your not understanding is not my problem.

>
> Not that any of this has anything to do at all with Tony's question.
>


That's true, so let's not waste anymore time in this thread with your
or my misunderstandings.

RL

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying Dialog appears over Confirm File Replace dialog theclyde Windows Vista General Discussion 1 13th Jun 2007 12:16 AM
Open some dialog boxes and the mouse cursor moves to one of the dialog buttons **Developer** Microsoft VB .NET 8 21st Aug 2005 07:36 PM
Modeless Dialog calls Modal Dialog. Hide causes application to lose focus. Tom Clement Microsoft Dot NET Framework Forms 3 27th Jun 2005 09:44 AM
How-to exit button click event of ( C#) modal dialog without exiting dialog? Lew Barnesson Microsoft Dot NET Framework Forms 3 2nd Jun 2005 11:03 PM
VS2003 Setup projects custom dialog or dialog with combobox =?Utf-8?B?QWxleGV5IFlha292bGV2?= Microsoft Dot NET 0 18th Feb 2005 03:19 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:00 AM.