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

📄 lcommandbutton.ctl

📁 VB远程操作Sql Server 2000数据库的工具 主要功能就是远程(局域网)操作Sql Server数据库。 包括: 搜索并列举局域网内的所有Sql Server服务器 搜索并列举Sql
💻 CTL
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Begin VB.UserControl LCommandButton 
   BackColor       =   &H00E0E0E0&
   ClientHeight    =   2295
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   4350
   ScaleHeight     =   2295
   ScaleWidth      =   4350
   Begin VB.Shape Shape1 
      BorderColor     =   &H80000001&
      BorderStyle     =   3  'Dot
      Height          =   495
      Left            =   960
      Shape           =   4  'Rounded Rectangle
      Top             =   600
      Visible         =   0   'False
      Width           =   2415
   End
   Begin VB.Line Line1 
      BorderColor     =   &H00808080&
      Index           =   2
      X1              =   840
      X2              =   3495
      Y1              =   1200
      Y2              =   1200
   End
   Begin VB.Line Line1 
      BorderColor     =   &H00FFFFFF&
      Index           =   1
      X1              =   840
      X2              =   840
      Y1              =   480
      Y2              =   1215
   End
   Begin VB.Line Line1 
      BorderColor     =   &H00808080&
      Index           =   3
      X1              =   3480
      X2              =   3480
      Y1              =   480
      Y2              =   1200
   End
   Begin VB.Line Line1 
      BorderColor     =   &H00FFFFFF&
      Index           =   0
      X1              =   840
      X2              =   3495
      Y1              =   480
      Y2              =   480
   End
   Begin VB.Image Image1 
      Appearance      =   0  'Flat
      Height          =   735
      Left            =   840
      Top             =   480
      Width           =   2655
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "Cption"
      Height          =   180
      Left            =   1950
      TabIndex        =   0
      Top             =   720
      Width           =   555
   End
   Begin VB.Image Image2 
      Height          =   735
      Left            =   840
      Top             =   480
      Width           =   2655
   End
   Begin VB.Label Label2 
      Height          =   735
      Left            =   840
      TabIndex        =   1
      Top             =   480
      Width           =   2655
   End
End
Attribute VB_Name = "LCommandButton"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False


Dim LTop As Integer
Dim Lleft As Integer
Dim Bcolor

'事件声明:
Event Change() 'MappingInfo=Label1,Label1,-1,Change
Attribute Change.VB_Description = "当控件内容改变时发生。"
Event Click() 'MappingInfo=Image1,Image1,-1,Click
Attribute Click.VB_Description = "当用户在一个对象上按下并释放鼠标按钮时发生。"
Event DblClick() 'MappingInfo=Image1,Image1,-1,DblClick
Attribute DblClick.VB_Description = "当用户在一个对象上按下并释放鼠标按钮后再次按下并释放鼠标按钮时发生。"
Event Hide() 'MappingInfo=UserControl,UserControl,-1,Hide
Attribute Hide.VB_Description = "当控件的 Visible 属性变为 False 时发生。"
Event KeyDown(KeyCode As Integer, Shift As Integer) 'MappingInfo=UserControl,UserControl,-1,KeyDown
Attribute KeyDown.VB_Description = "当用户在拥有焦点的对象上按下任意键时发生。"
Event KeyPress(KeyAscii As Integer) 'MappingInfo=UserControl,UserControl,-1,KeyPress
Attribute KeyPress.VB_Description = "当用户按下和释放 ANSI 键时发生。"
Event KeyUp(KeyCode As Integer, Shift As Integer) 'MappingInfo=UserControl,UserControl,-1,KeyUp
Attribute KeyUp.VB_Description = "当用户在拥有焦点的对象上释放键时发生。"
Event MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) 'MappingInfo=Image1,Image1,-1,MouseDown
Attribute MouseDown.VB_Description = "当用户在拥有焦点的对象上按下鼠标按钮时发生。"
Event MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) 'MappingInfo=Image1,Image1,-1,MouseMove
Attribute MouseMove.VB_Description = "当用户移动鼠标时发生。"
Event MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) 'MappingInfo=Image1,Image1,-1,MouseUp
Attribute MouseUp.VB_Description = "当用户在拥有焦点的对象上释放鼠标发生。"
Event Resize() 'MappingInfo=UserControl,UserControl,-1,Resize
Attribute Resize.VB_Description = "当第一次显示一个窗体时或改变一个对象的大小时发生。"

Private Sub Image1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    RaiseEvent MouseDown(Button, Shift, X, Y)
    Line1(0).BorderColor = &H80000003
    Line1(1).BorderColor = &H80000003
    Line1(2).BorderColor = &HFFFFFF
    Line1(3).BorderColor = &HFFFFFF
    Label1.Top = LTop + 20
    'Label1.Left = Lleft + 20
End Sub

Private Sub Image1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
    RaiseEvent MouseUp(Button, Shift, X, Y)
    Line1(0).BorderColor = &HFFFFFF
    Line1(1).BorderColor = &HFFFFFF
    Line1(2).BorderColor = &H80000003
    Line1(3).BorderColor = &H80000003
    Label1.Top = LTop
    'Label1.Left = Lleft
End Sub

Private Sub UserControl_GotFocus()
    Label2.BackColor = &HE0E0E0
  'Shape1.Visible = True

  'Dim r, g, b As Integer
  '        r = (Label1.ForeColor Mod 256)
  '        b = (Int(Label1.ForeColor / 65536))
  '        g = ((Label1.ForeColor - (b * 65536) - r) / 256)
  '        r = 255 - r
  '        g = 255 - g
  '        b = 255 - g
  '        Label1.ForeColor = RGB(r, g, b)
End Sub

Private Sub UserControl_LostFocus()
   Label2.BackColor = Bcolor
  'Shape1.Visible = False
'  Line1(0).BorderColor = vbBlack
'  Line1(1).BorderColor = vbBlack
End Sub

Private Sub UserControl_Resize()
  RaiseEvent Resize
  Image1.Left = 0
  Image1.Top = 0
  Image1.Width = UserControl.Width
  Image1.Height = UserControl.Height
  
  Line1(0).X1 = Image1.Left
  Line1(0).X2 = Image1.Width + Image1.Left
  Line1(0).Y1 = Image1.Top
  Line1(0).Y2 = Image1.Top

  Line1(1).X1 = Image1.Left
  Line1(1).X2 = Image1.Left
  Line1(1).Y1 = Image1.Top
  Line1(1).Y2 = Image1.Height

  Line1(2).X1 = Image1.Left
  Line1(2).X2 = Image1.Width + Image1.Left
  Line1(2).Y1 = Image1.Height + Image1.Top - 20
  Line1(2).Y2 = Image1.Height + Image1.Top - 20

  Line1(3).X1 = Image1.Width + Image1.Left - 20
  Line1(3).X2 = Image1.Width + Image1.Left - 20
  Line1(3).Y1 = Image1.Top
  Line1(3).Y2 = Image1.Height + Image1.Top

  Label1.Width = Image1.Width - 100
  
  Label1.Left = Image1.Left + (Image1.Width - Label1.Width) / 2
  Label1.Top = Image1.Top + (Image1.Height - Label1.Height) / 2
  
  Label2.Width = Image1.Width
  Label2.Height = Image1.Height
  Label2.Left = Image1.Left
  Label2.Top = Image1.Top
  
  
  Shape1.Width = Image1.Width - 80
  Shape1.Height = Image1.Height - 80
  Shape1.Left = Image1.Left + 40
  Shape1.Top = Image1.Top + 40
  
  LTop = Label1.Top
  Lleft = Label1.Left
  
End Sub

'注意!不要删除或修改下列被注释的行!
'MappingInfo=UserControl,UserControl,-1,AutoRedraw
Public Property Get AutoRedraw() As Boolean
Attribute AutoRedraw.VB_Description = "返回/设置从 graphics 方法到一个持久性位图的输出。"
    AutoRedraw = UserControl.AutoRedraw
End Property

Public Property Let AutoRedraw(ByVal New_AutoRedraw As Boolean)
    UserControl.AutoRedraw() = New_AutoRedraw
    PropertyChanged "AutoRedraw"
End Property
'

'注意!不要删除或修改下列被注释的行!
'MappingInfo=Label1,Label1,-1,Caption
Public Property Get Caption() As String
Attribute Caption.VB_Description = "返回/设置对象的标题栏中或图标下面的文本。"
    Caption = Label1.Caption
End Property

Public Property Let Caption(ByVal New_Caption As String)
    Label1.Caption() = New_Caption
    PropertyChanged "Caption"
End Property

Private Sub Label1_Change()
    RaiseEvent Change
End Sub

Private Sub Image1_Click()
    RaiseEvent Click
End Sub

'注意!不要删除或修改下列被注释的行!
'MappingInfo=UserControl,UserControl,-1,Enabled
Public Property Get Enabled() As Boolean
Attribute Enabled.VB_Description = "返回/设置一个值,决定一个对象是否响应用户生成事件。"
    Enabled = UserControl.Enabled
   ' Label1.Enabled = UserControl.Enabled
End Property

Public Property Let Enabled(ByVal New_Enabled As Boolean)
    UserControl.Enabled() = New_Enabled
    PropertyChanged "Enabled"
    Label1.Enabled = UserControl.Enabled
End Property

Private Sub Image1_DblClick()
    RaiseEvent DblClick
End Sub

'注意!不要删除或修改下列被注释的行!
'MappingInfo=Label1,Label1,-1,Font
Public Property Get Font() As Font
Attribute Font.VB_Description = "返回一个 Font 对象。"
Attribute Font.VB_UserMemId = -512
    Set Font = Label1.Font
End Property

Public Property Set Font(ByVal New_Font As Font)
    Set Label1.Font = New_Font
    PropertyChanged "Font"
End Property

'注意!不要删除或修改下列被注释的行!
'MappingInfo=Label1,Label1,-1,FontBold
Public Property Get FontBold() As Boolean
Attribute FontBold.VB_Description = "返回/设置粗体字样式。"
    FontBold = Label1.FontBold
End Property

Public Property Let FontBold(ByVal New_FontBold As Boolean)
    Label1.FontBold() = New_FontBold
    PropertyChanged "FontBold"
End Property

'注意!不要删除或修改下列被注释的行!
'MappingInfo=Label1,Label1,-1,FontItalic
Public Property Get FontItalic() As Boolean
Attribute FontItalic.VB_Description = "返回/设置斜体字样式。"
    FontItalic = Label1.FontItalic
End Property

Public Property Let FontItalic(ByVal New_FontItalic As Boolean)
    Label1.FontItalic() = New_FontItalic
    PropertyChanged "FontItalic"
End Property

'注意!不要删除或修改下列被注释的行!
'MappingInfo=Label1,Label1,-1,FontSize
Public Property Get FontSize() As Single
Attribute FontSize.VB_Description = "指定给定层的每一行出现的字体大小(以磅为单位)。"
    FontSize = Label1.FontSize
End Property

Public Property Let FontSize(ByVal New_FontSize As Single)
    Label1.FontSize() = New_FontSize
    PropertyChanged "FontSize"
End Property

'注意!不要删除或修改下列被注释的行!
'MappingInfo=Label1,Label1,-1,FontStrikethru
Public Property Get FontStrikethru() As Boolean
Attribute FontStrikethru.VB_Description = "返回/设置删除线字体样式。"
    FontStrikethru = Label1.FontStrikethru
End Property

Public Property Let FontStrikethru(ByVal New_FontStrikethru As Boolean)
    Label1.FontStrikethru() = New_FontStrikethru
    PropertyChanged "FontStrikethru"
End Property


'注意!不要删除或修改下列被注释的行!
'MappingInfo=Label1,Label1,-1,FontUnderline
Public Property Get FontUnderline() As Boolean
Attribute FontUnderline.VB_Description = "返回/设置下划线字体样式。"
    FontUnderline = Label1.FontUnderline
End Property

Public Property Let FontUnderline(ByVal New_FontUnderline As Boolean)
    Label1.FontUnderline() = New_FontUnderline
    PropertyChanged "FontUnderline"
End Property

'注意!不要删除或修改下列被注释的行!
'MappingInfo=Label1,Label1,-1,ForeColor
Public Property Get ForeColor() As OLE_COLOR
Attribute ForeColor.VB_Description = "返回/设置对象中文本和图形的前景色。"
    ForeColor = Label1.ForeColor
End Property

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

Private Sub UserControl_Hide()
    RaiseEvent Hide
End Sub

'注意!不要删除或修改下列被注释的行!
'MappingInfo=UserControl,UserControl,-1,hWnd
Public Property Get hwnd() As Long
Attribute hwnd.VB_Description = "返回一个句柄到(from Microsoft Windows)一个对象的窗口。"
    hwnd = UserControl.hwnd
End Property

Private Sub UserControl_KeyDown(KeyCode As Integer, Shift As Integer)
    RaiseEvent KeyDown(KeyCode, Shift)
End Sub

Private Sub UserControl_KeyPress(KeyAscii As Integer)
    RaiseEvent KeyPress(KeyAscii)
End Sub

Private Sub UserControl_KeyUp(KeyCode As Integer, Shift As Integer)
    RaiseEvent KeyUp(KeyCode, Shift)
End Sub

'注意!不要删除或修改下列被注释的行!
'MappingInfo=Image1,Image1,-1,MouseIcon
Public Property Get MouseIcon() As Picture
Attribute MouseIcon.VB_Description = "设置一个自定义鼠标图标。"
    Set MouseIcon = Image1.MouseIcon
End Property

Public Property Set MouseIcon(ByVal New_MouseIcon As Picture)
    Set Image1.MouseIcon = New_MouseIcon

⌨️ 快捷键说明

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