peebman2000
Programmer
Hey guys, i'm trying to create a button in my app to open a text file from the c: drive in notepad. I'm getting errors with the code I found below. Does anyone know how this code I found works?
Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim filename As String = "C:/newfile.txt"
Dim open As New OpenFileDialog()
open.ShowDialog()
filename = open.FileName()
process.start("notepad.exe", filename)
End Sub
Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim filename As String = "C:/newfile.txt"
Dim open As New OpenFileDialog()
open.ShowDialog()
filename = open.FileName()
process.start("notepad.exe", filename)
End Sub