VB程序,按下一个按钮打开一个指定的TXT文件(可对文件内容进行修改),并为该按钮设置密码。
1个回答
展开全部
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Sub Command1_Click()
ShellExecute Me.hwnd, "open", App.Path & "\1.txt", vbNull, vbNull, 1
End Sub
Private Sub Command1_Click()
ShellExecute Me.hwnd, "open", App.Path & "\1.txt", vbNull, vbNull, 1
End Sub
更多追问追答
追问
不行,用不了
追答
代码中没有加密码,但是可以打开txt文本文档,也可以编辑!
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询