-1
문서 작성자에서 작업 중이고 탭 기능을 포함하고 있으며 여러 탭으로 파일을 여는 데 문제가 있습니다 RichTextboxes를 사용하고 있습니다.열기 파일 서식있는 텍스트 상자 (VB.NET)
Public Sub openFile()
Dim ofd As New OpenFileDialog
ofd.Filter = fileFilter
ofd.FileName = ""
Select Case ofd.ShowDialog()
Case DialogResult.OK
loadFile(Path.GetFileName(ofd.FileName))
End Select
End Sub
Public Sub loadFile(ByVal file As String)
Try
fileName = file
setText(IO.File.ReadAllText(file))
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Public Sub setText(ByVal value As String)
Dim t As RichTextBox = tabH.SelectedTab.Controls.OfType(Of RichTextBox)().First()
t.Text = value
End Sub
는 시도는 문제를 잡기되며,이 파일을 찾을 수 있다고 말하고있다 : 여기
코드 (즉 어떤 영향을 미치는 있는지 확실하지 않습니다). 그러나 .exe 디렉토리의 파일을 검색 중입니다.누구든지이 문제를 해결하는 방법을 알고 있습니까?