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

📄 usercontrol5.ctl

📁 专业版的VB个人防火墙,在XP上已经调试OK
💻 CTL
📖 第 1 页 / 共 4 页
字号:
DrawTextTohWnd Hold_Caption
End Sub

Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
Hold_Caption = PropBag.ReadProperty("Hold_Caption", "null")
Hold_Icon = PropBag.ReadProperty("Hold_Icon", 1)
End Sub

Private Sub UserControl_Show()
Picture1.Top = 0
Picture1.Left = 0
Picture1.Width = UserControl.ScaleWidth
Picture1.Height = UserControl.ScaleHeight
LoadColor
Dim x As Integer, z
x = LoadBmpMenuLines(1, Color_Left, 0, 0)
z = LoadBmpMenuLines(UserControl.ScaleWidth - x - 1, Color_Cent, x, 0)
LoadBmpMenuLines 1, Color_Right, UserControl.ScaleWidth - 1, 0
Select Case Hold_Icon
Case 1
z = LoadBmpMenuLines(1, Button_Block_Off, x, 0)
Case 2
z = LoadBmpMenuLines(1, Button_Update_Off, x, 0)
Case 3
z = LoadBmpMenuLines(1, Button_Options_Off, x, 0)
Case 4
z = LoadBmpMenuLines(1, Button_Help_Off, x, 0)
End Select
DrawTextTohWnd Hold_Caption
End Sub

Function SubClassMe()
TrackMouse1.Watch Picture1
End Function

Function UnSubClassMe()
TrackMouse1.CloseWatch
End Function

Private Sub DrawTextTohWnd(htext2 As String)
    Dim lentext As Long
    Dim vh As Integer
    Dim hrect As RECT
    Dim htext As String
    htext = String(10, " ") & htext2
    lentext = Len(htext)
    SetRect hrect, 4, 0, ScaleWidth - 4, ScaleHeight
    vh = DrawText(Picture1.hDC, htext, lentext, hrect, DT_CALCRECT Or DT_CENTER Or DT_WORDBREAK)
    SetRect hrect, 4, (ScaleHeight * 0.5) - (vh * 0.5), ScaleWidth - 4, (ScaleHeight * 0.5) + (vh * 0.5)
    DrawText Picture1.hDC, htext, lentext, hrect, DT_LEFT Or DT_WORDBREAK
    RedrawWindow hwnd, hrect, ByVal 0&, RDW_INVALIDATE
End Sub

Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
PropBag.WriteProperty "Hold_Caption", Hold_Caption, "null"
PropBag.WriteProperty "Hold_Icon", Hold_Icon, 1
End Sub

Function Reset()
Shape1.Visible = False
LoadColor
Dim x As Integer, z
x = LoadBmpMenuLines(1, Color_Left, 0, 0)
z = LoadBmpMenuLines(UserControl.ScaleWidth - x - 1, Color_Cent, x, 0)
LoadBmpMenuLines 1, Color_Right, UserControl.ScaleWidth - 1, 0
Select Case Hold_Icon
Case 1
z = LoadBmpMenuLines(1, Button_Block_Off, x, 0)
Case 2
z = LoadBmpMenuLines(1, Button_Update_Off, x, 0)
Case 3
z = LoadBmpMenuLines(1, Button_Options_Off, x, 0)
Case 4
z = LoadBmpMenuLines(1, Button_Help_Off, x, 0)
End Select
DrawTextTohWnd Hold_Caption
End Function

⌨️ 快捷键说明

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