Office中国论坛/Access中国论坛

标题: 子窗体的空白位置的默认灰色 [打印本页]

作者: ivy021    时间: 2008-11-20 20:58
标题: 子窗体的空白位置的默认灰色
请问,access 支持子窗体的空白位置的默认灰色设置为其它颜色吗?
作者: lirong    时间: 2008-11-23 11:30
设置数据表子窗体背景色

Private Declare Function GetSysColor Lib "user32" (ByVal nIndex As Long) As Long
Private Declare Function SetSysColors Lib "user32" (ByVal nChanges As Long, lpSysColor As Long, lpColorValues As Long) As Long
Private Const COLOR_APPWORKSPACE = 12
Dim L1 As Long   ' 保存原来背景

Private Sub Command2_Click()
  '设置为白色背景
  SetSysColors 1, COLOR_APPWORKSPACE, RGB(255, 255, 255) '16764057 '16777215
  'SetSysColors 1, COLOR_APPWORKSPACE, 16764057 '16777215
End Sub

Private Sub Command3_Click()
  '恢复原来背景
  SetSysColors 1, COLOR_APPWORKSPACE, L1
  'SetSysColors 1, COLOR_APPWORKSPACE, l1
End Sub

Private Sub Form_Load()
  '记录原来背景
  L1 = GetSysColor(COLOR_APPWORKSPACE)
End Sub

Private Sub Form_Unload(Cancel As Integer)
  '恢复原来背景
  Command3_Click
End Sub
作者: ivy021    时间: 2008-11-26 14:49
Private Declare Function GetSysColor Lib "user32" (ByVal nIndex As Long) As Long
Private Declare Function SetSysColors Lib "user32" (ByVal nChanges As Long, lpSysColor As Long, lpColorValues As Long) As Long
这些方法都要自己写的吧?[:41]
作者: Henry D. Sy    时间: 2008-11-26 14:59
这些都是api函数的声明部分




欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/) Powered by Discuz! X3.3