
MDI simple questions - please help
Quote:
>Subject: Re: MDI simple questions - please help
>Date: Tue, 8 Nov 1994 12:46:19 GMT
>>>: Two simple questions regarding MDI.
>>>: 1. Is it possible to set the color of the MDI form to something other than
>>>: white? If so, how?
>>>I haven't found a way to do this. It may be possible via the API, though.
>>>(You'd probably be changing all windows' color schemes).
>>Why bother? Just put a picture area over the entire MDI (except
>>the toolbar, obviously) and colour that any way you like. You can
>>also put any normal control over the picture box.
>>Seriously guys, with a little imagination here we can easily
>>bypass the old 'Henry Ford' colour scheme.
>Even more seriously, as we discoved during the previous cycle of this
>question, last week as I recall, minimized icons will not show through the
>picture box.
>------------------------------------------------------------------------
>Chuck Stuart
>Mesquite TX USA
>Contract Programmer.
>Author of VBTrace, runtime VB Trace/Profile/XRef utility.
>------------------------------------------------------------------------
Try this:
'declare functions for changing system colors
Declare Function GetSysColor Lib "User" (ByVal nIndex%) As Long
Declare Sub SetSysColors Lib "User" (ByVal nChanges%, lpSysColor%, lpColorValues&)
Global SavedColors(18) As Long
' ** Save current system colors.
' perhaps stick this in MDIForm_Load
For i = 0 To 18
SavedColors(i) = GetSysColor(i)
Next i
ReDim NewColors(18) As Long
ReDim IndexArray(18) As Integer
'set mdi background to lime green
NewColors(0) = &HFF00& 'lime green
IndexArray(0) = 12 'COLOR_APPWORKSPACE
SetSysColors 1, IndexArray(0), NewColors(0)
' ** Restore system colors when you leave app.
' perhaps stick this in your MDIFORM_Unload
ReDim IndexArray(18) As Integer
For i = 0 To 18
IndexArray(i) = i
Next i
SetSysColors 19, IndexArray(0), SavedColors(0)
-
"I think therefore I am,
Well I'm pink, therefore I'm Spam!"
- Monty python