473,241 Members | 2,909 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,241 software developers and data experts.

About dialog

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
Jul 7 '08 #1
6 5354
On Mon, 07 Jul 2008 05:41:04 -0700, Tony Johansson
<jo*****************@telia.comwrote:
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 ?
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.

Pete
Jul 7 '08 #2
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
Jul 7 '08 #3
On Mon, 07 Jul 2008 16:23:17 -0700, raylopez99 <ra********@yahoo.com>
wrote:
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"
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).

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.
that's a sort of macro to pass information to and from the user.
The message map used macros to declare it yes, but I don't understand what
you mean by "pass information to and from the user". The message map
simply defined what code was executed in response to certain messages sent
to the window. It didn't "pass information" at all, never mind "to and
from the user".

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

Pete
Jul 8 '08 #4
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
Jul 8 '08 #5
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

Jul 9 '08 #6
On Wed, 09 Jul 2008 02:20:15 -0700, raylopez99 <ra********@yahoo.com>
wrote:
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.
What analogy? By your own admission, message maps have nothing to do with
..NET dialogs or Tony's question at all.

Please do not confuse topics by introducing new, irrelevant information.
It's not helpful
[...]
> but I don't understand what *
you mean by "pass information to and from the user". *

Your not understanding is not my problem.
Inasmuch as it suggests your statement was poorly worded or otherwise
failed to convey whatever meeaning you intended, it's your problem.
Unless, of course, you enjoy just writing random words that are
meaningless to others. If so, then yes...my understanding is not your
problem.

Pete
Jul 9 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

23
by: George | last post by:
Is there a way to customize the open file common dialog? I am trying to modify the button text so I can create a delete file common dialog. I need the same functionality of the open file common...
5
by: Sam Sungshik Kong | last post by:
Hello! The normal way of Main for a Windows Forms application is like this. Application.Run(new Form1()); If I change it like the following, is there any problem? (new...
4
by: Steve | last post by:
1) How can I perform backward search in editor of Visual Studio .NET? In VC++ 6.0 it was enough just to hold Shift button. This combination doesn't work anymore in Visual Studio .NET? 2) Each...
10
by: Guadala Harry | last post by:
I have a modal dialog that currently does all of the following except item 4. 1. lets users select a graphic from a list of thumbnails (and when selected, displays the full-size image in a...
3
by: Diana M | last post by:
Hello, I have started my first asp.net application (beginner). I have 2 text boxes on the form that should contain 2 different dates (beginning and end). It would be nice to have 2 small buttons...
5
by: ad | last post by:
Is there any difference about namespace between VB.NET and C#. All functions in c# must include in a namespace. Why I can't find namespace in the files .vb . How VB.NET implement the...
6
by: Dennis | last post by:
I have a question about thread safety in a VB application written using Visual Studio.Net 2003. Here is the situation... I am running a process thread in a modal dialog. I have written it so...
2
by: sonu | last post by:
Hi all, I have a problem regarding use of a usercontrol in .NET. My usercontrol consists of two listviews which I say as source and destination lisviews which contains the files and folders. I...
3
by: Victor | last post by:
Hi guys. I want to implement a customized user webcontrol (.ascx). Inside this control I have a dropdownlist and a button. when user click the button, it will open a pop up window(not Ajax popup...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.