Skip to Content
0
Former Member
Mar 24, 2010 at 04:06 PM

Choosing a folder from the hard drive

76 Views

Hi

I need to allow the user to choose a directory to save a logfile to from a Business One form that should get launched when they click on a browse button. I have currently got the below code which is located within the the ItemEvent.

Dim FolderWindow As New Windows.Forms.FolderBrowserDialog

FolderWindow.RootFolder = Environment.SpecialFolder.MyComputer

FolderWindow.ShowDialog()

The FolderBrowserDialog window does appear however there is nothing shown where the folder directories should be so therefore not allowing for a directory to be chosen. If I however copy the exact same code and place it into the sub Main for example it works OK.

I've had a look around the forum and theres a couple of people who look as if they've also had this problem but there's no fixes given. Does anyone know why the folders aren't being shown or another way I can allow the user to choose a directory from the Hard Drive?

Thanks

Steve