Wrox Programmer Forums
|
VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1). ** Please don't post code questions here ** For issues specific to a particular language in .NET, please see the other forum categories.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VS.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 11th, 2005, 02:47 AM
Authorized User
 
Join Date: Dec 2004
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to eelisMX
Default FolderBrowserDialog problem

Hi,

I added a FolderBrowserDialog object to my app. The object was working well but now when I call the ShowDialog() method the dilog appears but no folders are shown in the dialog (the description does appear).
The code is as follows:
Code:
If Me.FolderBrowserDialog1.ShowDialog = DialogResult.OK Then
       Me.txtPath.Text = Me.FolderBrowserDialog1.SelectedPath
End If
I'm using VS 2003 with .NET 1.1 on Win2K SP4 (all win updates installed)
 
Old July 11th, 2005, 06:46 AM
Authorized User
 
Join Date: Dec 2004
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to eelisMX
Default

The problem is apparently caused by threading.
The form where the FolderBrowserDialog is placed was running on a seperate thread from the main UI thread.
Code:
With New System.Threading.Thread(AddressOf DisplayLogs)
      .Start()
End With
Everything worked well except for the FolderBrowserDialog object. When I changed the code to open the form as - Form.ShowDialog() - the FolderBrowserDialog was executed well.
Is this some kind of a known bug or am I trying to do it wrongly ?
 
Old November 12th, 2008, 05:40 AM
Registered User
 
Join Date: Nov 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Does your Main method have the STAThread attribute? This is required for it to work properly.

---------
- G Himangi, LogicNP Software http://www.ssware.com
Shell MegaPack: GUI Controls For Drop-In Windows Explorer like File/Folder Browsing Functionality (.Net & ActiveX Editions).
EZNamespaceExtensions: Develop namespace extensions rapidly in .Net and MFC/ATL/C++
EZShellExtensions: Develop all shell extensions,explorer bars and BHOs rapidly in .Net & MFC/ATL/C++
---------





Similar Threads
Thread Thread Starter Forum Replies Last Post
FolderBrowserDialog sturdy3x VB.NET 1 August 7th, 2009 03:59 PM
FolderBrowserDialog Problems JimFuse VB.NET 2002/2003 Basics 0 June 27th, 2005 02:40 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.