On 2002-09-20 07:17, elgringo56 wrote:
Ivan, what is the code to do this with? Does it require a good deal of time to run? If not, could one not change the color, then when the message box is responded to, change it back?
On 2002-09-20 06:40, Ivan F Moala wrote:
Yes you can change this via code...only problem is ALL your objects of this type will be changed to this colour. The settings applies to All Windows objects.
If you run this code you will see what I mean by changing object colours;
<pre/>
Option Explicit
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_BTNFACE = 15
Sub ChangeDefaultColorBtn()
Dim Kolor
Dim CurKolor
'===============================================
'// Black 0 0 0 || Blue 0 0 255
'// Green 0 255 0 || Cyan 0 255 255
'// Red 255 0 0 || Magenta 255 0 255
'// Yellow 255 255 0 || White 255 255 255
'===============================================
CurKolor = GetSysColor(COLOR_BTNFACE) '// 12632256
'// color it Green
Kolor = SetSysColors(1, 15, RGB(0, 255, 0))
MsgBox "Object colours have changed!"
'// Restore to Default
Kolor = SetSysColors(1, COLOR_BTNFACE, CurKolor)
End Sub
</pre>