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

📄 xbutton.ctl

📁 超市的管理与及时的维护
💻 CTL
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Begin VB.UserControl XButton 
   AutoRedraw      =   -1  'True
   ClientHeight    =   570
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   1320
   DefaultCancel   =   -1  'True
   ScaleHeight     =   570
   ScaleWidth      =   1320
   Begin VB.Timer Timer1 
      Enabled         =   0   'False
      Interval        =   50
      Left            =   360
      Top             =   120
   End
   Begin VB.PictureBox im1 
      AutoRedraw      =   -1  'True
      AutoSize        =   -1  'True
      BorderStyle     =   0  'None
      Height          =   495
      Left            =   3120
      ScaleHeight     =   495
      ScaleWidth      =   1215
      TabIndex        =   0
      Top             =   2400
      Visible         =   0   'False
      Width           =   1215
   End
   Begin VB.Image img1 
      Height          =   375
      Left            =   0
      Top             =   0
      Width           =   975
   End
End
Attribute VB_Name = "XButton"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False

' **********************************************************************
'  描  述:超市销售系统源代码
'  Play78.com : 网站导航,源码之家,绝对开源
'  海阔天空收集整理
'  主站地址:http://www.play78.com/
'  源码下载地址:http://www.play78.com/blog
'  图片下在地址:http://www.play78.com/pic
'  QQ:13355575
'  e-mail:hglai@eyou.com
'  编写日期:2005年08月14日
' **********************************************************************

Const m_def_IfDraw = False
Const m_def_style = 0
Const MouseOnC_def = vbMenuBar
Const MouseDownC_def = vbMenuBar
Const StyleC_def = 0
Const StyleC_def2 = -1
Const StyleC_3D1 = 16577259
Const StyleC_3D2 = 8421504
Dim IfOn As Boolean
Dim onX As Long
Dim onY As Long
Dim sX As Long
Dim sY As Long
Dim LeftClick As Long
Dim m_IfDraw As Boolean
Dim DownUpTime As Long
Public ScreenX As Long
Public ScreenY As Long
Enum Kstyle
    LeftPic
    TopPic
End Enum
Dim m_style As Kstyle
Dim MouseOnC As Long
Dim MouseDownC As Long
Dim StyleC As Long
Dim StyleC2 As Long
Dim NowC As Long
Dim Style3D1 As Long
Dim Style3D2 As Long
Event Click()
Event MouseOn()
Event MouseOut()
Event MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
Event MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Type POINTAPI
    x As Long
    y As Long
End Type
Private Type color
    Red As Long
    Green As Long
    Blue As Long
End Type


Public Property Get IfDraw() As Boolean
    IfDraw = m_IfDraw
End Property

Public Property Let IfDraw(ByVal New_IfDraw As Boolean)
    m_IfDraw = New_IfDraw
    SetButton
    PropertyChanged "IfDraw"
End Property

'注意!不要删除或修改下列被注释的行!
'MappingInfo=UserControl,UserControl,-1,BackColor
Public Property Get BackColor() As OLE_COLOR
    BackColor = UserControl.BackColor
End Property

Public Property Let BackColor(ByVal New_BackColor As OLE_COLOR)
    NowC = New_BackColor
    UserControl.BackColor = New_BackColor
    im1.BackColor = New_BackColor
    SetButton
    PropertyChanged "BackColor"
End Property

Public Property Get Tag() As String
    Tag = img1.Tag
End Property

Public Property Let Tag(ByVal New_Tag As String)
    img1.Tag = New_Tag
    PropertyChanged "Tag"
End Property

Public Property Get ToolTip() As String
    ToolTip = img1.ToolTipText
End Property

Public Property Let ToolTip(ByVal New_ToolTip As String)
    img1.ToolTipText = New_ToolTip
    PropertyChanged "ToolTip"
End Property

'注意!不要删除或修改下列被注释的行!
'MappingInfo=UserControl,UserControl,-1,ForeColor
Public Property Get ForeColor() As OLE_COLOR
    ForeColor = UserControl.ForeColor
End Property

Public Property Let ForeColor(ByVal New_ForeColor As OLE_COLOR)
    UserControl.ForeColor() = New_ForeColor
    SetButton
    PropertyChanged "ForeColor"
End Property

Public Property Get MouseOnColor() As OLE_COLOR
    MouseOnColor = MouseOnC
End Property

Public Property Let MouseOnColor(ByVal New_ForeColor As OLE_COLOR)
    MouseOnC = New_ForeColor
    SetButton
    PropertyChanged "MouseOnColor"
End Property

Public Property Get MouseDownColor() As OLE_COLOR
    MouseDownColor = MouseDownC
End Property

Public Property Let MouseDownColor(ByVal New_ForeColor As OLE_COLOR)
    MouseDownC = New_ForeColor
    SetButton
    PropertyChanged "MouseDownColor"
End Property

Public Property Get Style3DColor1() As OLE_COLOR
    Style3DColor1 = Style3D1
End Property

Public Property Let Style3DColor1(ByVal New_ForeColor As OLE_COLOR)
    Style3D1 = New_ForeColor
    SetButton
    PropertyChanged "Style3DColor1"
End Property

Public Property Get Style3DColor2() As OLE_COLOR
    Style3DColor2 = Style3D2
End Property

Public Property Let Style3DColor2(ByVal New_ForeColor As OLE_COLOR)
    Style3D2 = New_ForeColor
    SetButton
    PropertyChanged "Style3DColor2"
End Property

Public Property Get StyleColor() As OLE_COLOR
    StyleColor = StyleC
End Property

Public Property Let StyleColor(ByVal New_ForeColor As OLE_COLOR)
    StyleC = New_ForeColor
    SetButton
    PropertyChanged "StyleColor"
End Property

Public Property Get StyleColor2() As Long
    StyleColor2 = StyleC2
End Property

Public Property Let StyleColor2(ByVal New_ForeColor As Long)
    StyleC2 = New_ForeColor
    SetButton
    PropertyChanged "StyleColor2"
End Property

'注意!不要删除或修改下列被注释的行!
'MappingInfo=im1,im1,-1,Picture
Public Property Get Picture() As Picture
    Set Picture = im1.Picture
End Property

Public Property Set Picture(ByVal New_Picture As Picture)
    Set im1.Picture = New_Picture
    SetButton
    PropertyChanged "Picture"
End Property

'注意!不要删除或修改下列被注释的行!
'MemberInfo=14,0,0,0
Public Property Get style() As Kstyle
    style = m_style
End Property

Public Property Let style(ByVal New_style As Kstyle)
    m_style = New_style
    SetButton
    PropertyChanged "style"
End Property

Private Sub img1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
    UserControl_MouseDown Button, Shift, x, y
End Sub

Private Sub img1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
    UserControl_MouseMove Button, Shift, x, y
End Sub

Private Sub img1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
    UserControl_MouseUp Button, Shift, x, y
End Sub

'为用户控件初始化属性
Private Sub UserControl_InitProperties()
    m_style = m_def_style
    MouseOnC = MouseOnC_def
    MouseDownC = MouseDownC_def

⌨️ 快捷键说明

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