0

When searching for an alternative to the FolderBrowserDialog, I found here answers mentionning the "ookii dialogs" librairies and I would like to use these dialogs in my project. Being very new to VB.NET, I could not find precise instructions to successfully add that to my project.

I'm not even sure if it's possible since the ookii dialogs librairies I found are coded in C# and my application is coded in Visual Basic. Is it possible? Will the included .dll work anyway?

I use Sharpdevelop 4.4.2. Here is what I tried so far :

  1. 'Add reference' and browsed to the Ookii.Dialogs.dll
  2. 'Add existing Item' and browsed to the Ookii.Dialogs.dll
  3. 'Add reference/existing item' and browsed to the Ookii.Dialogs.xml

I Though I was good because now the auto suggest function of sharpdevelop let me pin to the properties and methods of the ookii librairies but I get a "Type not defined" error when trying to compile with

Dim zzz As Ookii.Dialogs.VistaFolderBrowserDialog

Am I just missing a proper 'imports' statement?

TontonVelu
  • 471
  • 2
  • 8
  • 21

1 Answers1

1

Yes the okki dialogs work in vb.net. Check the documentation.

There is an exemple of VistaFolderBrowserDialog.

Imports Ookii.Dialogs.Wpf

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

    Dim dlg As VistaFolderBrowserDialog = New VistaFolderBrowserDialog()
    
    'show the dialogbox for the user to choose the folder
    Dim folderResult As Object = dlg.ShowDialog

    'you can get the selected parth with this. Here I put it in a textbox. 
    TexBox1.Text = dlg.SelectedPath             


End Sub
C. Augusto Proiete
  • 24,684
  • 2
  • 63
  • 91
TontonVelu
  • 471
  • 2
  • 8
  • 21