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

📄 form1.frm

📁 一个仿office2007的工具条代码
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   BackColor       =   &H00C0C0C0&
   BorderStyle     =   0  'None
   Caption         =   "我的程序 Ver 2007 - file.doc"
   ClientHeight    =   7950
   ClientLeft      =   -45
   ClientTop       =   -405
   ClientWidth     =   10155
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   7950
   ScaleWidth      =   10155
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin Project1.ACPRibbon ACPRibbon1 
      Height          =   2130
      Left            =   0
      TabIndex        =   3
      Top             =   0
      Width           =   10155
      _ExtentX        =   17912
      _ExtentY        =   3757
   End
   Begin VB.Label Label5 
      Caption         =   "Insert image component with all images do you want to use, and insert codes to create buttons no FORM_LOAD, as in this example."
      Height          =   495
      Left            =   480
      TabIndex        =   5
      Top             =   3000
      Visible         =   0   'False
      Width           =   9135
   End
   Begin VB.Label Label4 
      Caption         =   $"Form1.frx":0000
      Height          =   495
      Left            =   480
      TabIndex        =   4
      Top             =   2400
      Visible         =   0   'False
      Width           =   9135
   End
   Begin VB.Image Image10 
      Height          =   375
      Left            =   5760
      Picture         =   "Form1.frx":00A4
      Top             =   3960
      Visible         =   0   'False
      Width           =   465
   End
   Begin VB.Image Image9 
      Height          =   390
      Left            =   5280
      Picture         =   "Form1.frx":062F
      Top             =   3960
      Visible         =   0   'False
      Width           =   390
   End
   Begin VB.Label Label3 
      Caption         =   "These images is for Buttons on each categories"
      Height          =   255
      Left            =   5040
      TabIndex        =   2
      Top             =   5160
      Visible         =   0   'False
      Width           =   3735
   End
   Begin VB.Line Line9 
      Visible         =   0   'False
      X1              =   5400
      X2              =   5160
      Y1              =   4560
      Y2              =   4440
   End
   Begin VB.Line Line8 
      Visible         =   0   'False
      X1              =   4920
      X2              =   5160
      Y1              =   4560
      Y2              =   4440
   End
   Begin VB.Line Line7 
      Visible         =   0   'False
      X1              =   5160
      X2              =   5160
      Y1              =   5160
      Y2              =   4440
   End
   Begin VB.Label Label2 
      Caption         =   "These images is for TopButtons"
      Height          =   255
      Left            =   2040
      TabIndex        =   1
      Top             =   6360
      Visible         =   0   'False
      Width           =   2535
   End
   Begin VB.Line Line6 
      Visible         =   0   'False
      X1              =   2520
      X2              =   2280
      Y1              =   4440
      Y2              =   4320
   End
   Begin VB.Line Line5 
      Visible         =   0   'False
      X1              =   2040
      X2              =   2280
      Y1              =   4440
      Y2              =   4320
   End
   Begin VB.Line Line4 
      Visible         =   0   'False
      X1              =   2280
      X2              =   2280
      Y1              =   6360
      Y2              =   4320
   End
   Begin VB.Line Line3 
      Visible         =   0   'False
      X1              =   600
      X2              =   360
      Y1              =   4560
      Y2              =   4440
   End
   Begin VB.Line Line2 
      Visible         =   0   'False
      X1              =   120
      X2              =   360
      Y1              =   4560
      Y2              =   4440
   End
   Begin VB.Line Line1 
      Visible         =   0   'False
      X1              =   360
      X2              =   360
      Y1              =   7440
      Y2              =   4440
   End
   Begin VB.Label Label1 
      Caption         =   "This image is for Menu Button"
      Height          =   255
      Left            =   240
      TabIndex        =   0
      Top             =   7440
      Visible         =   0   'False
      Width           =   2535
   End
   Begin VB.Image Image8 
      Height          =   435
      Left            =   4800
      Picture         =   "Form1.frx":0BD2
      Top             =   3960
      Visible         =   0   'False
      Width           =   420
   End
   Begin VB.Image Image7 
      Height          =   450
      Left            =   4320
      Picture         =   "Form1.frx":1188
      Top             =   3960
      Visible         =   0   'False
      Width           =   450
   End
   Begin VB.Image Image6 
      Height          =   375
      Left            =   3840
      Picture         =   "Form1.frx":179C
      Top             =   3960
      Visible         =   0   'False
      Width           =   435
   End
   Begin VB.Image Image5 
      Height          =   210
      Left            =   2520
      Picture         =   "Form1.frx":1D41
      Top             =   3960
      Visible         =   0   'False
      Width           =   210
   End
   Begin VB.Image Image4 
      Height          =   210
      Left            =   2280
      Picture         =   "Form1.frx":1FA1
      Top             =   3960
      Visible         =   0   'False
      Width           =   225
   End
   Begin VB.Image Image3 
      Height          =   210
      Left            =   2040
      Picture         =   "Form1.frx":21FF
      Top             =   3960
      Visible         =   0   'False
      Width           =   240
   End
   Begin VB.Image Image2 
      Height          =   210
      Left            =   1800
      Picture         =   "Form1.frx":25F8
      Top             =   3960
      Visible         =   0   'False
      Width           =   165
   End
   Begin VB.Image Image1 
      Height          =   345
      Left            =   240
      Picture         =   "Form1.frx":273F
      Top             =   4080
      Visible         =   0   'False
      Width           =   360
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'****************************************************************************
' :) 人人为我,我为人人 :)
'枕善居汉化收藏整理
'发布日期:2006/10/07
'描    述:Office 2007 Ribbon风格控件
'网    站:http://www.mndsoft.com/
'e-mail  :mndsoft@163.com   最新的邮箱,如果您有新的好的代码别忘记给枕善居哦
'OICQ    :88382850
'****************************************************************************

'#######################################
'#                                     #
'#           ACP Ribbon 2007           #
'#                  by                 #
'#      adrianopaladini@gmail.com      #
'#                                     #
'#                                     #
'#  Visual from Office 2007 Beta 2 TR  #
'#                                     #
'#   Please Don磘 Remove Author Info!  #
'#                                     #
'#######################################


'------------------------------------------------
' TO DO:
'
' A) Insert Mini Buttons on Each Categories (Estimate to 10/6/2006)
' B) Insert Combos on Each Categories  (Estimate to 10/6/2006)
' C) Insert Checkbox on Each Categories  (Estimate to 10/6/2006)
' D) Option to Show Menu Under the Ribbon  (Estimate to 10/7/2006)
' E) Option to hide Ribbon  (Estimate to 10/7/2006)
' F) Option to user customize the menu  (Estimate to 10/9/2006)
' G) Make Menu  (Estimate to 10/10/2006)
' H) Group Tabs  (Estimate to 10/10/2006)
' I) Optimize Code  (Estimate to 10/12/2006)
' J) Option to switch to Blue and Silver themes  (Estimate to 10/16/2006)
' K) FINISHED this project!
'
'------------------------------------------------

'------------------------------------------------
' Bugs:
'
' Please report to:
'
'         adrianopaladini@gmail.com
'
'------------------------------------------------



Private Sub Form_Load()

'# Set Circle Menu Button Picture
Set ACPRibbon1.Picture = Image1.Picture

'# Show Caption of Form
ACPRibbon1.Caption = Me.Caption

'# Show Button to Customize Menu
ACPRibbon1.ShowCustomMenu = True

'# Add TopButtons ---   ID - Capt. - Icons
ACPRibbon1.AddTopButton "1", "新建", Image2.Picture
ACPRibbon1.AddTopButton "2", "打开", Image3.Picture
ACPRibbon1.AddTopButton "3", "打印", Image4.Picture
ACPRibbon1.AddTopButton "3", "保存", Image5.Picture

'# Add Tabs ---   ID - Caption
ACPRibbon1.AddTab "1", "选项卡 1"
ACPRibbon1.AddTab "2", "选项卡 2"
ACPRibbon1.AddTab "3", "选项卡示例"
ACPRibbon1.AddTab "4", "新建选项卡"
ACPRibbon1.AddTab "5", "枕善居"

'# Add Cats ---   ID - Tab - Caption - ShowDialogButton
ACPRibbon1.AddCat "1", "1", "集合 1", False
ACPRibbon1.AddCat "2", "1", "单个大集合", True
ACPRibbon1.AddCat "3", "1", "测试", True
ACPRibbon1.AddCat "4", "2", "更多单一集合", True
ACPRibbon1.AddCat "5", "2", "Hi!", False
ACPRibbon1.AddCat "6", "3", "枕善居!", False

'# Add Button ---    ID - Cat - Capt. - Icons -   More Arrow   - ToolTip
ACPRibbon1.AddButton "1", "1", "制表", Image6.Picture, False, "插入新表格"
ACPRibbon1.AddButton "2", "1", "插入图片", Image7.Picture
ACPRibbon1.AddButton "3", "2", "图表", Image8.Picture
ACPRibbon1.AddButton "4", "2", "曲线", Image8.Picture, True
ACPRibbon1.AddButton "5", "3", "剪切夹", Image9.Picture
ACPRibbon1.AddButton "6", "4", "快速绘画", Image10.Picture

'# Repaint Ribbon
ACPRibbon1.Refresh

End Sub

Private Sub ACPRibbon1_MainMenuClick()

'# This Event occurs on click in Main Button Menu
MsgBox "Main Menu Click"

End Sub

Private Sub ACPRibbon1_CustomClick()

'# This Event occurs on click in Custom Button Menu
MsgBox "Custom Click"

End Sub

Private Sub ACPRibbon1_MenuClick(ByVal ID As String, ByVal Caption As String)

'# This Event occurs when click on each Menu Button
MsgBox "MenuClick: " & ID & "--" & Caption

End Sub

Private Sub ACPRibbon1_CatClick(ByVal ID As String, ByVal Caption As String)

'# This Event occurs when click on each ShowDialogButton for each Categorie
MsgBox "ShowDialogClick: " & ID & "--" & Caption

End Sub

Private Sub ACPRibbon1_ButtonClick(ByVal ID As String, ByVal Caption As String)

'# This Event occurs when click on each Button
MsgBox "ButtonClick: " & ID & "--" & Caption

End Sub

⌨️ 快捷键说明

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