Share via


FolderBrowserDialog screen location

Question

Sunday, February 7, 2010 4:26 PM

I have been looking for some way to position the FolderBrowserDialog window where I want on a screen. In my applications I always try to layer my windows in a orderly manner, but I can find no way to specify where the FolderBrowserDialog window should open.

I was browsing the internet looking for a solution to this problem when I can across a 3 year old thread concerning exactly this and a file name ExtendedFolderBrowse.zip which presumably contains a solution to this problem. But I have not been able to find the file or any other solution.

I am hoping that someone can either post a solution or send me an email with a solution to this problem. I am working in c# but can find no Left or Top properties for the FolderBrowserDialog dialog box.

Thank you.

All replies (4)

Friday, February 12, 2010 8:40 AM âś…Answered

Hi,

The FolderBrowserDialog is inherited from CommonDialog class there is no directly way can do with the position of it in managed code. However there is a trip describe in this example and also a hook function help you achieve what you exactly want:

http://www.vbaccelerator.com/codelib/cmdlgd/cmdlgct.htm

Thanks
BinzePlease remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.


Sunday, February 7, 2010 5:20 PM | 1 vote

Here is a link to the project I think you are talking about. Hopefully it will help you put this functionality in here.

http://www.codeproject.com/KB/dialog/ExtendedFolderBrowser.aspxDewayne Dodd - Landshark Software "Please make sure to 'Mark As Answer' if this answer solves your question"


Friday, February 12, 2010 5:05 PM

First, I am sorry it took me so long to get back to you. I have been working on finishing up the app and am now doing some bug fixing. While I wanted to get the FolderBrowserDialog box properly positioned, that had to take a back seat to getting the main work done.

I have been looking at your Easy code and trying to translate it into CSharp. Most of that is straight-forward, but there is some stuff there that apparently VB has that appears in a different from in C#. Since I don't have VB installed on my system I am going to download the VB VS and check that out.

I will keep you posted, but thank you for sending this to me.


Friday, February 12, 2010 5:08 PM

First, let me apologize for not getting back to you more quickly. I have been trying to finish all of the app functionality and am now doing some bug fixes.

I have looked at your code and have been trying to convert it to c# (which is what I work in). Most of that is pretty straight-forward, but some involves some VB functionality that I am not familiar with and I will have to play around with it for a bit. And I will probably need to download the VS VB app and use it also. I will keep you posted and let you know when I am done and how it all works.

Thanks for posting this.