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

📄 xpform.ctl

📁 会员管理系统 功能自己扩展把! 如果有改进给我发一份quweijie8@126.com 这个比较适合初学者``` Q:151693707 msn:quweijie8@hotmail.com
💻 CTL
字号:
VERSION 5.00
Begin VB.UserControl XPForm 
   AutoRedraw      =   -1  'True
   BackColor       =   &H00DAE9EC&
   ClientHeight    =   2130
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   2220
   ForeColor       =   &H00FFFFFF&
   ScaleHeight     =   2130
   ScaleWidth      =   2220
   Tag             =   "XPForm"
   ToolboxBitmap   =   "XPForm.ctx":0000
   Begin VB.PictureBox PP 
      AutoRedraw      =   -1  'True
      AutoSize        =   -1  'True
      BorderStyle     =   0  'None
      Height          =   1410
      Left            =   4440
      Picture         =   "XPForm.ctx":0312
      ScaleHeight     =   1410
      ScaleWidth      =   1560
      TabIndex        =   4
      Top             =   4320
      Visible         =   0   'False
      Width           =   1560
   End
   Begin VB.PictureBox Pi4 
      AutoSize        =   -1  'True
      BorderStyle     =   0  'None
      Height          =   315
      Left            =   0
      Picture         =   "XPForm.ctx":17D5
      ScaleHeight     =   315
      ScaleWidth      =   315
      TabIndex        =   3
      Top             =   0
      Visible         =   0   'False
      Width           =   315
   End
   Begin VB.PictureBox Pi3 
      AutoSize        =   -1  'True
      BorderStyle     =   0  'None
      Height          =   315
      Left            =   360
      Picture         =   "XPForm.ctx":1F01
      ScaleHeight     =   315
      ScaleWidth      =   315
      TabIndex        =   2
      Top             =   0
      Visible         =   0   'False
      Width           =   315
   End
   Begin VB.PictureBox pi1 
      BorderStyle     =   0  'None
      Height          =   315
      Left            =   720
      Picture         =   "XPForm.ctx":2632
      ScaleHeight     =   315
      ScaleWidth      =   315
      TabIndex        =   1
      Top             =   0
      Visible         =   0   'False
      Width           =   315
   End
   Begin VB.PictureBox pi2 
      BorderStyle     =   0  'None
      Height          =   315
      Left            =   1080
      Picture         =   "XPForm.ctx":2D52
      ScaleHeight     =   315
      ScaleWidth      =   315
      TabIndex        =   0
      Top             =   0
      Visible         =   0   'False
      Width           =   315
   End
   Begin VB.Image Pclose 
      Height          =   315
      Left            =   3100
      ToolTipText     =   "退出"
      Top             =   90
      Width           =   315
   End
   Begin VB.Image Pmin 
      Height          =   315
      Left            =   2760
      ToolTipText     =   "最小化"
      Top             =   90
      Width           =   315
   End
End
Attribute VB_Name = "XPForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Const m_def_BackColor = "14346732"
Const m_def_Caption = "XPForm"
'
'Event Declarations:
Event MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) 'MappingInfo=UserControl,UserControl,-1,MouseDown
Event MinClick()
Event CloseClick()





Public Property Get BackColor() As String
    BackColor = UserControl.BackColor
End Property

Public Property Get Caption() As String
    Caption = UserControl.Tag
End Property
Public Property Let BackColor(ByVal New_BackColor As String)
    UserControl.BackColor = New_BackColor
    PrintMe UserControl.Tag
    PropertyChanged "BackColor"
End Property

Public Property Let Caption(ByVal New_Caption As String)
    UserControl.Tag = New_Caption
    PrintMe UserControl.Tag
    PropertyChanged "Caption"
End Property
'为用户控件初始化属性
Private Sub UserControl_InitProperties()
    m_BackColor = m_def_BackColor
    m_caption = m_def_Caption
End Sub

'从存贮器中加载属性值
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
     UserControl.BackColor = PropBag.ReadProperty("BackColor", m_def_BackColor)
     UserControl.Tag = PropBag.ReadProperty("Caption", m_def_Caption)
    PrintMe UserControl.Tag
End Sub

'将属性值写到存储器
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
    Call PropBag.WriteProperty("BackColor", UserControl.BackColor, m_def_BackColor)
    Call PropBag.WriteProperty("Caption", UserControl.Tag, m_def_Caption)
    PrintMe UserControl.Tag
End Sub




Private Sub UserControl_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    RaiseEvent MouseDown(Button, Shift, X, Y)
End Sub

Private Sub Pclose_click()
    RaiseEvent CloseClick
End Sub
Private Sub Pmin_click()
    RaiseEvent MinClick
End Sub

Public Sub PrintMe(Title As String)
UserControl.Cls
For k = 1 To Int(UserControl.Width / 300) + 1
UserControl.PaintPicture PP.Picture, 300 * k, 0, 300, 450, 300, 0, 300, 450
Next
For k = 1 To Int(UserControl.Width / 300) + 1
UserControl.PaintPicture PP.Picture, 300 * k, UserControl.Height - 60, 300, 500, 300, PP.Height - 60, 300, 500
Next

For k = 1 To Int(UserControl.Height / 300) + 1
UserControl.PaintPicture PP.Picture, 0, 300 * k, 60, 500, 0, 800, 60, 500
Next

For k = 1 To Int(UserControl.Height / 300) + 1
UserControl.PaintPicture PP.Picture, UserControl.Width - 60, 300 * k, 300, 500, PP.Width - 60, 800, 300, 500
Next

UserControl.PaintPicture PP.Picture, 0, 0, 450, 450, 0, 0, 450, 450
UserControl.PaintPicture PP.Picture, 0, UserControl.Height - 60, 450, 60, 0, PP.Height - 60, 450, 60
UserControl.PaintPicture PP.Picture, UserControl.Width - 1000, 0, 1000, 450, PP.Width - 1000, 0, 1000, 450
UserControl.PaintPicture PP.Picture, UserControl.Width - 500, UserControl.Height - 60, 500, 60, PP.Width - 500, PP.Height - 60, 500, 60

UserControl.CurrentX = 200
UserControl.CurrentY = 150
UserControl.Print Title

End Sub


Private Sub UserControl_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Pclose.Picture = LoadPicture()
Pmin.Picture = LoadPicture()

End Sub



Private Sub Pclose_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Pclose.Picture = pi2.Picture
End Sub

Private Sub Pmin_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Pmin.Picture = pi1.Picture
End Sub



Private Sub Pmin_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Pmin.Picture = Pi3.Picture
End Sub
Private Sub Pclose_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Pclose.Picture = Pi4.Picture
End Sub
Private Sub Pmin_Mouseup(Button As Integer, Shift As Integer, X As Single, Y As Single)
Pmin.Picture = LoadPicture()
End Sub

Private Sub Pclose_Mouseup(Button As Integer, Shift As Integer, X As Single, Y As Single)
Pclose.Picture = LoadPicture()
End Sub

Private Sub UserControl_Resize()
PrintMe UserControl.Tag
Pclose.Left = UserControl.Width - 400
Pmin.Left = UserControl.Width - 750
Pclose.Top = 90
Pmin.Top = 90
End Sub

Public Sub Nomin()
UserControl.PaintPicture PP.Picture, UserControl.Width - 830, 0, 400, 450, PP.Width - 1200, 0, 400, 450
Pmin.Visible = False
UserControl.CurrentX = 200
UserControl.CurrentY = 150
UserControl.Print UserControl.Tag
End Sub

⌨️ 快捷键说明

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