📄 form2.frm
字号:
VERSION 5.00
Begin VB.Form FrmStartMenu
BackColor = &H00FFC0FF&
BorderStyle = 0 'None
Caption = "Form2"
ClientHeight = 9090
ClientLeft = 0
ClientTop = 0
ClientWidth = 8955
LinkTopic = "Form2"
ScaleHeight = 9090
ScaleWidth = 8955
ShowInTaskbar = 0 'False
StartUpPosition = 3 '窗口缺省
Begin Project1.MenuButton Button
Height = 375
Index = 0
Left = 15
TabIndex = 0
Top = 225
Width = 2910
_ExtentX = 5133
_ExtentY = 661
Hold_Caption = ""
End
End
Attribute VB_Name = "FrmStartMenu"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'****************************************************************************
'人人为我,我为人人
'枕善居汉化收藏整理
'发布日期:2006/11/10
'描 述:仿红帽子操作系统Shell
'网 站:http://www.Mndsoft.com/ (VB6源码博客)
'网 站:http://www.VbDnet.com/ (VB.NET源码博客,主要基于.NET2005)
'e-mail :Mndsoft@163.com
'e-mail :Mndsoft@126.com
'OICQ :88382850
' 如果您有新的好的代码别忘记给枕善居哦!
'****************************************************************************
Public xForm As Form
Dim CurrentOver As Integer
Dim LastOver As Integer
Public ButtonOver As Boolean
Private Sub Button_MouseOver(Index As Integer)
If Index = CurrentOver Then Exit Sub
LastOver = CurrentOver
CurrentOver = Index
If xForm.hwnd = frmMenu.hwnd Then Exit Sub
'卸载 xForm
FrmStartMenu.Button(LastOver).LoadGUI
xForm.Visible = False
If Button(Index).Arrow = False Then Exit Sub
ButtonOver = True
Select Case Index
Case 4
Set xForm = SubMenu_Internet
Case Else
Set xForm = SubMenu_Unkown
End Select
'xForm.Show
xForm.Top = Me.Top + Button(Index).Top - (2 * Screen.TwipsPerPixelY)
xForm.Left = Me.Left + Me.Width - 75
xForm.ShowForm
xForm.ZOrder 0
xForm.ButtonIndex = Index
SetWindowPos xForm.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_SHOWWINDOW Or SWP_NOMOVE Or SWP_NOSIZE
'Set xForm = Nothing
End Sub
Private Sub Button_MouseUp(Index As Integer)
xForm.ZOrder 0
Select Case Index
Case 17
Form1.UnloadAll
End Select
End Sub
Private Sub Form_Load()
ButtonOver = False
Set xForm = New frmMenu
Dim x, y
For x = 0 To 17
If x = 0 Then
Button(x).CapTop = True
Button(x).CapBottom = True
Button(x).Top = 0
Button(x).Caption = "欢迎光临枕善居"
Else
Load Button(x)
If x = 17 Then
Button(x).CapBottom = True
Button(x).CapTop = False
ElseIf x = 15 Then
Button(x).CapBottom = True
Button(x).CapTop = True
Else
Button(x).CapBottom = False
Button(x).CapTop = False
End If
If x < 11 Then
Button(x).Arrow = True
End If
Button(x).Top = Button(x - 1).Top + Button(x - 1).Height
Button(x).Visible = True
Select Case x
Case 1
Button(x).Caption = "附件"
Case 2
Button(x).Caption = "游戏"
Case 3
Button(x).Caption = "图形"
Case 4
Button(x).Caption = "互联网"
Case 5
Button(x).Caption = "办公软件"
Case 6
Button(x).Caption = "参数选择"
Case 7
Button(x).Caption = "程序(&P)"
Case 8
Button(x).Caption = "声音 && 视频"
Case 9
Button(x).Caption = "系统设置"
Case 10
Button(x).Caption = "系统工具"
Case 11
Button(x).Caption = "控制中心"
Case 12
Button(x).Caption = "查找文件"
Case 13
Button(x).Caption = "帮助"
Case 14
Button(x).Caption = "主页"
Case 15
Button(x).Caption = "运行..."
Case 16
Button(x).Caption = "系统锁定"
Case 17
Button(x).Caption = "注销 'Mndosft'"
End Select
End If
Button(x).Left = 0
Button(x).SubClassMe
Button(x).Icon = 18 - x
Next
Me.Width = Button(0).Width
Me.Height = Button(17).Top + Button(17).Height
End Sub
Private Sub Form_LostFocus()
Me.Visible = False
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
UnloadAll
End Sub
Function UnloadAll()
Dim x
For x = 0 To 17
Button(x).UnSubClassMe
Next
End Function
Function MeTop()
SetWindowPos Me.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_SHOWWINDOW Or SWP_NOMOVE Or SWP_NOSIZE
'SetActiveWindow Me.hwnd
End Function
Function ShowForm()
TransForm Me.hwnd, 0
Me.Show
Dim i As Long
For i = 0 To 255 Step 5
TransForm Me.hwnd, CByte(i)
DoEvents
Next
TransForm Me.hwnd, 255
End Function
Function HideForm()
'ButtonOver = False
xForm.Visible = False
DoEvents
Dim i As Long
For i = 255 To 0 Step -5
TransForm Me.hwnd, CByte(i)
DoEvents
Next
TransForm Me.hwnd, 0
Me.Hide
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -