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

📄 tabmenu.vca

📁 vfp巅峰制作(仿office2007),精典源码作品,不容错过
💻 VCA
📖 第 1 页 / 共 5 页
字号:
[OBJNAME] cmdMenuItem
[PARENT] cntmenuitem
[START PROPERTIES]
Top = 5
Left = 3
Height = 20
Width = 84
Caption = ""
Style = 1
Name = "cmdMenuItem"
[END PROPERTIES]
[START METHODS]
PROCEDURE Click
RAISEEVENT(this.Parent,"Click")
ENDPROC
PROCEDURE GotFocus
this.Parent.Hottrackon()
ENDPROC
PROCEDURE LostFocus
this.Parent.Hottrackoff()
ENDPROC
PROCEDURE MouseEnter
LPARAMETERS nButton, nShift, nXCoord, nYCoord

this.Parent.Hottrackon()
ENDPROC
PROCEDURE MouseLeave
LPARAMETERS nButton, nShift, nXCoord, nYCoord

this.Parent.Hottrackoff()
ENDPROC
[END METHODS]

[ RECORD]
[PLATFORM] WINDOWS 
[UNIQUEID] _20E0VDFER
[CLASS] image
[BASECLASS] image
[OBJNAME] imgHotKey
[PARENT] cntmenuitem
[START PROPERTIES]
Picture = images\hotkeys.png
BackStyle = 0
Height = 15
Left = 60
Top = 13
Visible = .F.
Width = 16
Name = "imgHotKey"
[END PROPERTIES]

[ RECORD]
[PLATFORM] WINDOWS 
[UNIQUEID] _20E0VDFES
[CLASS] label
[BASECLASS] label
[OBJNAME] lblHotKey
[PARENT] cntmenuitem
[START PROPERTIES]
FontName = "Segoe UI"
Alignment = 2
BackStyle = 0
Caption = ( "?")
Height = 17
Left = 61
Top = 13
Visible = .F.
Width = 16
Name = "lblHotKey"
[END PROPERTIES]
[START METHODS]
PROCEDURE Click
this.Parent.Parent.lShowHotKeys = .f.
ENDPROC
[END METHODS]

[ RECORD]
[PLATFORM] COMMENT 
[UNIQUEID] RESERVED  
[OBJNAME] cntmenuitem
[START PROPERTIES]
Arial, 0, 9, 5, 15, 12, 32, 3, 0[END PROPERTIES]

[ RECORD]
[PLATFORM] WINDOWS 
[UNIQUEID] _1ZX1ERJNJ
[CLASS] toolbar
[BASECLASS] toolbar
[OBJNAME] tbrtabmenu
[START PROPERTIES]
Caption = "Tab Menu Bar"
Height = 148
Left = 0
Top = 0
Width = 400
BackColor = 221,234,251
ShowWindow = 1
Name = "tbrtabmenu"
[END PROPERTIES]
[START RESERVED1]
Class[END RESERVED1]
[START RESERVED2]
2[END RESERVED2]
[START RESERVED6]
Pixels[END RESERVED6]

[ RECORD]
[PLATFORM] WINDOWS 
[UNIQUEID] _1ZX1ESEI6
[CLASS] cnttabmenu
[CLASSLOC] tabmenu.vcx
[BASECLASS] container
[OBJNAME] cntTabMenu
[PARENT] tbrtabmenu
[START PROPERTIES]
Top = 3
Left = 5
Name = "cntTabMenu"
imgTitleBar.Name = "imgTitleBar"
imgTabStrip.Name = "imgTabStrip"
imgBotStrip.Name = "imgBotStrip"
shpPopup.Name = "shpPopup"
pgfPopups.ErasePage = .T.
pgfPopups.Top = 24
pgfPopups.Height = 169
pgfPopups.Name = "pgfPopups"
cnthelpitem.imgLeft.Height = 21
cnthelpitem.imgLeft.Width = 3
cnthelpitem.imgLeft.Name = "imgLeft"
cnthelpitem.imgRight.Height = 21
cnthelpitem.imgRight.Width = 3
cnthelpitem.imgRight.Name = "imgRight"
cnthelpitem.imgBack.Name = "imgBack"
cnthelpitem.imgHelp.Height = 16
cnthelpitem.imgHelp.Width = 16
cnthelpitem.imgHelp.Name = "imgHelp"
cnthelpitem.Name = "cnthelpitem"
lblCaption.Name = "lblCaption"
cntquickbar.imgLeft.Height = 24
cntquickbar.imgLeft.Width = 18
cntquickbar.imgLeft.Name = "imgLeft"
cntquickbar.imgRight.Height = 24
cntquickbar.imgRight.Width = 15
cntquickbar.imgRight.Name = "imgRight"
cntquickbar.Name = "cntquickbar"
cntcontrol.imgControl.Height = 18
cntcontrol.imgControl.Width = 95
cntcontrol.imgControl.Name = "imgControl"
cntcontrol.cmdMinimize.Name = "cmdMinimize"
cntcontrol.cmdMaximize.Name = "cmdMaximize"
cntcontrol.cmdClose.Name = "cmdClose"
cntcontrol.Name = "cntcontrol"
cntMainItem.imgMainItem.Height = 38
cntMainItem.imgMainItem.Width = 38
cntMainItem.imgMainItem.Name = "imgMainItem"
cntMainItem.cmdStartItem.Name = "cmdStartItem"
cntMainItem.imgHotKey.Height = 15
cntMainItem.imgHotKey.Width = 16
cntMainItem.imgHotKey.Name = "imgHotKey"
cntMainItem.lblHotKey.Name = "lblHotKey"
cntMainItem.Name = "cntMainItem"
cntsearchbox.imgBack.Name = "imgBack"
cntsearchbox.txtSearch.Name = "txtSearch"
cntsearchbox.imgSearch.Height = 20
cntsearchbox.imgSearch.Width = 13
cntsearchbox.imgSearch.Name = "imgSearch"
cntsearchbox.imgLeft.Height = 21
cntsearchbox.imgLeft.Width = 3
cntsearchbox.imgLeft.Name = "imgLeft"
cntsearchbox.imgRight.Height = 21
cntsearchbox.imgRight.Width = 3
cntsearchbox.imgRight.Name = "imgRight"
cntsearchbox.Name = "cntsearchbox"
[END PROPERTIES]

[ RECORD]
[PLATFORM] COMMENT 
[UNIQUEID] RESERVED  
[OBJNAME] tbrtabmenu
[START PROPERTIES]
Arial, 0, 9, 5, 15, 12, 32, 3, 0Segoe UI, 0, 9, 6, 15, 12, 22, 3, 0[END PROPERTIES]

[ RECORD]
[PLATFORM] WINDOWS 
[UNIQUEID] _1ZY01P3XS
[CLASS] container
[BASECLASS] container
[OBJNAME] cntstartitem
[START PROPERTIES]
Width = 38
Height = 38
BackStyle = 0
BorderWidth = 0
chotkey = ( "F")
lshowhotkey = .F.
lselected = .F.
citemkey = ( "")
cbasefont = ( "")
Name = "cntstartitem"
[END PROPERTIES]
[START METHODS]
PROCEDURE Init
this.imgHotKey.Top = this.Height - this.imgHotKey.Height
this.imgHotkey.Left = this.Width - this.imgHotKey.Width
this.lblHotKey.Top = this.imgHotKey.Top
this.lblHotKey.Left = this.imgHotkey.Left
this.lblHotkey.Width = this.imghotkey.width
ENDPROC
PROCEDURE cbasefont_assign
*************************************************************************
*$METHOD$ cBaseFont_assign()
*$CREATED$ 09/03/2007
*************************************************************************
LPARAMETERS vcNewVal

THIS.cBaseFont = m.vcNewVal
this.lblHotKey.FontName = this.cBasefont

ENDPROC
PROCEDURE chotkey_assign
LPARAMETERS vcNewVal

THIS.chotkey = m.vcNewVal
this.lblHotKey.Caption = this.cHotkey

ENDPROC
PROCEDURE lselected_assign
LPARAMETERS vlNewVal
THIS.lSelected = m.vlNewVal

IF m.vlNewVal
  this.imgMainItem.Picture = "mainsel.png"
  this.Parent.lShowHotkeys = .f.
ELSE
  this.imgMainItem.Picture = "mainidle.png"
ENDIF

IF NOT this.lSelected
  IF VARTYPE(this.parent.ofrmStartMenu) = "O"
    this.parent.ofrmStartMenu.Release()
  ENDIF
ENDIF
ENDPROC
PROCEDURE lshowhotkey_assign
LPARAMETERS vlNewVal

THIS.lShowHotKey = m.vlNewVal AND this.Enabled

this.lblHotKey.Visible = this.lshowhotkey AND NOT EMPTY(this.chotkey)
this.imgHotKey.Visible = this.lshowhotkey AND NOT EMPTY(this.chotkey)

ENDPROC
PROCEDURE selectmain
LPARAMETERS vlShowHotKey

this.lSelected = .t.

this.Parent.SelectMainItem(vlShowHotKey)

ENDPROC
PROCEDURE tooltiptext_assign
**************************************************************************
*$METHOD$ ToolTipText_assign()
*$CREATED$ 13/02/2007
**************************************************************************
LPARAMETERS vcNewVal

THIS.TOOLTIPTEXT = m.vcNewVal
this.cmdStartItem.ToolTipText = m.vcNewVal

ENDPROC
[END METHODS]
[START RESERVED1]
Class[END RESERVED1]
[START RESERVED2]
5[END RESERVED2]
[START RESERVED3]
chotkey
lshowhotkey
lselected
citemkey
cbasefont
*lshowhotkey_assign 
*chotkey_assign 
*lselected_assign 
*selectmain 
*tooltiptext_assign 
*cbasefont_assign 
[END RESERVED3]
[START RESERVED6]
Pixels[END RESERVED6]

[ RECORD]
[PLATFORM] WINDOWS 
[UNIQUEID] _20E0NQQ1F
[CLASS] image
[BASECLASS] image
[OBJNAME] imgMainItem
[PARENT] cntstartitem
[START PROPERTIES]
Picture = images\mainidle.png
Height = 38
Left = 0
Top = 0
Width = 38
Name = "imgMainItem"
[END PROPERTIES]

[ RECORD]
[PLATFORM] WINDOWS 
[UNIQUEID] _1ZY0PTJ5L
[CLASS] commandbutton
[BASECLASS] commandbutton
[OBJNAME] cmdStartItem
[PARENT] cntstartitem
[START PROPERTIES]
Top = 0
Left = 0
Height = 38
Width = 38
Caption = ""
Style = 1
Name = "cmdStartItem"
[END PROPERTIES]
[START METHODS]
PROCEDURE Click
*************************************************************************
*$METHOD$ Click()
*$CREATED$ 01/02/2007
*************************************************************************
IF this.Parent.lselected
  this.Parent.lSelected = .f.
ELSE
  this.Parent.Selectmain()
ENDIF

ENDPROC
PROCEDURE MouseEnter
LPARAMETERS nButton, nShift, nXCoord, nYCoord

IF this.Parent.lSelected
  this.Parent.imgMainItem.Picture = 'mainsel.png'
ELSE
  this.Parent.imgMainItem.Picture = 'HOVMAIN.png'
ENDIF
ENDPROC
PROCEDURE MouseLeave
LPARAMETERS nButton, nShift, nXCoord, nYCoord

IF this.Parent.lSelected
  this.Parent.imgMainItem.Picture = 'mainsel.png'
ELSE
  this.Parent.imgMainItem.Picture = 'MAINidle.png'
ENDIF
ENDPROC
[END METHODS]

[ RECORD]
[PLATFORM] WINDOWS 
[UNIQUEID] _1ZY0ULTWG
[CLASS] image
[BASECLASS] image
[OBJNAME] imgHotKey
[PARENT] cntstartitem
[START PROPERTIES]
Picture = images\hotkeys.png
BackStyle = 0
Height = 15
Left = 21
Top = 22
Visible = .F.
Width = 16
Name = "imgHotKey"
[END PROPERTIES]

[ RECORD]
[PLATFORM] WINDOWS 
[UNIQUEID] RESERVED  
[CLASS] label
[BASECLASS] label
[OBJNAME] lblHotKey
[PARENT] cntstartitem
[START PROPERTIES]
FontName = "Segoe UI"
Alignment = 2
BackStyle = 0
Caption = "F"
Height = 17
Left = 22
Top = 21
Visible = .F.
Width = 16
Name = "lblHotKey"
[END PROPERTIES]
[START METHODS]
PROCEDURE Click
**************************************************************************
*$METHOD$ Click()
*$CREATED$ 13/02/2007
**************************************************************************
this.Parent.Parent.lShowHotKeys = .f.

ENDPROC
[END METHODS]

[ RECORD]
[PLATFORM] COMMENT 
[UNIQUEID] RESERVED  
[OBJNAME] cntstartitem
[START PROPERTIES]
Arial, 0, 9, 5, 15, 12, 32, 3, 0[END PROPERTIES]

[ RECORD]
[PLATFORM] WINDOWS 
[UNIQUEID] _1ZY0FQEXD
[CLASS] frmtabmenu
[CLASSLOC] tabmenu.vcx
[BASECLASS] form
[OBJNAME] frmstartmenu
[START PROPERTIES]
Height = 250
Width = 375
DoCreate = .T.
Caption = "Start Form"
ControlBox = .F.
Closable = .F.
MaxButton = .F.
MinButton = .F.
BackColor = 221,234,251
oactiveitem = ( .NULL.)
Name = "frmstartmenu"
cmdCancel.Top = 220
cmdCancel.Left = 190
cmdCancel.Name = "cmdCancel"
[END PROPERTIES]
[START METHODS]
PROCEDURE Init
***************************************************************************************
*$METHOD$ Init()
*$CREATED$ 20/02/2007
***************************************************************************************
LPARAMETERS voMenuItem, voTabMenu

IF DODEFAULT(voMenuItem, voTabMenu)
  *-- Position the start menu form differently because the default
  * behaviour is to position the popup form below the item that called it
  thisform.Top  = thisform.Top - INT(this.oMenuItem.Height / 2)
  thisform.Left = thisform.Left + INT(this.oMenuItem.Width / 2)

  thisform.cntMenuItems.cntRecentItems.Caption = "Recent Items"
ELSE
  RETURN .f.
ENDIF

ENDPROC
PROCEDURE Resize
*************************************************************************************************
*$METHOD$ Resize()
*$CREATED$ 23/02/2007
*************************************************************************************************
thisform.shpBackground.Top = 0
thisform.shpBackground.Left = 0
thisform.shpBackground.Width = thisform.Width - thisform.imgright.width
thisform.shpBackground.Height = thisform.Height - thisform.imgbottom.width - 1

thisform.shpLeft.Top = 0
thisform.shpLeft.Height = thisform.height
thisform.shpLeft.Width = thisform.imgright.width
thisform.shpLeft.Left = thisform.Width - thisform.shpLeft.Width

thisform.imgtr.Left = thisform.Width - thisform.imgtr.Width
thisform.imgtr.Top = 0

thisform.imgRight.Top = 0
thisform.imgRight.Height = thisform.Height
thisform.imgRight.Left = thisform.Width - thisform.imgRight.Width

thisform.shpBottom.Left = 0
thisform.shpBottom.Width = thisform.width
thisform.shpBottom.Height = thisform.imgbottom.height
thisform.shpBottom.Top = thisform.Height - thisform.shpBottom.Height

thisform.imgbottom.Left = 0
thisform.imgbottom.Width = thisform.Width
thisform.imgbottom.Top = thisform.Height - thisform.imgbottom.Height

thisform.imgbr.Left = thisform.Width - thisform.imgbr.Width
thisform.imgbr.Top = thisform.Height - thisform.imgbr.height

thisform.imgbl.Left = 0
thisform.imgbl.Top = thisform.Height - thisform.imgbl.height

thisform.cntMenuItems.Left = 10
thisform.cntMenuItems.Width = thisform.Width - (2 * thisform.cntMenuItems.Left) - thisform.imgRight.Width
thisform.cntMenuItems.Top = 10
thisform.cntMenuItems.Height = thisform.Height - (thisform.imgBottom.Height + 30 + thisform.cntMenuItems.Top) + 1

thisform.cntMenuItems.cntRecentItems.Width = INT(this.cntMenuItems.Width * 0.66)
thisform.cntMenuItems.cntRecentItems.Top = 0
thisform.cntMenuItems.cntRecentItems.Height = this.cntMenuItems.Height
thisform.cntMenuItems.cntRecentItems.Left = this.cntMenuItems.Width - thisform.cntMenuItems.cntRecentItems.Width

thisform.cntMenuItems.cntSubMenu.Width = thisform.cntMenuItems.cntRecentItems.Width - 6
thisform.cntMenuItems.cntSubMenu.Height = thisform.cntMenuItems.cntRecentItems.Height - 6
thisform.cntMenuItems.cntSubMenu.Top = 2
thisform.cntMenuItems.cntSubMenu.Left = thisform.cntMenuItems.cntRecentItems.Left + 2

thisform.cntMenuItems.shpShadow.Top = thisform.cntMenuItems.cntSubMenu.Top + 2

⌨️ 快捷键说明

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