formshowfunction.bas

来自「卸载USB设备的软件」· BAS 代码 · 共 63 行

BAS
63
字号
Attribute VB_Name = "FormShowFunction"

'/* 显示&隐藏主窗体 */
Sub SwitchShow()
 MainForm.Visible = Not MainForm.Visible    '切换窗体显示
End Sub

'/* 隐藏主窗体 */
Public Sub HideMainForm()
 MainForm.Hide                              '隐藏主界面
End Sub

'/* 显示关于窗体 */
Public Sub ShowAbout()
MsgBox "dfhkdfhk"
End Sub

'/* 退出程序 */
Sub LetExitMe()

Dim intAns As Integer

intAns = MsgBox("您确定要关闭我么?", vbYesNo, "关闭程序")
 
    If intAns = vbYes Then
        Call HideMainForm
        Call Shell_NotifyIcon(NIM_DELETE, nfIconData)
    End
 End If
End Sub



Public Sub Update()
Dim StartDoc As Long
Dim hwnds As Long
hwnds = MainForm.hwnd
StartDoc = ShellExecute(hwnds, "open", App.Path & "\DOC.HTM", "", "C:\", SW_SHOWNORMAL)
If Dir(App.Path & "\DOC.HTM", vbNormal) = "" Then
MsgBox "软件帮助文件不存在,请访问网站进行查看。", vbInformation, "提示"
Btn5.Picture = LoadResPicture(103, 0)
GoToWeb
End If
End Sub

Public Sub UpdateMenu()
Dim StartDoc As Long
Dim hwnds As Long
hwnds = mainmenu.hwnd
StartDoc = ShellExecute(hwnds, "open", App.Path & "\DOC.HTM", "", "C:\", SW_SHOWNORMAL)
If Dir(App.Path & "\DOC.HTM", vbNormal) = "" Then
MsgBox "软件帮助文件不存在,请访问网站进行查看。", vbInformation, "提示"
Btn5.Picture = LoadResPicture(103, 0)
GoToWeb
End If
End Sub



Sub GoToWeb()
 ShellExecute hwnd, "open", "http://www.promiseforever.com", "", "", 1
End Sub

⌨️ 快捷键说明

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