By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,362 Members | 1,804 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,362 IT Pros & Developers. It's quick & easy.

Common Dialog - how to put on a form

P: n/a
I need to include a wizard in my application that will, as one of the steps,
ask the user to select a file to open and (later) a file to save it as. The
naff way to do this would be to have a button on the form that pops-up the
common dialog. The cool way to do this would be to have the common dialog
embedded in the wizard.

I know it's possible, as I've seen other apps do this kind of thing, but I
have no ideas how it can be achieved and have failed miserably to find any
sample code on the web.

Does anyone know how I can do this please? (It also fixes another problem
I'm going to have where I need to add check boxes to the standard open
dialog). I would prefer to use the standard common dialog over writing a
control of my own as it gives so much additional functionality.

Thanks
Steve
Aug 2 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Steve,

Personally, I would be used to a dialog. However, what you see is
usually a custom control that is embedded in the wizard itself.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Steve Barnett" <no****@nodomain.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>I need to include a wizard in my application that will, as one of the
steps, ask the user to select a file to open and (later) a file to save it
as. The naff way to do this would be to have a button on the form that
pops-up the common dialog. The cool way to do this would be to have the
common dialog embedded in the wizard.

I know it's possible, as I've seen other apps do this kind of thing, but I
have no ideas how it can be achieved and have failed miserably to find any
sample code on the web.

Does anyone know how I can do this please? (It also fixes another problem
I'm going to have where I need to add check boxes to the standard open
dialog). I would prefer to use the standard common dialog over writing a
control of my own as it gives so much additional functionality.

Thanks
Steve

Aug 2 '06 #2

P: n/a
The question is, however, how do I create such a custom control? From what
I can see, if I want to use the common dialog, I can only pop it up, I can't
use it like a custom control.

Steve

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote in
message news:%2******************@TK2MSFTNGP06.phx.gbl...
Steve,

Personally, I would be used to a dialog. However, what you see is
usually a custom control that is embedded in the wizard itself.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Steve Barnett" <no****@nodomain.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>>I need to include a wizard in my application that will, as one of the
steps, ask the user to select a file to open and (later) a file to save it
as. The naff way to do this would be to have a button on the form that
pops-up the common dialog. The cool way to do this would be to have the
common dialog embedded in the wizard.

I know it's possible, as I've seen other apps do this kind of thing, but
I have no ideas how it can be achieved and have failed miserably to find
any sample code on the web.

Does anyone know how I can do this please? (It also fixes another problem
I'm going to have where I need to add check boxes to the standard open
dialog). I would prefer to use the standard common dialog over writing a
control of my own as it gives so much additional functionality.

Thanks
Steve


Aug 2 '06 #3

P: n/a
Steve,

That's my point, you would have to create listboxes, treeviews, etc,
etc, to mimic the functionality. You can't just embed it.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Steve Barnett" <no****@nodomain.comwrote in message
news:uk**************@TK2MSFTNGP04.phx.gbl...
The question is, however, how do I create such a custom control? From
what I can see, if I want to use the common dialog, I can only pop it up,
I can't use it like a custom control.

Steve

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote
in message news:%2******************@TK2MSFTNGP06.phx.gbl...
>Steve,

Personally, I would be used to a dialog. However, what you see is
usually a custom control that is embedded in the wizard itself.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Steve Barnett" <no****@nodomain.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>>>I need to include a wizard in my application that will, as one of the
steps, ask the user to select a file to open and (later) a file to save
it as. The naff way to do this would be to have a button on the form that
pops-up the common dialog. The cool way to do this would be to have the
common dialog embedded in the wizard.

I know it's possible, as I've seen other apps do this kind of thing, but
I have no ideas how it can be achieved and have failed miserably to find
any sample code on the web.

Does anyone know how I can do this please? (It also fixes another
problem I'm going to have where I need to add check boxes to the
standard open dialog). I would prefer to use the standard common dialog
over writing a control of my own as it gives so much additional
functionality.

Thanks
Steve



Aug 2 '06 #4

P: n/a

Steve,

How familiar are you with API's? That is contructing the relevent common
dialog(s) from the API's, using callbacks, hook procedures and defining
customised templates (the wizard form would more or less be that template).

Going on Nicholas's responses to this;

1) This isn't all that difficult once you know how to do it.
2) Even if you know how to do it, it could be 'a little (like alot)' time
consuming.

On that note, it would be easier and quicker to define dropdown lists,
listview controls,... to do this. Using the Common Dialogs as defined in the
Windows.Forms namespace, I would not know if it's possible.

Hope this sheds some light for you.

Regards,
- SpotNet
"Steve Barnett" <no****@nodomain.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
:I need to include a wizard in my application that will, as one of the
steps,
: ask the user to select a file to open and (later) a file to save it as.
The
: naff way to do this would be to have a button on the form that pops-up the
: common dialog. The cool way to do this would be to have the common dialog
: embedded in the wizard.
:
: I know it's possible, as I've seen other apps do this kind of thing, but I
: have no ideas how it can be achieved and have failed miserably to find any
: sample code on the web.
:
: Does anyone know how I can do this please? (It also fixes another problem
: I'm going to have where I need to add check boxes to the standard open
: dialog). I would prefer to use the standard common dialog over writing a
: control of my own as it gives so much additional functionality.
:
: Thanks
: Steve
:
:
Aug 3 '06 #5

P: n/a
I suspect that I'm not familiar enough with APIs to be able to do this. I
had this functionality in one of my old VB6 apps, but it was provided via a
set of classes I found on vbaccelerator.com. I've looked at the code and
got myself lost in the logic several times.

Perhaps I should just stick to combos and list views and put up with the
loss of functionality.

Thanks
Steve

"SpotNet" <Sp*****@msnews.grpwrote in message
news:ey**************@TK2MSFTNGP05.phx.gbl...
>
Steve,

How familiar are you with API's? That is contructing the relevent common
dialog(s) from the API's, using callbacks, hook procedures and defining
customised templates (the wizard form would more or less be that
template).

Going on Nicholas's responses to this;

1) This isn't all that difficult once you know how to do it.
2) Even if you know how to do it, it could be 'a little (like alot)' time
consuming.

On that note, it would be easier and quicker to define dropdown lists,
listview controls,... to do this. Using the Common Dialogs as defined in
the
Windows.Forms namespace, I would not know if it's possible.

Hope this sheds some light for you.

Regards,
- SpotNet
"Steve Barnett" <no****@nodomain.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
:I need to include a wizard in my application that will, as one of the
steps,
: ask the user to select a file to open and (later) a file to save it as.
The
: naff way to do this would be to have a button on the form that pops-up
the
: common dialog. The cool way to do this would be to have the common
dialog
: embedded in the wizard.
:
: I know it's possible, as I've seen other apps do this kind of thing, but
I
: have no ideas how it can be achieved and have failed miserably to find
any
: sample code on the web.
:
: Does anyone know how I can do this please? (It also fixes another
problem
: I'm going to have where I need to add check boxes to the standard open
: dialog). I would prefer to use the standard common dialog over writing a
: control of my own as it gives so much additional functionality.
:
: Thanks
: Steve
:
:


Aug 3 '06 #6

P: n/a

Great samples at vbaccelerator.com. The coders have indeed used the common
dialog API's, types, delegates,... achieve the functionality. If you get the
time to do so Steve, construct your own Common Dialog namespace, from the
ground up. This will take some time especially to perfect them, but this
will be the time consuming part. From then on you'll have very flexible
common dialog functionality.

Regards,
- SpotNet

"Steve Barnett" <no****@nodomain.comwrote in message
news:Od**************@TK2MSFTNGP06.phx.gbl...
:I suspect that I'm not familiar enough with APIs to be able to do this. I
: had this functionality in one of my old VB6 apps, but it was provided via
a
: set of classes I found on vbaccelerator.com. I've looked at the code and
: got myself lost in the logic several times.
:
: Perhaps I should just stick to combos and list views and put up with the
: loss of functionality.
:
: Thanks
: Steve
:
: "SpotNet" <Sp*****@msnews.grpwrote in message
: news:ey**************@TK2MSFTNGP05.phx.gbl...
: >
: Steve,
: >
: How familiar are you with API's? That is contructing the relevent common
: dialog(s) from the API's, using callbacks, hook procedures and defining
: customised templates (the wizard form would more or less be that
: template).
: >
: Going on Nicholas's responses to this;
: >
: 1) This isn't all that difficult once you know how to do it.
: 2) Even if you know how to do it, it could be 'a little (like alot)'
time
: consuming.
: >
: On that note, it would be easier and quicker to define dropdown lists,
: listview controls,... to do this. Using the Common Dialogs as defined in
: the
: Windows.Forms namespace, I would not know if it's possible.
: >
: Hope this sheds some light for you.
: >
: Regards,
: - SpotNet
: >
: >
: "Steve Barnett" <no****@nodomain.comwrote in message
: news:%2****************@TK2MSFTNGP02.phx.gbl...
: :I need to include a wizard in my application that will, as one of the
: steps,
: : ask the user to select a file to open and (later) a file to save it
as.
: The
: : naff way to do this would be to have a button on the form that pops-up
: the
: : common dialog. The cool way to do this would be to have the common
: dialog
: : embedded in the wizard.
: :
: : I know it's possible, as I've seen other apps do this kind of thing,
but
: I
: : have no ideas how it can be achieved and have failed miserably to find
: any
: : sample code on the web.
: :
: : Does anyone know how I can do this please? (It also fixes another
: problem
: : I'm going to have where I need to add check boxes to the standard open
: : dialog). I would prefer to use the standard common dialog over writing
a
: : control of my own as it gives so much additional functionality.
: :
: : Thanks
: : Steve
: :
: :
: >
: >
:
:
Aug 4 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.