473,385 Members | 1,351 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,385 software developers and data experts.

Common Dialog - how to put on a form

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
6 1521
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
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
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

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
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

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: smjmitchell | last post by:
Hi All, I am using the common dialog color pallete and open forms in VB6.0. I have two questions: 1. How can the position of these forms on the screen be specified when they are loaded. By...
3
by: S.W. Rasmussen | last post by:
With the risk of being accused of multi-posting I would like to draw the attention to a serious visual basic/windows issue discussed in the microsoft.public.vb.bugs newsgroup. As pointed out below...
3
by: deko | last post by:
I need to use the Common Dialog box, but I'm having trouble getting started. Bear with me as this is new ground for me... First, I get an error trying to declare these functions -- compile error:...
3
by: CaribSoft | last post by:
I want to create my own common dialog to use in an application . How do I show a custom dialog (form) in a class based on the common dialog class?
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...
4
by: Adam | last post by:
I have a form that has a timer running on it (System.Timers.Timer). On this form, I have a button that opens a Common Dialog box. As soon as this button is pressed, the timer stops running. When I...
0
by: Bo Gusman | last post by:
A curious problem, one that I think I've seen before. I have a .250 MLOC vb6 app that uses the common dialog control. If I select File/Open in my app to display the file open dialog and then...
6
by: Steve Barnett | last post by:
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...
2
by: MLM450 | last post by:
I am creating various customized open file dialogs. When I display one of my large dialogs followed by one of the smaller dialogs, you can see the smaller dialog resize itself from the larger...
8
by: Arno R | last post by:
Hi all. When I need to search for pictures, I always have too choose thumbnail-view manually. Is it possible to open the common dialog in thumbnail-view programmatically? Example ?? At the...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.