📄 photo.frm
字号:
VERSION 5.00
Begin VB.Form Photo
BorderStyle = 0 'None
Caption = "Form1"
ClientHeight = 7440
ClientLeft = 0
ClientTop = 0
ClientWidth = 7680
LinkTopic = "Form1"
Picture = "Photo.frx":0000
ScaleHeight = 7440
ScaleWidth = 7680
ShowInTaskbar = 0 'False
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame1
BackColor = &H00D8D7D5&
Caption = "请选择"
Height = 6495
Left = 120
TabIndex = 0
Top = 720
Width = 7215
Begin VB.CommandButton Command1
BackColor = &H0080FF80&
Caption = "确定"
Height = 495
Left = 4560
TabIndex = 4
Top = 5280
Width = 2055
End
Begin VB.FileListBox filelist
Height = 1890
Left = 120
Pattern = "*.gif;*.jpg;*.bmp"
TabIndex = 2
Top = 3120
Width = 3735
End
Begin VB.DirListBox dirlist
Height = 2190
Left = 120
TabIndex = 3
Top = 720
Width = 3735
End
Begin VB.DriveListBox Drivelist
Height = 300
Left = 240
TabIndex = 1
Top = 240
Width = 3255
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "浏览相片"
Height = 375
Left = 4320
TabIndex = 5
Top = 480
Width = 1335
End
Begin VB.Image Image3
BorderStyle = 1 'Fixed Single
Height = 2295
Left = 4560
Stretch = -1 'True
Top = 1080
Width = 2175
End
End
End
Attribute VB_Name = "Photo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Drive1_Change()
End Sub
Private Sub Command1_Click()
On Error GoTo bo
If filelist.FileName <> "" Then
frmMain.Image3.Picture = LoadPicture(dirlist.Path + "\" + filelist.FileName)
frmMain.Label23.Caption = ""
End If
Unload Me
Exit Sub
bo:
xpbo = ""
Unload Me
End Sub
Private Sub dirlist_Change()
filelist.Path = dirlist.Path
End Sub
Private Sub Drivelist_Change()
On Error GoTo bo
dirlist.Path = Drivelist.Drive
Exit Sub
bo:
MsgBox "该设备不可选!", vbInformation, "系统提示"
End Sub
Private Sub filelist_Click()
On Error GoTo bo
Image3.Picture = LoadPicture(dirlist.Path + "\" + filelist.FileName)
Exit Sub
bo:
MsgBox "该图片不可显示!", vbCritical, "系统提示"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -