Remember you asked for this. Don't say you weren't warned. This will change
the MDI background color of all MDI applications on your system, So you
better hope this is what your user wants. I have included constants to
change a bunch of other settings colors too like the caption and what not. I
am not liable for any panicked phone calls you get when your users call to
tell you their excel background is bright green. Have fun.
include "mapbasic.def"
Declare Function GetSysColor Lib "user32" (ByVal nIndex As Integer) As
Integer
Declare Function SetSysColors Lib "user32" (ByVal nChanges As Integer,
lpSysColor As Integer, lpColorValues As Integer) As Integer
Declare Sub Main
Define COLOR_SCROLLBAR 0 'The Scrollbar colour
Define COLOR_BACKGROUND 1 'Colour of the background with no wallpaper
Define COLOR_ACTIVECAPTION 2 'Caption of Active Window
Define COLOR_INACTIVECAPTION 3 'Caption of Inactive window
Define COLOR_MENU 4 'Menu
Define COLOR_WINDOW 5 'Windows background
Define COLOR_WINDOWFRAME 6 'Window frame
Define COLOR_MENUTEXT 7 'Window Text
Define COLOR_WINDOWTEXT 8 '3D dark shadow (Win95)
Define COLOR_CAPTIONTEXT 9 'Text in window caption
Define COLOR_ACTIVEBORDER 10 'Border of active window
Define COLOR_INACTIVEBORDER 11 'Border of inactive window
Define COLOR_APPWORKSPACE 12 'Background of MDI desktop
Define COLOR_HIGHLIGHT 13 'Selected item background
Define COLOR_HIGHLIGHTTEXT 14 'Selected menu item
Define COLOR_BTNFACE 15 'Button
Define COLOR_BTNSHADOW 16 '3D shading of button
Define COLOR_GRAYTEXT 17 'Grey text, of zero if dithering is used.
Define COLOR_BTNTEXT 18 'Button text
Define COLOR_INACTIVECAPTIONTEXT 19 'Text of inactive window
Define COLOR_BTNHIGHLIGHT 20 '3D highlight of button
Define COLOR_2NDACTIVECAPTION 27 'Win98 only: 2nd active window color
Define COLOR_2NDINACTIVECAPTION 28 'Win98 only: 2nd inactive window color
Sub Main()
Dim col As Integer
Dim t As Integer
Dim nIndex As Integer
Dim nColor As Integer
nColor = RGB(0, 255, 0)
nIndex = COLOR_APPWORKSPACE
col = GetSysColor(nIndex)
t = SetSysColors(1, nIndex, nColor)
End Sub
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 4741