The best way to do this would be to create a class that derives from
CommonDialog, and then override the RunDialog method to show your dialog
when it is called.
See the documentation for the CommonDialog class (in the
System.Windows.Forms namespace) for more information on how to do this.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
(E-Mail Removed)
"deciacco" <(E-Mail Removed)> wrote in message
news:5c2dnYjOBpki7bPbnZ2dnUVZ_o-(E-Mail Removed)...
> VS2k5 - C# .NET 2
>
> I would like to create my own custom dialog that behaves like the
> FolderBrowserDialog. In other words, I would like to be able to go to the
> ToolBox, select my custom dialog and drop into my form designer. Then set
> some properties from within code before calling the showDialog method. I'm
> not trying to recreate the FolderBrowserDialog. Just my own custom dialog
> that captures some data.
>
> example:
> this.customDialog.customProperty = false;
> this.customDialog.customProperty2 = 5;
> this.customDialog.showDialog(this);
> this.textBox1.text = this.customDialog.getValue();
>
> Thanks.
>
>