I’m making a simple program in which, when you press a button the dialog box with all the directories appears so that you can select and open your document. There is no server or browser or web involvement. In fact, since I’m making the project in Visual Studio, I prefer that it opens in Visual Studio, or at least through it.
This is a bit of a code I wrote in Visual Basic, but it doesn’t actually open the file.
Public Class Form1 Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim fd As OpenFileDialog = New OpenFileDialog() Dim strFileName As String fd.Title = "Open File Dialog" fd.InitialDirectory = "C:\" fd.Filter = "All files (*.*)|*.*|All files (*.*)|*.*" fd.FilterIndex = 2 fd.RestoreDirectory = True If fd.ShowDialog() = DialogResult.OK Then strFileName = fd.FileName 'fd.OpenFile() "strFileName" "Microsoft Visual Studio\Frontend.vb" End If End Sub End Class
Any help or suggestion is appreciated.