menu.bas

来自「订餐的一个软件 ,美食档案 订餐点菜 销量查询 用于各级酒店餐饮部门的订餐点菜及」· BAS 代码 · 共 46 行

BAS
46
字号
Attribute VB_Name = "Menu"
Option Explicit
Public strHotelName As String
Public strTele As String
Public strExplain(4) As String
Private Declare Function GetWindowsDirectory _
Lib "kernel32" Alias "GetWindowsDirectoryA" _
(ByVal lpBuffer As String, ByVal nSize As Long) As Long
Public Function WinDir() As String
Dim S As String
Dim L As Long
Dim S1 As String
S = String(255, 0)
L = GetWindowsDirectory(S, 255)
S1 = Left(S, L)
If Right(S1, 1) <> "\" Then
  S1 = S1 & "\"
End If
WinDir = S1
End Function



Public Sub Main()
If App.PrevInstance = True Then
  MsgBox "《美食向导》已经运行!", vbInformation, "美食向导(V1.0)"
  Exit Sub
End If
frmStart.Show
frmStart.Refresh
frmStart.MousePointer = 11
frmMain.Show
Unload frmStart
End Sub



Public Function AppDir() As String
Dim strDir As String
strDir = App.Path
If Right(strDir, 1) <> "\" Then
  strDir = strDir & "\"
End If
AppDir = strDir
End Function

⌨️ 快捷键说明

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