我正在Visual Basic中编写文字处理器,并且试图使我的应用程序加载从Windows资源管理器打开的文件。我找到了这段代码,但是似乎没有用:
Private Sub Form1_Load(sender As Object,e As EventArgs) Handles Me.Load
Dim s As String
s = Command$()
If s <> "" Then
RichTextBox1.LoadFile(s)
Else
'
' Do something else since no file was specified
'
End If
End Sub
有人可以帮忙吗?