Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 10-18-2004, 01:36 AM   #1 (permalink)
sureshkumar_kc
Registered User
 
sureshkumar_kc's Avatar
 
Join Date: Sep 2004
Posts: 12
sureshkumar_kc is on a distinguished road
Customize the SaveFileDialog

In C#, I am trying to create a windows control library using FileDialog.

public class UserControl1 : System.Windows.Forms.FileDialog
{

}

When I doing this I am getting the following error .

does not implement inherited abstract member 'System.Windows.Forms.FileDialog.RunFileDialog(Sys tem.Windows.Forms.NativeMethods.OPENFILENAME_I)'

But I could not noticed this RunFileDialog member in FileDialog member list.
Can you help me create sub class of the FileDialog

i.e....

I want to add a ComboBox to the SaveFileDialog, The SaveFileDialog class is sealed, and the documentation declares that its impossible to inherit from the FileDialog either . Is there a way around, or should I write a whole new form?
sureshkumar_kc is offline   Reply With Quote
Old 10-19-2004, 02:23 AM   #2 (permalink)
RobertStout
Registered User
 
RobertStout's Avatar
 
Join Date: Oct 2004
Location: Dank cellar
Posts: 18
RobertStout is on a distinguished road
You can't inherit from a sealed class.

Don't create a whole new form, simply create a custom control that implements (but does not inherit from) a savefiledialog and a combobox.
RobertStout is offline   Reply With Quote
Old 10-19-2004, 02:43 AM   #3 (permalink)
sureshkumar_kc
Registered User
 
sureshkumar_kc's Avatar
 
Join Date: Sep 2004
Posts: 12
sureshkumar_kc is on a distinguished road
Hi

Thanks RobertStout
But I am not getting how to implements that..

I want to add a ComboBox/textbox to the SaveFileDialog.
sureshkumar_kc is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 11:15 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting