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

📄 mfrmmain.frm

📁 xpTabs 控件,界面漂亮
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         Height          =   375
         Left            =   180
         TabIndex        =   20
         Top             =   2880
         Width           =   1035
      End
      Begin VB.ListBox List1 
         BeginProperty Font 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   1230
         Left            =   120
         TabIndex        =   19
         Top             =   1320
         Width           =   1515
      End
      Begin VB.TextBox Text2 
         BeginProperty Font 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   315
         Left            =   180
         TabIndex        =   18
         Text            =   "vbAccelerator.com"
         Top             =   660
         Width           =   1515
      End
      Begin VB.TextBox Text1 
         BeginProperty Font 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   315
         Left            =   180
         TabIndex        =   17
         Text            =   "Pinnable Tabs"
         Top             =   60
         Width           =   1455
      End
   End
   Begin VB.PictureBox picTab 
      Align           =   1  'Align Top
      BorderStyle     =   0  'None
      Height          =   975
      Index           =   3
      Left            =   0
      ScaleHeight     =   975
      ScaleWidth      =   10965
      TabIndex        =   12
      Top             =   4980
      Visible         =   0   'False
      Width           =   10965
      Begin VB.ComboBox Combo6 
         BeginProperty Font 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   315
         Left            =   60
         TabIndex        =   15
         Text            =   "Pinnable Tabs"
         Top             =   240
         Width           =   1575
      End
      Begin VB.ComboBox Combo5 
         BeginProperty Font 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   315
         Left            =   60
         TabIndex        =   14
         Text            =   "vbAccelerator.com"
         Top             =   780
         Width           =   1575
      End
      Begin VB.ComboBox Combo4 
         BeginProperty Font 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   315
         Left            =   60
         TabIndex        =   13
         Text            =   "VB Code"
         Top             =   1320
         Width           =   1575
      End
   End
   Begin VB.PictureBox picTab 
      Align           =   1  'Align Top
      BorderStyle     =   0  'None
      BeginProperty Font 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1755
      Index           =   2
      Left            =   0
      ScaleHeight     =   1755
      ScaleWidth      =   10965
      TabIndex        =   7
      Top             =   3225
      Visible         =   0   'False
      Width           =   10965
      Begin vbalDTab6X.vbalDTabControlX TabLeft 
         Height          =   795
         Left            =   2475
         TabIndex        =   28
         Top             =   435
         Width           =   1005
         _ExtentX        =   1773
         _ExtentY        =   1402
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         BeginProperty SelectedFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
      End
      Begin VB.TextBox Text4 
         BeginProperty Font 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   315
         Left            =   180
         TabIndex        =   11
         Text            =   "Pinnable Tabs"
         Top             =   60
         Width           =   1455
      End
      Begin VB.TextBox Text3 
         BeginProperty Font 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   315
         Left            =   180
         TabIndex        =   10
         Text            =   "vbAccelerator.com"
         Top             =   660
         Width           =   1515
      End
      Begin VB.ListBox List2 
         BeginProperty Font 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   1230
         Left            =   120
         TabIndex        =   9
         Top             =   1320
         Width           =   1515
      End
      Begin VB.CommandButton Command2 
         Caption         =   "&Search"
         BeginProperty Font 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   180
         TabIndex        =   8
         Top             =   2880
         Width           =   1035
      End
   End
   Begin VB.Menu mnuFileTOP 
      Caption         =   "&File"
      Begin VB.Menu mnuFile 
         Caption         =   "&New..."
         Index           =   0
         Shortcut        =   ^N
      End
      Begin VB.Menu mnuFile 
         Caption         =   "-"
         Index           =   1
      End
      Begin VB.Menu mnuFile 
         Caption         =   "E&xit"
         Index           =   2
      End
   End
End
Attribute VB_Name = "mfrmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private m_lID As Long
Private Sub cboStyle_Click()
On Error Resume Next

    Me.TabLeft.DrawStyle = Me.cboStyle.ListIndex
    Me.tabRight.DrawStyle = Me.cboStyle.ListIndex
    
        Dim frm As Form
        For Each frm In Forms
            frm.TabLeft.DrawStyle = Me.cboStyle.ListIndex
        Next
            
On Error GoTo 0
End Sub
Private Sub newDocument()
   m_lID = m_lID + 1
   Dim fD As New frmDocument
   fD.Caption = "Document " & m_lID
   fD.Show
End Sub

Private Sub cmdTestFont_Click()
Dim sF As New StdFont
   sF.Name = TabLeft.Font.Name
   If (TabLeft.Font.Size < 24) Then
      sF.Size = 24
      TabLeft.Font = sF
      sF.Bold = True
      TabLeft.SelectedFont = sF
   Else
      TabLeft.Font.Size = 8
      sF.Size = 8
      TabLeft.Font = sF
      sF.Bold = True
      TabLeft.SelectedFont = sF
   End If
End Sub

Private Sub MDIForm_Load()
   
   TabLeft.Pinned = False
   TabLeft.ImageList = ilsIcons
   Dim tabX As cTab
   Set tabX = TabLeft.Tabs.Add("EXPLORER", , "Solution Explorer", 0)
   tabX.Panel = picTab(0)
   tabX.ToolTipText = "Explore objects in your solution"
   Set tabX = TabLeft.Tabs.Add("CLASSVIEW", , "Class View", 1)
   Set tabX.Panel = picTab(1)
   tabX.ToolTipText = "Manage Classes in your project"
   tabX.Selected = True
   
   tabRight.Pinned = False
   tabRight.ImageList = ilsIcons
   Set tabX = tabRight.Tabs.Add("EXPLORER", , "Contents", 0)
   tabX.Panel = picTab(2)
   Set tabX = tabRight.Tabs.Add("CLASSVIEW", , "Search", 1)
   Set tabX.Panel = picTab(3)
   
   newDocument
   Me.cboStyle.ListIndex = 0
   
   
   
End Sub

Private Sub MDIForm_Terminate()
   If Forms.Count = 0 Then
      UnloadApp
   End If
End Sub

Private Sub mnuFile_Click(Index As Integer)
   Select Case Index
   Case 0
      newDocument
   Case 2
      Unload Me
   End Select
End Sub

Private Sub picTab_Resize(Index As Integer)
   On Error Resume Next ' may be too small
   Select Case Index
   Case 0
      Combo1.Move 2 * Screen.TwipsPerPixelX, Combo1.Top, picTab(0).ScaleWidth - 4 * Screen.TwipsPerPixelX
      Combo2.Move Combo1.Left, Combo2.Top, Combo1.Width
      Combo3.Move Combo1.Left, Combo3.Top, Combo1.Width
      lstResults.Move Combo1.Left, lstResults.Top, Combo1.Width, picTab(0).ScaleHeight - lstResults.Top - 2 * Screen.TwipsPerPixelY
      Dim i As Long
      For i = 0 To 3
         lblInfo(i).Move Combo1.Left, lblInfo(i).Top, Combo1.Width
      Next i
   Case 1
      Text1.Move 2 * Screen.TwipsPerPixelX, Text1.Top, picTab(1).ScaleWidth - 4 * Screen.TwipsPerPixelX
      Text2.Move Text1.Left, Text2.Top, Text1.Width
      List1.Move Text1.Left, List1.Top, Text1.Width
      Command1.Left = (picTab(1).ScaleWidth - Command1.Width) \ 2
   Case 2
      Text3.Move 2 * Screen.TwipsPerPixelX, Text3.Top, picTab(2).ScaleWidth - 4 * Screen.TwipsPerPixelX
      Text4.Move Text3.Left, Text4.Top, Text3.Width
      List2.Move Text3.Left, List2.Top, Text3.Width
      Command2.Left = (picTab(2).ScaleWidth - Command2.Width) \ 2
   Case 3
      Combo4.Move 2 * Screen.TwipsPerPixelX, Combo4.Top, picTab(3).ScaleWidth - 4 * Screen.TwipsPerPixelX
      Combo5.Move Combo4.Left, Combo5.Top, Combo4.Width
      Combo6.Move Combo4.Left, Combo6.Top, Combo4.Width
   End Select
End Sub

⌨️ 快捷键说明

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