📄 modmain.bas
字号:
Attribute VB_Name = "ModMain"
Public Conn As New ADODB.Connection
'Public Rst As New ADODB.Recordset
Public User As String
Public Sub EButton(Idx As String)
Idx = Left(Idx & "000", 3)
With MDIFrm
.CommLogin.Enabled = Mid(Idx, 1, 1)
.CommAdd.Enabled = Mid(Idx, 2, 1)
.CommQuery.Enabled = Mid(Idx, 3, 1)
End With
End Sub
Public Sub GetFrm(Frm As Form, ByVal sKey As String, ByVal Left As Integer, ByVal Top As Integer, ByVal Width As Integer, ByVal Height As Integer)
With Frm
.Left = GetSetting("Operation", sKey, "Left", Left)
.Top = GetSetting("Operation", sKey, "Top", Top)
.Width = GetSetting("Operation", sKey, "Width", Width)
.Height = GetSetting("Operation", sKey, "Height", Height)
End With
End Sub
Public Sub SaveFrm(Frm As Form, ByVal sKey As String)
With Frm
If .WindowState <> 1 Then
SaveSetting "Operation", sKey, "Left", .Left
SaveSetting "Operation", sKey, "Top", .Top
SaveSetting "Operation", sKey, "Width", .Width
SaveSetting "Operation", sKey, "Height", .Height
End If
End With
End Sub
Public Function FormatDT(ByVal sDate As String) As String
FormatDT = Year(sDate) & "-" & Right("0" & Month(sDate), 2) & "-" & Right("0" & Day(sDate), 2)
End Function
Public Function ClearStr(ByVal sString As String) As String
ClearStr = Replace(sString, "'", "")
ClearStr = Replace(sString, vbCr, "")
ClearStr = Replace(sString, vbLf, "")
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -