Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / September 2004

Tip: Looking for answers? Try searching our database.

FolderBrowserDialog is empty

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Davy Brion - 11 Sep 2004 16:32 GMT
Hey,

i'm sure i overlooked something silly, but for some reason if i try to
use the FolderBrowserDialog.ShowDialog method, the dialog does not
show a treeview containing folders...  the dialog only contains the
button to create a new folder (which also doesn't do anything)  and
the Ok and Cancel buttons.

I get this behaviour no matter what value i assign to the RootFolder
property before calling the ShowDialog method.

Does anyone know what i'm doing wrong here?

thx

ps: using .NET 1.1 with SP1 on XP Pro SP2

--
Herfried K. Wagner [MVP] - 11 Sep 2004 18:24 GMT
* "Davy Brion" <ralinx@gmail.com> scripsit:
> i'm sure i overlooked something silly, but for some reason if i try to
> use the FolderBrowserDialog.ShowDialog method, the dialog does not
> show a treeview containing folders...  the dialog only contains the
> button to create a new folder (which also doesn't do anything)  and
> the Ok and Cancel buttons.

Make sure the 'STAThread' attribute is specified on your application's
entry point (not 'MTAThread').  'STAThread' is the default, so it
doesn't need to be explicitly added to your 'void Main'/'Sub Main'.

Signature

M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://dotnet.mvps.org/dotnet/faqs/

Davy Brion - 11 Sep 2004 19:20 GMT
> Make sure the 'STAThread' attribute is specified on your application's
> entry point (not 'MTAThread').  'STAThread' is the default, so it
> doesn't need to be explicitly added to your 'void Main'/'Sub Main'.

thx, that fixed it :)

--
Joey Callisay - 13 Sep 2004 02:35 GMT
Any article or links which discusses this behavior for folderbrowserdialog
on Multithreaded apps Mr. Wagner?

Thanx...

> * "Davy Brion" <ralinx@gmail.com> scripsit:
> > i'm sure i overlooked something silly, but for some reason if i try to
[quoted text clipped - 6 lines]
> entry point (not 'MTAThread').  'STAThread' is the default, so it
> doesn't need to be explicitly added to your 'void Main'/'Sub Main'.
Herfried K. Wagner [MVP] - 13 Sep 2004 07:58 GMT
* "Joey Callisay" <hcalisay@codex-systems.com> scripsit:
> Any article or links which discusses this behavior for folderbrowserdialog
> on Multithreaded apps Mr. Wagner?

I don't have an article in mind, but for Windows Forms Apps I'd use
'STAThread' to avoid problems when components make use of COM interop.

Signature

M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://dotnet.mvps.org/dotnet/faqs/

Joey Callisay - 13 Sep 2004 08:19 GMT
ok thanx

> * "Joey Callisay" <hcalisay@codex-systems.com> scripsit:
> > Any article or links which discusses this behavior for folderbrowserdialog
> > on Multithreaded apps Mr. Wagner?
>
> I don't have an article in mind, but for Windows Forms Apps I'd use
> 'STAThread' to avoid problems when components make use of COM interop.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.