modmain.bas
来自「业务管理系统。方便业务员跟踪记录客户信息。」· BAS 代码 · 共 57 行
BAS
57 行
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 + =
减小字号Ctrl + -
显示快捷键?