![]() |
#2
seafish0112013-03-22 20:22
|
Option Explicit
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub
Private Sub Drive1_Change()
Dim r As VbMsgBoxResult
On Error GoTo eh
Dir1.Path = Drive1.Drive
Exit Sub
eh:
If Err.Number = 68 Then
r = MsgBox("请插入磁盘!", vbRetryCancel + vbCritical, "缺少磁盘!")
If r = vbRetry Then
Resume
Else
Drive1.Drive = "c:"
Resume Next
End If
End Sub
Private Sub File1_Click()
If Option2.Value = True Then Exit Sub
Dim picfile As String
If Right(Dir1.Path, 1) = "\" Then
picfile = Dir1.Path + File1.FileName
Else
picfile = Dir1.Path + "\" + File1.FileName
End If
Image1.Picture = LoadPicture(picfile)
Text1.Text = File1.FileName
End Sub
Private Sub File1_DblClick()
If Option1.Value = True Then Exit Sub
Dim picfile As String
If Right(Dir1.Path, 1) = "\" Then
picfile = Dir1.Path + "\" + File1.FileName
End If
Image1.Picture = LoadPicture(picfile)
Text1.Text = File1.FileName
End Sub
程序运行没问题,但如果从
只有本站会员才能查看附件,请 登录
换到只有本站会员才能查看附件,请 登录
d就会出现只有本站会员才能查看附件,请 登录
错误,求大神解决。