FolderBrowser

  • Thread starter Thread starter TarheelsFan
  • Start date Start date
T

TarheelsFan

I was trying to convert a VB project that contained the class
FolderBrowser to C#. I have added a reference to System.Design, and
the FolderBrowser class now shows up, but when I call

System.Windows.Forms.Design.FolderNameEditor.FolderBrowser fb = new
System.Windows.Forms.Design.FolderNameEditor.FolderBrowser();

I receive the error
'System.Windows.Forms.Design.FolderNameEditor.FolderBrowser' is
inaccessible due to its protection level. Does anyone know off the top
of their head anything that will help me? Thanks.
 
You might have to inherit from FolderNameEditor; check you haven't lost this
in the conversion...

Following compiles, but doesn't show anything too useful...

class Test : FolderNameEditor
{
static void Main()
{
FolderBrowser fb = new FolderBrowser();
fb.ShowDialog();
}
}

Marc
 
Wow, thanks man. I did inherit from FolderNameEditor. Although I
inherited it into the wrong class, so obvously it didn't work. I got
it going now though. Thanks again.
 

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

Back
Top