📄 clsdispaly.cls
字号:
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
Persistable = 0 'NotPersistable
DataBindingBehavior = 0 'vbNone
DataSourceBehavior = 0 'vbNone
MTSTransactionMode = 0 'NotAnMTSObject
END
Attribute VB_Name = "clsDispalyIni"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
'显示相关信息
Private Type dispalyIni
productColor As Long '产品显示背景色
productSpaceColor As Long '产品显示背景间隔色
itemColor As Long '详细数据背景色
itemSpaceColor As Long '详细数据背景间隔色
otherColor As Long '其它显示背景色
pagination As Boolean '是否分页
pageCount As Integer '分页数目
classXP As Boolean 'XP风格
End Type
Private userDispalyIni As dispalyIni
'产品显示背景色
Public Function GetProductColor() As Long
GetProductColor = userDispalyIni.productColor
End Function
Public Sub SetProductColor(curValue As Long)
userDispalyIni.productColor = curValue
End Sub
'产品显示背景间隔色
Public Function GetProductSpaceColor() As Long
GetProductSpaceColor = userDispalyIni.productSpaceColor
End Function
Public Sub SetProductSpaceColor(curValue As Long)
userDispalyIni.productSpaceColor = curValue
End Sub
'详细数据背景色
Public Function GetItemColor() As Long
GetItemColor = userDispalyIni.itemColor
End Function
Public Sub SetItemColor(curValue As Long)
userDispalyIni.itemColor = curValue
End Sub
'详细数据背景间隔色
Public Function GetItemSpaceColor() As Long
GetItemSpaceColor = userDispalyIni.itemSpaceColor
End Function
Public Sub SetItemSpaceColor(curValue As Long)
userDispalyIni.itemSpaceColor = curValue
End Sub
'其它显示背景色
Public Function GetOtherColor() As Long
GetOtherColor = userDispalyIni.otherColor
End Function
Public Sub SetOtherColor(curValue As Long)
userDispalyIni.otherColor = curValue
End Sub
'是否分页
Public Function GetPagination() As Boolean
GetPagination = userDispalyIni.pagination
End Function
Public Sub SetPagination(curValue As Boolean)
userDispalyIni.pagination = curValue
End Sub
'分页数
Public Function GetPageCount() As Integer
GetPageCount = userDispalyIni.pageCount
End Function
Public Sub SetPageCount(curValue As Integer)
userDispalyIni.pageCount = curValue
End Sub
Public Sub Init()
Dim strSql As String
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
On Error GoTo errHandle
With rs
.LockType = adLockOptimistic
.CursorLocation = adUseClient
.CursorType = adOpenDynamic
Set .ActiveConnection = cn
End With
strSql = "select * from tSystemIndividuality where Operation='默认' or Operation=" & objDatabase.FormatSQL(userInf.userName) & " order by ID desc"
rs.Open strSql
If Not rs.EOF Then
objDispalyIni.SetProductColor NullValue(rs.Fields!productColor)
objDispalyIni.SetProductSpaceColor NullValue(rs.Fields!productSpaceColor)
objDispalyIni.SetItemColor NullValue(rs.Fields!itemColor)
objDispalyIni.SetItemSpaceColor NullValue(rs.Fields!itemSpaceColor)
objDispalyIni.SetOtherColor NullValue(rs.Fields!otherColor)
'objDispalyIni.SetPagination False
End If
rs.Close
Set rs = Nothing
Exit Sub
errHandle:
Set rs = Nothing
objDatabase.DatabaseError
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -