⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 modglobal.bas

📁 几个不错的VB例子
💻 BAS
字号:
Attribute VB_Name = "modGlobal"
' ==================
'    Thumb DB 1.5
' ==================
' Carles P.V. - 2001
' carles_pv@terra.es
' ==================

Option Explicit




' =================================================================================
' API Declarations
' =================================================================================

Public Declare Function GetTickCount Lib "kernel32" () As Long

Public Declare Function BitBlt Lib "gdi32" _
                       (ByVal hDestDC As Long, _
                        ByVal x As Long, ByVal y As Long, _
                        ByVal nWidth As Long, ByVal nHeight As Long, _
                        ByVal hSrcDC As Long, _
                        ByVal xSrc As Long, ByVal ySrc As Long, _
                        ByVal dwRop As Long) As Long
                        
Public Declare Function StretchBlt Lib "gdi32" _
                       (ByVal hdc As Long, _
                        ByVal x As Long, ByVal y As Long, _
                        ByVal nWidth As Long, ByVal nHeight As Long, _
                        ByVal hSrcDC As Long, _
                        ByVal xSrc As Long, ByVal ySrc As Long, _
                        ByVal nSrcWidth As Long, ByVal nSrcHeight As Long, _
                        ByVal dwRop As Long) As Long
                        
Public Const SRCCOPY = &HCC0020

Public Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long

Public Type POINTAPI
            x As Long
            y As Long
End Type

Public 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
                        
Public Const SW_RESTORE As Long = &H9&



' =================================================================================
' Global
' =================================================================================

Public tmpPath As String            'Loaded picture path
Public tmpPathFull As String        'Showed Preview picture path
Public tmpPathPreview As String     'Full Screen picture path

Public Const Thumb_max_size = 61    'Thumbnail size (width=height)

Public I As Integer                 'General counter
Public Resp As String               'General return of InputBox/MsgBox

Public t As Single                  'Timing counter
Public NL As String                 'New line

Public ThumbIndex As Integer        'Actual selected thumbnail
Public lastThumbIndex As Integer    'Last selected thumbnail
Public tblID() As Long              'ID Database picture
                                    '   >0 : ID thumbnail
                                    '    0 : Load error
                                    '   -1 : Moved
                                    '   -2 : Deleted
Public ThumbIsSelected As Boolean   'Move/Delete -> False

Public CopyThumb                    'Move/Copy thumbnail flag

' =================================================================================
' Draw decorative bar
' =================================================================================

Sub DrawBar(dstForm As Form, yPos As Single)
    
    For I = yPos To yPos + 22 Step 2
        dstForm.Line (0, I)-(dstForm.ScaleWidth, I), vb3DHighlight
        dstForm.Line (0, I + 1)-(dstForm.ScaleWidth, I + 1), vb3DShadow
    Next I
    
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -