Form1.frm
上传用户:lcmqgg
上传日期:2022-03-10
资源大小:3k
文件大小:12k
- VERSION 5.00
- Begin VB.Form Form1
- BorderStyle = 1 'Fixed Single
- Caption = "自定义平面TAB选项板"
- ClientHeight = 3645
- ClientLeft = 45
- ClientTop = 420
- ClientWidth = 5490
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 3645
- ScaleWidth = 5490
- StartUpPosition = 2 '屏幕中心
- Begin VB.PictureBox Picture1
- AutoRedraw = -1 'True
- BackColor = &H001AA8F4&
- BorderStyle = 0 'None
- Height = 80
- Left = 1560
- ScaleHeight = 75
- ScaleWidth = 1035
- TabIndex = 10
- Top = 3000
- Width = 1035
- Begin VB.Line Line1
- BorderColor = &H00C00000&
- Index = 1
- X1 = 0
- X2 = 0
- Y1 = 960
- Y2 = -240
- End
- Begin VB.Line Line1
- BorderColor = &H00C00000&
- Index = 0
- X1 = 1025
- X2 = 1025
- Y1 = 1080
- Y2 = -120
- End
- End
- Begin VB.PictureBox Picture2
- Appearance = 0 'Flat
- AutoRedraw = -1 'True
- BackColor = &H001AA8F4&
- BorderStyle = 0 'None
- ForeColor = &H80000008&
- Height = 2055
- Index = 3
- Left = 140
- ScaleHeight = 2055
- ScaleWidth = 5205
- TabIndex = 3
- Top = 440
- Width = 5205
- End
- Begin VB.PictureBox Picture2
- Appearance = 0 'Flat
- AutoRedraw = -1 'True
- BackColor = &H001AA8F4&
- BorderStyle = 0 'None
- ForeColor = &H80000008&
- Height = 2055
- Index = 2
- Left = 140
- ScaleHeight = 2055
- ScaleWidth = 5205
- TabIndex = 2
- Top = 440
- Width = 5205
- End
- Begin VB.PictureBox Picture2
- Appearance = 0 'Flat
- AutoRedraw = -1 'True
- BackColor = &H001AA8F4&
- BorderStyle = 0 'None
- ForeColor = &H80000008&
- Height = 2055
- Index = 1
- Left = 140
- ScaleHeight = 2055
- ScaleWidth = 5205
- TabIndex = 1
- Top = 440
- Width = 5205
- End
- Begin VB.PictureBox Picture2
- Appearance = 0 'Flat
- AutoRedraw = -1 'True
- BackColor = &H001AA8F4&
- BorderStyle = 0 'None
- ForeColor = &H80000008&
- Height = 2055
- Index = 0
- Left = 140
- ScaleHeight = 2055
- ScaleWidth = 5205
- TabIndex = 0
- Top = 440
- Width = 5205
- End
- Begin VB.PictureBox Picture2
- Appearance = 0 'Flat
- AutoRedraw = -1 'True
- BackColor = &H001AA8F4&
- BorderStyle = 0 'None
- ForeColor = &H80000008&
- Height = 2055
- Index = 4
- Left = 140
- ScaleHeight = 2055
- ScaleWidth = 5205
- TabIndex = 4
- Top = 440
- Width = 5205
- End
- Begin VB.Shape Shape4
- BorderColor = &H00C00000&
- Height = 135
- Left = 600
- Top = 3000
- Width = 375
- End
- Begin VB.Shape Shape2
- BorderColor = &H00C00000&
- Height = 375
- Left = 1080
- Top = 3000
- Width = 375
- End
- Begin VB.Shape Shape1
- BorderColor = &H001AA8F4&
- Height = 135
- Left = 120
- Top = 3240
- Width = 855
- End
- Begin VB.Shape Shape3
- BorderColor = &H00FF8080&
- Height = 255
- Index = 1
- Left = 3840
- Top = 3120
- Width = 615
- End
- Begin VB.Shape Shape3
- BorderColor = &H00FF8080&
- Height = 255
- Index = 4
- Left = 4200
- Top = 3000
- Width = 615
- End
- Begin VB.Shape Shape3
- BorderColor = &H00FF8080&
- Height = 255
- Index = 3
- Left = 3480
- Top = 3000
- Width = 615
- End
- Begin VB.Shape Shape3
- BorderColor = &H00FF8080&
- Height = 255
- Index = 2
- Left = 3120
- Top = 3120
- Width = 615
- End
- Begin VB.Shape Shape3
- BorderColor = &H00FF8080&
- Height = 255
- Index = 0
- Left = 2760
- Top = 3000
- Width = 615
- End
- Begin VB.Label Label1
- Alignment = 2 'Center
- Appearance = 0 'Flat
- BackColor = &H80000004&
- Caption = "Tab 3"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00C00000&
- Height = 285
- Index = 2
- Left = 2220
- TabIndex = 7
- Top = 120
- Width = 1035
- End
- Begin VB.Label Label1
- Alignment = 2 'Center
- Appearance = 0 'Flat
- BackColor = &H80000004&
- Caption = "Tab 4"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00C00000&
- Height = 285
- Index = 3
- Left = 3270
- TabIndex = 8
- Top = 120
- Width = 1035
- End
- Begin VB.Label Label1
- Alignment = 2 'Center
- Appearance = 0 'Flat
- BackColor = &H80000004&
- Caption = "Tab 5"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00C00000&
- Height = 285
- Index = 4
- Left = 4320
- TabIndex = 9
- Top = 120
- Width = 1035
- End
- Begin VB.Label Label1
- Alignment = 2 'Center
- Appearance = 0 'Flat
- BackColor = &H80000004&
- Caption = "Tab 2"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00C00000&
- Height = 285
- Index = 1
- Left = 1175
- TabIndex = 6
- Top = 120
- Width = 1035
- End
- Begin VB.Label Label1
- Alignment = 2 'Center
- Appearance = 0 'Flat
- BackColor = &H80000004&
- Caption = "Tab 1"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00C00000&
- Height = 285
- Index = 0
- Left = 120
- TabIndex = 5
- Top = 120
- Width = 1035
- End
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '****************************************************************************
- '人人为我,我为人人
- '枕善居收藏整理
- '发布日期:05/04/10
- '描 述:一个很酷的TAB选项板源码示例
- '网 站:http://www.mndsoft.com/blog/
- 'e-mail:mnd@mndsoft.com
- 'OICQ : 88382850
- '****************************************************************************
- Option Explicit
- Dim curSelI As Integer '当前选择的
- Dim i As Integer '索引
- Private Sub Form_Load()
-
- '初始化
- Label1_Click 0
-
- End Sub
- Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
-
- For i = 0 To Label1.UBound
- Shape1.Visible = False
- Label1(i).ForeColor = vbHighlight
- Label1(curSelI).ForeColor = vbWhite
- Next
-
- End Sub
- Private Sub Form_Resize()
- '缩放
- Me.Height = 3110
- Shape2.Move Picture2(0).Left - 20, Picture2(0).Top - 20, _
- Picture2(0).ScaleWidth + 30, Picture2(0).ScaleHeight + 30
- Shape1.Move Label1(0).Left, Label1(0).Top _
- , Label1(0).Width, Label1(0).Height
- For i = 0 To Label1.UBound
- Shape3(i).Move Label1(i).Left, Label1(i).Top _
- , Label1(i).Width, Label1(i).Height
- Next
-
- End Sub
- Private Sub Label1_Click(Index As Integer)
- For i = 0 To Label1.UBound
- curSelI = Label1(Index).Index
-
- If i = Index Then
- Label1(i).FontBold = True
- Label1(i).ForeColor = vbWhite
- Label1(curSelI).BackColor = &H1AA8F4
- Shape4.Move Label1(curSelI).Left, Label1(curSelI).Top _
- , Label1(curSelI).Width, Label1(curSelI).Height
- Picture1.Move Label1(i).Left, Label1(i).Top + Label1(i).Height - 20
- Picture2(i).ZOrder
- '--- 演示 ---------------------------------
- Picture2(i).CurrentX = 650
- Picture2(i).CurrentY = 800
- Picture2(i).FontSize = 16
- Picture2(i).ForeColor = vbWhite
- Picture2(i).FontBold = True
- Picture2(i).Print "当前选择的是: " & i + 1 _
- '---------------------------------------------------
- Else
- Label1(i).FontBold = False
- Label1(i).BackColor = vbWhite
- End If
- Next
-
- End Sub
- Private Sub Label1_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
-
- For i = 0 To Label1.UBound
- If i = Index Then
- Shape1.Visible = True
- Shape1.Move Label1(i).Left, Label1(i).Top _
- , Label1(i).Width, Label1(i).Height
- Label1(i).ForeColor = &H1AA8F4
- Label1(curSelI).BackColor = &H1AA8F4
- Label1(curSelI).ForeColor = vbWhite
- '--- 演示 -------------------------
- If i = curSelI Then
- Label1(i).ToolTipText = "当前选择的是: " & i + 1
- Else
- Label1(i).ToolTipText = "鼠标移过 " & i + 1
- End If
- '------------------------------------------
- Else
- Label1(i).ForeColor = vbHighlight
- Label1(curSelI).BackColor = &H1AA8F4
- Label1(curSelI).ForeColor = vbWhite
- End If
- Next
-
- End Sub