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

📄 xphelp.ctl

📁 小小图书管理系统是功能完善,已经可以实用于小型单位或科室的图书管理.系统界面美观,操作方便,代码带有详尽的注释,相信大家一定会喜欢
💻 CTL
字号:
VERSION 5.00
Object = "{27395F88-0C0C-101B-A3C9-08002B2F49FB}#1.1#0"; "PICCLP32.OCX"
Begin VB.UserControl xphelp 
   CanGetFocus     =   0   'False
   ClientHeight    =   435
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   1380
   ScaleHeight     =   435
   ScaleWidth      =   1380
   ToolboxBitmap   =   "xphelp.ctx":0000
   Begin VB.Timer Timer1 
      Interval        =   10
      Left            =   960
      Top             =   0
   End
   Begin PicClip.PictureClip pc1 
      Left            =   0
      Top             =   0
      _ExtentX        =   1667
      _ExtentY        =   556
      _Version        =   393216
      Cols            =   3
      Picture         =   "xphelp.ctx":0312
   End
End
Attribute VB_Name = "xphelp"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINT_API) As Long
Private Declare Function ScreenToClient Lib "user32" (ByVal hWnd As Long, lpPoint As POINT_API) As Long

Private Type POINT_API
    X As Long
    Y As Long
End Type

Event Click()
Attribute Click.VB_UserMemId = -600
Event MouseOut()
Event MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Attribute MouseDown.VB_UserMemId = -605
Event MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Attribute MouseMove.VB_UserMemId = -606
Event MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Attribute MouseUp.VB_UserMemId = -607

Private Sub Timer1_Timer()
    Dim pnt As POINT_API
    GetCursorPos pnt
    ScreenToClient UserControl.hWnd, pnt

    If pnt.X < UserControl.ScaleLeft Or _
       pnt.Y < UserControl.ScaleTop Or _
       pnt.X > (UserControl.ScaleLeft + UserControl.ScaleWidth) Or _
       pnt.Y > (UserControl.ScaleTop + UserControl.ScaleHeight) Then
        Timer1.Enabled = False
        RaiseEvent MouseOut
        If UserControl.Enabled = True Then UserControl.Picture = pc1.GraphicCell(0)
    End If
End Sub

Private Sub UserControl_Click()
    UserControl.Picture = pc1.GraphicCell(0)
    RaiseEvent Click
End Sub

Private Sub UserControl_Initialize()
    UserControl.Picture = pc1.GraphicCell(0)
    UserControl.Height = 21
    UserControl.Width = 21
End Sub

Private Sub UserControl_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    UserControl.Picture = pc1.GraphicCell(2)
    RaiseEvent MouseDown(Button, Shift, X, Y)
End Sub

Private Sub UserControl_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Timer1.Enabled = True
    If X >= 0 And Y >= 0 And _
       X <= UserControl.ScaleWidth And Y <= UserControl.ScaleHeight Then
       RaiseEvent MouseMove(Button, Shift, X, Y)
       If Button = vbLeftButton Then
           UserControl.Picture = pc1.GraphicCell(2)
       Else:     UserControl.Picture = pc1.GraphicCell(1)
       End If
    End If
End Sub

Private Sub UserControl_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
    RaiseEvent MouseUp(Button, Shift, X, Y)
End Sub

Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
    Enabled = PropBag.ReadProperty("Enabled", True)
End Sub

Private Sub UserControl_Resize()
    UserControl.Height = 315
    UserControl.Width = 315
End Sub

Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
    Call PropBag.WriteProperty("Enabled", UserControl.Enabled, True)
End Sub

⌨️ 快捷键说明

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