?? superimage.ctl
字號:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.UserControl SuperImage
ClientHeight = 1455
ClientLeft = 0
ClientTop = 0
ClientWidth = 750
ScaleHeight = 1455
ScaleWidth = 750
Begin VB.VScrollBar VS
Height = 975
Left = 480
Max = 34
Min = 1
TabIndex = 1
Top = 480
Value = 1
Width = 255
End
Begin VB.CommandButton Command1
Caption = "▲"
Height = 495
Left = 480
TabIndex = 0
Top = 0
Width = 255
End
Begin MSComctlLib.ImageList ImageList1
Left = 0
Top = 240
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 32
ImageHeight = 32
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 34
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SuperImage.ctx":0000
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SuperImage.ctx":0490
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SuperImage.ctx":0908
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SuperImage.ctx":0D88
Key = ""
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SuperImage.ctx":122C
Key = ""
EndProperty
BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SuperImage.ctx":16D0
Key = ""
EndProperty
BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SuperImage.ctx":1B54
Key = ""
EndProperty
BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SuperImage.ctx":2004
Key = ""
EndProperty
BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SuperImage.ctx":2498
Key = ""
EndProperty
BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SuperImage.ctx":293C
Key = ""
EndProperty
BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SuperImage.ctx":2DF8
Key = ""
EndProperty
BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SuperImage.ctx":3254
Key = ""
EndProperty
BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SuperImage.ctx":36CC
Key = ""
EndProperty
BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SuperImage.ctx":3B88
Key = ""
EndProperty
BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SuperImage.ctx":4008
Key = ""
EndProperty
BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SuperImage.ctx":442C
Key = ""
EndProperty
BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SuperImage.ctx":48A4
Key = ""
EndProperty
BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SuperImage.ctx":4CCC
Key = ""
EndProperty
BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SuperImage.ctx":5170
Key = ""
EndProperty
BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SuperImage.ctx":5618
Key = ""
EndProperty
BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SuperImage.ctx":5AA4
Key = ""
EndProperty
BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SuperImage.ctx":5F1C
Key = ""
EndProperty
BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SuperImage.ctx":63D8
Key = ""
EndProperty
BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SuperImage.ctx":6828
Key = ""
EndProperty
BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SuperImage.ctx":6C6C
Key = ""
EndProperty
BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SuperImage.ctx":70F8
Key = ""
EndProperty
BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SuperImage.ctx":7540
Key = ""
EndProperty
BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SuperImage.ctx":79C4
Key = ""
EndProperty
BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SuperImage.ctx":7E3C
Key = ""
EndProperty
BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SuperImage.ctx":82C8
Key = ""
EndProperty
BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SuperImage.ctx":876C
Key = ""
EndProperty
BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SuperImage.ctx":8B98
Key = ""
EndProperty
BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SuperImage.ctx":9028
Key = ""
EndProperty
BeginProperty ListImage34 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SuperImage.ctx":9504
Key = ""
EndProperty
EndProperty
End
Begin VB.Image Image2
Height = 495
Left = 0
Top = 960
Width = 495
End
Begin VB.Image Image1
Height = 495
Left = 0
Top = 480
Width = 495
End
Begin VB.Image Ij
Height = 480
Left = 0
Picture = "SuperImage.ctx":995C
Top = 0
Width = 480
End
End
Attribute VB_Name = "SuperImage"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Dim NowID As Long
Public NowValue As Long
Private e As Boolean '用來判斷控件的大小
'缺省屬性值:
Const m_def_ForeColor = 0
Const m_def_Enabled = 0
'屬性變量:
Dim m_ForeColor As Long
Dim m_Enabled As Boolean
Dim m_Font As Font
'事件聲明:
Event Click(Cancel As Boolean)
Attribute Click.VB_Description = "當控件把焦點移交到引起有效性驗證的控件時發生。"
'Event Click() 'MappingInfo=Image1,Image1,-1,Click
Event DblClick()
Event EndChoose(index As Long)
Event KeyDown(KeyCode As Integer, Shift As Integer)
Attribute KeyDown.VB_Description = "當用戶在擁有焦點的對象上按下任意鍵時發生。"
Event KeyPress(KeyAscii As Integer)
Attribute KeyPress.VB_Description = "當用戶按下和釋放 ANSI 鍵時發生。"
Event KeyUp(KeyCode As Integer, Shift As Integer)
Attribute KeyUp.VB_Description = "當用戶在擁有焦點的對象上釋放鍵時發生。"
Event MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Attribute MouseDown.VB_Description = "當用戶在擁有焦點的對象上按下鼠標按鈕時發生。"
Event MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Attribute MouseMove.VB_Description = "當用戶移動鼠標時發生。"
Event MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Attribute MouseUp.VB_Description = "當用戶在擁有焦點的對象上釋放鼠標發生。"
'注意!不要刪除或修改下列被注釋的行!
'MemberInfo=8,0,0,0
Public Property Get ForeColor() As Long
Attribute ForeColor.VB_Description = "返回/設置對象中文本和圖形的前景色。"
ForeColor = m_ForeColor
End Property
Public Property Let ForeColor(ByVal New_ForeColor As Long)
m_ForeColor = New_ForeColor
PropertyChanged "ForeColor"
End Property
'注意!不要刪除或修改下列被注釋的行!
'MemberInfo=0,0,0,0
Public Property Get Enabled() As Boolean
Attribute Enabled.VB_Description = "返回/設置一個值,決定一個對象是否響應用戶生成事件。"
Enabled = m_Enabled
End Property
Public Property Let Enabled(ByVal New_Enabled As Boolean)
m_Enabled = New_Enabled
PropertyChanged "Enabled"
End Property
'注意!不要刪除或修改下列被注釋的行!
'MemberInfo=6,0,0,0
Public Property Get Font() As Font
Attribute Font.VB_Description = "返回一個 Font 對象。"
Attribute Font.VB_UserMemId = -512
Set Font = m_Font
End Property
Public Property Set Font(ByVal New_Font As Font)
Set m_Font = New_Font
PropertyChanged "Font"
End Property
Private Sub Command1_Click()
If e = False Then
UserControl.Height = Command1.Height + VS.Height
If VS.Value = 34 Then
Image1.Picture = ImageList1.ListImages(33).Picture
Image2.Picture = ImageList1.ListImages(34).Picture
NowID = 33
Else
Image1.Picture = ImageList1.ListImages(VS.Value).Picture
Image2.Picture = ImageList1.ListImages(VS.Value + 1).Picture
NowID = VS.Value
End If
e = True
ElseIf e = True Then
UserControl.Height = UserControl.Height - VS.Height
e = False
End If
End Sub
Private Sub Image1_Click()
Ij.Picture = Image1.Picture '把選定的圖片給Ij
UserControl.Height = UserControl.Height - VS.Height '使控件回到原來的大小
e = False
RaiseEvent EndChoose(NowID)
NowValue = NowID
'RaiseEvent Click
End Sub
Private Sub Image2_Click()
Ij.Picture = Image2.Picture '把選定的圖片給Ij
UserControl.Height = UserControl.Height - VS.Height '使控件回到原來的大小
e = False
RaiseEvent EndChoose(NowID + 1)
NowValue = NowID + 1
End Sub
'為用戶控件初始化屬性
Private Sub UserControl_InitProperties()
Dim i As Integer
e = False
m_ForeColor = m_def_ForeColor
m_Enabled = m_def_Enabled
Set m_Font = Ambient.Font
' For i = 1 To 2
' Load Ij(i)
' Ij(i).Visible = True
' Ij(i).Top = Ij(i - 1)
' Next i
'Ij(0).Picture = ImageList1.ListImages(1).Picture
'Ij(1).Picture = ImageList1.ListImages(2).Picture
UserControl.Width = Ij.Width + Command1.Width
UserControl.Height = Command1.Height
Ij.Picture = ImageList1.ListImages(1).Picture
'Image1.Picture = ImageList1.ListImages(1).Picture
'Image2.Picture = ImageList1.ListImages(2).Picture
End Sub
'從存貯器中加載屬性值
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
m_ForeColor = PropBag.ReadProperty("ForeColor", m_def_ForeColor)
m_Enabled = PropBag.ReadProperty("Enabled", m_def_Enabled)
Set m_Font = PropBag.ReadProperty("Font", Ambient.Font)
End Sub
Private Sub UserControl_Resize()
'UserControl.Width = Ij.Width + Command1.Width
'UserControl.Height = Command1.Height
End Sub
'將屬性值寫到存儲器
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
Call PropBag.WriteProperty("ForeColor", m_ForeColor, m_def_ForeColor)
Call PropBag.WriteProperty("Enabled", m_Enabled, m_def_Enabled)
Call PropBag.WriteProperty("Font", m_Font, Ambient.Font)
End Sub
Private Sub VS_Change()
If VS.Value = 34 Then
Image1.Picture = ImageList1.ListImages(33).Picture
Image2.Picture = ImageList1.ListImages(34).Picture
NowID = 33
Else
Image1.Picture = ImageList1.ListImages(VS.Value).Picture
Image2.Picture = ImageList1.ListImages(VS.Value + 1).Picture
NowID = VS.Value
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -