473,581 Members | 2,757 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1913
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.co m

"Steve Barnett" <no****@nodomai n.comwrote in message
news:%2******** ********@TK2MSF TNGP02.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.c omwrote in
message news:%2******** **********@TK2M SFTNGP06.phx.gb l...
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.co m

"Steve Barnett" <no****@nodomai n.comwrote in message
news:%2******** ********@TK2MSF TNGP02.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.co m

"Steve Barnett" <no****@nodomai n.comwrote in message
news:uk******** ******@TK2MSFTN GP04.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.c omwrote
in message news:%2******** **********@TK2M SFTNGP06.phx.gb l...
>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.co m

"Steve Barnett" <no****@nodomai n.comwrote in message
news:%2******* *********@TK2MS FTNGP02.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****@nodomai n.comwrote in message
news:%2******** ********@TK2MSF TNGP02.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.c om. 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******** ******@TK2MSFTN GP05.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****@nodomai n.comwrote in message
news:%2******** ********@TK2MSF TNGP02.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.c om. 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****@nodomai n.comwrote in message
news:Od******** ******@TK2MSFTN GP06.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.c om. 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******** ******@TK2MSFTN GP05.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****@nodomai n.comwrote in message
: news:%2******** ********@TK2MSF TNGP02.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
5542
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 default they always seem to be located with their upper left corner coinciding with the upper left corner of the form that they are loaded from. I...
3
6784
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 by Norman Diamond the bug may result in loss of data when saving files with the standard common dialog control. Norman Diamond describes the...
3
14821
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: User-defined type not defined - am I missing a reference? which one? Private Declare Function GetOpenFileName _ Lib "COMDLG32.DLL" Alias...
3
4128
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
6977
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 dialog but just need to change the button text from "open" to "delete". Any ideas? Thanks
4
1883
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 return and close the common dialog, the timer will not start up again, no matter what I do. If I stop the timer before the box is displayed, and...
0
1370
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 alt-tab to another running app, when I try to alt-tab back to my app, the common dialog box and my apps main window is gone (can't see it in the task...
6
1528
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 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...
8
4685
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 moment I am using Ken Getz' code. at http://www.mvps.org/access/api/api0001.htm Thanks Arno R
0
8310
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8180
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6563
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5681
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5366
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3809
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3832
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2307
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1409
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.