473,289 Members | 1,756 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,289 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 1893
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...
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: 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: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
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...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.