Customizing OpenFileDialog component, changing GUI of Dialogbox

G

Guest

Hi
I need an OpenFileDialog with my own gui of the dialog box. i want to use the functionality given
by the object of the OpenFileDialog component with my own dialogbox....have any ideas...
Is it possible to override the ShowDialog() method so that i can induce my own windows form dialog..?

--need help
-----seash
 
G

Guest

Hi,
Hi
I need an OpenFileDialog with my own gui of the dialog box. i want to use the functionality given
by the object of the OpenFileDialog component with my own dialogbox....have any ideas...
Is it possible to override the ShowDialog() method so that i can induce my own windows form dialog..?

"OpenFileDialog" class seems to be *sealed*, so You cannot
inherit from it...

Look at abstract "FileDialog" class in .NET docs.

Regards

Marcin
 
G

Guest

----- Marcin Grzębski wrote: ----

Hi
H
I need an OpenFileDialog with my own gui of the dialog box. i want to use the functionality give
by the object of the OpenFileDialog component with my own dialogbox....have any ideas..
Is it possible to override the ShowDialog() method so that i can induce my own windows form dialog..
"OpenFileDialog" class seems to be *sealed*, so You canno
inherit from it..
Look at abstract "FileDialog" class in .NET docs

Marci


hi Marcin
i created a class[windows form] somthing like thi
public class MyDialogForm: System.Windows.Forms.FileDialo



but when i run the object of the above class like thi
MyDialogForm objDialog = new MyDialogForm()
objDialog.ShowDialog()

Iam getting an compile error like thi
C:\Source\MyDialogForm .cs(13): 'MyDialogForm does not implement inherited abstract member 'System.Windows.Forms.FileDialog.RunFileDialog(System.Windows.Forms.NativeMethods.OPENFILENAME_I)

Regards
Seash.
 
G

Guest

Hi,
hi Marcin
i created a class[windows form] somthing like this
public class MyDialogForm: System.Windows.Forms.FileDialog
{
}

but when i run the object of the above class like this
MyDialogForm objDialog = new MyDialogForm();
objDialog.ShowDialog();

Iam getting an compile error like this
C:\Source\MyDialogForm .cs(13): 'MyDialogForm does not
implement inherited abstract member
'System.Windows.Forms.FileDialog.RunFileDialog(System.Windows.Forms.NativeMethods.OPENFILENAME_I)'

"FileDialog" is an abstract class which means that is contains one or
more abstract methods/properties. So, you've go to impements
those abstract members ("RunFileDialog(...)")

....But it looks that Microsoft does not include that method's
description in docs. There's no info about "NativeMethods"
class/structure??

I'm sorry but it looks that i drive You in the dead-end.
I was hoping that "FileDialog" was designed to extends its
functionality... but i was wrong. It looks like internal-sealed
class. :(

Marcin

PS: If anybody has any practise with inheriting FileDialog,
don't be afraid of post.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top