?? frmmain.frm
字號:
Private Sub MnuRefreshDir_Click()
If tvTreeView.bLoaded Then
tvTreeView.UnInit
tvTreeView.Init
tvTreeView_SelectionChange "", ""
End If
End Sub
Private Sub MnuSetBackground_Click(Index As Integer)
Screen.MousePointer = vbHourglass
'決定其分布的類型
Dim sKeyName As String, sEntry As String
Dim sValue As String, bSuccess As Boolean
Select Case Index
Case 0
'中心時
sKeyName = "HKEY_CURRENT_USER\Control Panel\Desktop"
sEntry = "WallpaperStyle"
sValue = "0"
bSuccess = WriteRegStringValue(sKeyName, sEntry, sValue)
sKeyName = "HKEY_CURRENT_USER\Control Panel\Desktop"
sEntry = "TileWallpaper"
sValue = "0"
bSuccess = WriteRegStringValue(sKeyName, sEntry, sValue)
Case 1
'伸展時
sKeyName = "HKEY_CURRENT_USER\Control Panel\Desktop"
sEntry = "WallpaperStyle"
sValue = "2"
bSuccess = WriteRegStringValue(sKeyName, sEntry, sValue)
sKeyName = "HKEY_CURRENT_USER\Control Panel\Desktop"
sEntry = "TileWallpaper"
sValue = "0"
bSuccess = WriteRegStringValue(sKeyName, sEntry, sValue)
Case 2
'平鋪時
sKeyName = "HKEY_CURRENT_USER\Control Panel\Desktop"
sEntry = "WallpaperStyle"
sValue = "1"
bSuccess = WriteRegStringValue(sKeyName, sEntry, sValue)
sKeyName = "HKEY_CURRENT_USER\Control Panel\Desktop"
sEntry = "TileWallpaper"
sValue = "1"
bSuccess = WriteRegStringValue(sKeyName, sEntry, sValue)
End Select
ChangePaper picBuffer, True
Screen.MousePointer = vbDefault
End Sub
Private Sub MnuShowSize_Click(Index As Integer)
MnuShowSize(OldShowSize).Checked = False
MnuShowSize(Index).Checked = True
OldShowSize = Index
SaveSetting App.Title, "Settings", "ShowSize", Index
ShowPreview picBuffer, picBuffer.ScaleWidth, picBuffer.ScaleHeight, picShow, picDisplay.ScaleWidth, picDisplay.ScaleHeight, picDisplay.Visible, OldShowSize
End Sub
Private Sub mnuToolsOptions_Click()
frmOption.Show 1
End Sub
Private Sub MnuVideoPause_Click()
AudioDisplay.Pause
End Sub
Private Sub MnuVideoPlay_Click()
AudioDisplay.Run
End Sub
Private Sub MnuVideoStop_Click()
AudioDisplay.Stop
End Sub
Private Sub mnuView_Click(Index As Integer)
MnuView(lvListView.View).Checked = False '取消上次的查看
MnuView(Index).Checked = True '確定此次查看
tbToolBar.Buttons(View_Number + Index).Value = tbrPressed
lvListView.View = Index
SaveSetting App.Title, "Settings", "ViewMode", Index
End Sub
Private Sub MnuViewPreview_Click()
MnuViewPreview.Checked = Not MnuViewPreview.Checked
'預覽欄改變
If MnuViewPreview.Checked = True Then
tbToolBar.Buttons(Display_Number + 2).Value = tbrPressed
SaveSetting App.Title, "Settings", "DisplayPreview", 1
Else
tbToolBar.Buttons(Display_Number + 2).Value = tbrUnpressed
MnuPicture.Visible = False
SaveSetting App.Title, "Settings", "DisplayPreview", 0
RefreshDesk '刷新板面
End If
picDisplay.Visible = MnuViewPreview.Checked
SizeControlsH Val(GetSetting(App.Title, "Settings", "HPosition", 1500))
SaveSetting App.Title, "Settings", "HPosition", imgSplitter2.Top
'If picLoad = True Then
' If picDisplay.Visible Then
' Call picDisplay_Resize
' End If
'End If
End Sub
Private Sub picDisplay_DblClick()
'MnuPictureView_Click '顯示查看
End Sub
Private Sub picDisplay_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
'If Button = 2 And picShow.Visible = True Then PopupMenu MnuPicture
End Sub
Private Sub picDisplay_Resize()
If picShow.Visible Then '如果圖片瀏覽時
If picShow.Height > picDisplay.Height Then
picShow.Top = 0
picShow.MouseIcon = picMouseOver.Picture
Else
picShow.Top = (picDisplay.Height - picShow.Height) / 2
End If
If picShow.Width > picDisplay.Width Then
picShow.Left = 0
picShow.MouseIcon = picMouseOver.Picture
Else
picShow.Left = (picDisplay.Width - picShow.Width) / 2
End If
'安裝鼠標
If picShow.ScaleHeight <= picDisplay.Height And picShow.ScaleWidth <= picDisplay.Width Then
picShow.MouseIcon = picMouseUp.Picture
End If
'預覽區有圖片時
If picLoad = True And OldShowSize = 0 Then
Screen.MousePointer = vbArrowHourglass
'是否安裝圖片
If picDisplay.Visible Then
ShowPreview picBuffer, picBuffer.ScaleWidth, picBuffer.ScaleHeight, picShow, picDisplay.ScaleWidth, picDisplay.ScaleHeight, picDisplay.Visible, OldShowSize
End If
Screen.MousePointer = vbDefault
End If
End If
If GifView.Visible Then '如果GIF有效時
GifView.Left = 20
GifView.Height = picDisplay.ScaleHeight - 40
GifView.Width = picDisplay.ScaleWidth - 40
End If
If AudioDisplay.Visible Then '如果聲音有效時
If AudioDisplay.Width >= picDisplay.Width Then
AudioDisplay.Left = 0
Else
AudioDisplay.Left = (picDisplay.Width - AudioDisplay.Width) / 2
End If
If AudioDisplay.Height >= picDisplay.Height Then
AudioDisplay.Top = 0
Else
AudioDisplay.Top = (picDisplay.Height - AudioDisplay.Height) / 2
End If
End If
End Sub
Private Sub picShow_DblClick()
MnuPictureView_Click '顯示查看
End Sub
Private Sub picShow_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 Then
PopupMenu MnuPicture
Else
'安裝鼠標
If picShow.ScaleHeight <= picDisplay.Height And picShow.ScaleWidth <= picDisplay.Width Then
picShow.MouseIcon = picMouseUp.Picture
Exit Sub
Else
picShow.MouseIcon = picMouseDown.Picture
End If
End If
End Sub
Private Sub picShow_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If picShow.ScaleHeight <= picDisplay.Height And picShow.ScaleWidth <= picDisplay.Width Then
Exit Sub
Else
MovePicture picShow, X, Y, Button '移動圖片
End If
End Sub
Private Sub picShow_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
'安裝鼠標
If picShow.ScaleHeight <= picDisplay.Height And picShow.ScaleWidth <= picDisplay.Width Then
picShow.MouseIcon = picMouseUp.Picture
Else
picShow.MouseIcon = picMouseOver.Picture
End If
End Sub
Private Sub picShow_Resize()
If picShow.Height > picDisplay.Height Then
picShow.Top = 0
picShow.MouseIcon = picMouseOver.Picture
Else
picShow.Top = (picDisplay.Height - picShow.Height) / 2
End If
If picShow.Width > picDisplay.Width Then
picShow.Left = 0
picShow.MouseIcon = picMouseOver.Picture
Else
picShow.Left = (picDisplay.Width - picShow.Width) / 2
End If
'安裝鼠標
If picShow.ScaleHeight <= picDisplay.Height And picShow.ScaleWidth <= picDisplay.Width Then
picShow.MouseIcon = picMouseUp.Picture
End If
End Sub
Private Sub ShellFolderViewOC1_SelectionChanged()
End Sub
Private Sub ShellFolderViewX_SelectionChanged()
End Sub
Private Sub tbToolBar_ButtonClick(ByVal Button As MSComctlLib.Button)
On Error Resume Next
Select Case Button.Key
Case "打開"
MnuFileOpen_Click
Case "播放"
AudioDisplay.Run '播放
Case "剪切"
Clipboard.Clear '清除剪貼板
Case "復制"
mnuEditCopy_Click
Case "刪除"
mnuFileDelete_Click
Case "屬性"
MnuFileAttribute_Click
Case "打印"
MnuPrintPicture_Click
Case "大圖標"
mnuView_Click (0)
Case "小圖標"
mnuView_Click (1)
Case "列表"
mnuView_Click (2)
Case "詳細資料"
mnuView_Click (3)
Case "升序"
MnuArrangSortAuto_Click
Case "降序"
MnuArrangSortAutoZ_Click
Case "工具欄"
mnuViewToolbar_Click
Case "狀態欄"
mnuViewStatusBar_Click
Case "預覽欄"
MnuViewPreview_Click
Case "幫助"
End Select
End Sub
Private Sub mnuHelpAbout_Click()
MsgBox "版本 " & App.Major & "." & App.Minor & "." & App.Revision
End Sub
Private Sub mnuHelpSearchForHelpOn_Click()
Dim nRet As Integer
'如果這個工程沒有幫助文件,顯示消息給用戶
'可以在“工程屬性”對話框中為應用程序設置幫助文件
If Len(App.HelpFile) = 0 Then
MsgBox "無法顯示幫助目錄,該工程沒有相關聯的幫助。", vbInformation, Me.Caption
Else
On Error Resume Next
nRet = OSWinHelp(Me.hWnd, App.HelpFile, 261, 0)
If Err Then
MsgBox Err.Description
End If
End If
End Sub
Private Sub mnuHelpContents_Click()
Dim nRet As Integer
'如果這個工程沒有幫助文件,顯示消息給用戶
'可以在“工程屬性”對話框中為應用程序設置幫助文件
If Len(App.HelpFile) = 0 Then
MsgBox "無法顯示幫助目錄,該工程沒有相關聯的幫助。", vbInformation, Me.Caption
Else
On Error Resume Next
nRet = OSWinHelp(Me.hWnd, App.HelpFile, 3, 0)
If Err Then
MsgBox Err.Description
End If
End If
End Sub
Private Sub mnuViewRefresh_Click()
If picLoad = True Then
mnuEditCopy.Enabled = False '復制按鈕無效
MnuLookFor.Enabled = False '查看菜單無效
MnuPrintPicture.Enabled = False
'隱藏圖片菜單
MnuPicture.Visible = False
picShow.Visible = False
tbToolBar.Buttons(Copy_Number).Enabled = False
tbToolBar.Buttons(Printer_Number).Enabled = False
sbStatusBar.Panels(3).Text = "未注冊版: V1.0"
picLoad = False
End If
If fPath$ > "" And frmMain.Visible Then
fPath = ValidateDir(fPath)
vbGetFileList
End If
'菜單為無效
If lvListView.ListItems.Count > 0 Then
lvListView.SetFocus '列表獲得焦點
Else
MenuEnabled (0)
End If
End Sub
Private Sub mnuViewStatusBar_Click()
mnuViewStatusBar.Checked = Not mnuViewStatusBar.Checked
sbStatusBar.Visible = mnuViewStatusBar.Checked
'狀態欄改變
If mnuViewStatusBar.Checked = True Then
tbToolBar.Buttons(Display_Number + 1).Value = tbrPressed
SaveSetting App.Title, "Settings", "DisplayStatusbar", 1
Else
tbToolBar.Buttons(Display_Number + 1).Value = tbrUnpressed
SaveSetting App.Title, "Settings", "DisplayStatusbar", 0
End If
SizeControls tvTreeView.Width
SizeControlsH imgSplitter2.Top
End Sub
Private Sub mnuViewToolbar_Click()
mnuViewToolbar.Checked = Not mnuViewToolbar.Checked
tbToolBar.Visible = mnuViewToolbar.Checked
'工具欄改變
If mnuViewToolbar.Checked = True Then
tbToolBar.Buttons(Display_Number).Value = tbrPressed
SaveSetting App.Title, "Settings", "DisplayToolbar", 1
Else
tbToolBar.Buttons(Display_Number).Value = tbrUnpressed
SaveSetting App.Title, "Settings", "Dis
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -