📄 mainmenu.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form MainMenu
Caption = "USB卸载助手"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
Icon = "MainMenu.frx":0000
LinkTopic = "Form2"
ScaleHeight = 3195
ScaleWidth = 4680
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Begin MSComctlLib.ImageList IconList
Left = 120
Top = 240
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 11
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "MainMenu.frx":0A02
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "MainMenu.frx":0C4A
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "MainMenu.frx":0E92
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "MainMenu.frx":10CE
Key = ""
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "MainMenu.frx":130A
Key = ""
EndProperty
BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "MainMenu.frx":165E
Key = ""
EndProperty
BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "MainMenu.frx":19B2
Key = ""
EndProperty
BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "MainMenu.frx":1D06
Key = ""
EndProperty
BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "MainMenu.frx":205A
Key = ""
EndProperty
BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "MainMenu.frx":23AE
Key = ""
EndProperty
BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "MainMenu.frx":2702
Key = ""
EndProperty
EndProperty
End
Begin VB.Menu NewMenu
Caption = "Main"
Begin VB.Menu SwichShow
Caption = " 显示/隐藏界面 "
Shortcut = ^S
End
Begin VB.Menu m01
Caption = "-"
End
Begin VB.Menu MySite
Caption = " 我的网站"
Shortcut = ^W
End
Begin VB.Menu Update
Caption = " 软件升级"
Shortcut = ^U
End
Begin VB.Menu Contact
Caption = " 信息反馈"
Shortcut = ^R
End
Begin VB.Menu Option
Caption = " 程序设置"
Shortcut = ^O
End
Begin VB.Menu m02
Caption = "-"
End
Begin VB.Menu HelpMe
Caption = " 使用帮助"
Shortcut = ^H
End
Begin VB.Menu HideMenu
Caption = " 关闭菜单"
End
Begin VB.Menu ExitMe
Caption = " 退出程序"
Shortcut = ^X
End
End
End
Attribute VB_Name = "mainmenu"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim X, Y As Integer
Function Tary()
Dim i As Integer
Dim MenuhWnd As Long
Dim menuID As Long
MenuhWnd = GetMenu(Me.hwnd)
For i = 1 To 10
menuID = GetMenuItemID(GetSubMenu(MenuhWnd, 0), i - 1)
SetMenuItemBitmaps MenuhWnd, menuID, MF_bitmap, IconList.ListImages(i).Picture, IconList.ListImages(i).Picture
Next
nfIconData.hwnd = Me.hwnd
nfIconData.uID = Me.Icon
nfIconData.uFlags = NIF_ICON Or NIF_MESSAGE Or NIF_TIP
nfIconData.uCallbackMessage = WM_MOUSEMOVE
nfIconData.hIcon = Me.Icon.Handle
nfIconData.szTip = "USB卸载助手" & vbNullChar
nfIconData.cbSize = Len(nfIconData)
Call Shell_NotifyIcon(NIM_ADD, nfIconData)
End Function
Private Sub Form_Activate()
Tary
End Sub
Private Sub Form_Load()
If App.PrevInstance Then
Dim hwnd As Long
hwnd = FindWindow(vbNullString, "USB卸载助手")
If hwnd > 0 Then
MainForm.Show
hwnd = FindWindow(vbNullString, "太原十二中 苏洋")
SendMessage hwnd, WM_SYSCOMMAND, SC_RESTORE, 0
SetForegroundWindow hwnd
'卸载重复加载的窗口
Unload Me: End '节约一行还好看~
End If
End If
Tary
Me.Visible = False
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim lMsg As Single
lMsg = X / Screen.TwipsPerPixelX
If lMsg = WM_RBUTTONUP Or lMsg = WM_LBUTTONUP Then
NewMenu.Visible = True
Me.PopupMenu NewMenu
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
Cancel = 1
End
End Sub
'/** 菜单按钮 **/
'先设置成邮箱,回头整个php留言
Private Sub Contact_Click()
ShellExecute 0&, vbNullString, "mailto:" + "firendless@gmail.com", vbNullString, vbNullString, 0
End Sub
'关闭菜单
Private Sub HideMenu_Click()
Me.Visible = False
End Sub
'我的网站
Private Sub MySite_Click()
Dim web As String
web = "www.promiseforever.com"
ShellExecute 0&, vbNullString, web, vbNullString, vbNullString, 0
End Sub
'切换界面显示状态
Private Sub SwichShow_Click()
SwitchShow
End Sub
'显示帮助信息
Private Sub HelpMe_Click()
ShowAbout
End Sub
'关闭程序
Private Sub ExitMe_Click()
LetExitMe
End Sub
'程序设置
Private Sub Option_Click()
MainForm.Show
'MainForm.Btn6_Click
End Sub
'升级软件
Private Sub Update_Click()
UpdateMenu
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -