This only affects the client area of the form, not even any control.
In case anyone is interested, I'm currently working on an .OCX which will do
this without any side effects.
I'll post a follow up to the original question in this thread when it's
done.

--
Hope this helps ...

Rene Whitworth
Whitworth Software Solutions - Germany
http://www.w-s-s.de/Developer
Please reply to the newsgroup :-)


"Phil Weber" <pweber@teleport.com> schrieb im Newsbeitrag
news:38dcedb3$1@news.devx.com...
> > I utilize a number of modal dialog boxes in my current project
> > that seem to confuse new users. I would like to haze over the
> > current form (just the current form, nothing else) and display
> > the modal dialog box. This should provide the user with the
> > best visual cues that only the non-modal form is inactive.

>
> John: If your users are confused by your app's interface, perhaps you

should
> rethink its design. Modal forms are often employed to force the user to do
> things in the order the developer would like them to be done, rather than
> the order in which the user would like to do them. There are exceptions,

of
> course, but in my experience, modal dialogs are often unnecessary and
> usually disruptive to the user's flow. I would suggest that you redesign
> your UI to eliminate most or all modal dialogs.
>
> That said, you can use the code below to apply the shading effect you
> describe to a form. A more standard mechanism is to simply disable the

form
> (frm.Enabled = False), which will cause its title bar and controls to

paint
> in Windows' inactive colors.
> ---
> Phil Weber
>
> [Followups posted to design.ui]
>
> Private Type RECT
> Left As Long
> Top As Long
> Right As Long
> Bottom As Long
> End Type
> Private Declare Function CreateBitmap Lib "gdi32" (ByVal nWidth As

Long,
> _
> ByVal nHeight As Long, ByVal nPlanes As Long, ByVal nBitCount As
> Long, _
> lpBits As Any) As Long
> Private Declare Function CreatePatternBrush Lib "gdi32" (ByVal hBitmap

_
> As Long) As Long
> Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As
> Long) _
> As Long
> Private Declare Function FillRect Lib "user32" (ByVal hDC As Long,
> lpRect _
> As RECT, ByVal hBrush As Long) As Long
>
> Public Sub ShadeForm(frm As Form)
>
> Dim hBitmap As Long
> Dim hBrush As Long
> Dim lResult As Long
> Dim rc As RECT
> Static iBrush(1 To 8) As Integer
>
> If iBrush(1) = 0 Then
> iBrush(1) = &H55: iBrush(2) = &HAA
> iBrush(3) = &H55: iBrush(4) = &HAA
> iBrush(5) = &H55: iBrush(6) = &HAA
> iBrush(7) = &H55: iBrush(8) = &HAA
> End If
>
> With frm
> .Cls
> ' .ScaleMode = vbPixels
> With rc
> .Left = 0
> .Top = 0
> .Right = frm.ScaleWidth
> .Bottom = frm.ScaleHeight
> End With
> hBitmap = CreateBitmap(8, 8, 1, 1, iBrush(1))
> hBrush = CreatePatternBrush(hBitmap)
> lResult = FillRect(.hDC, rc, hBrush)
> lResult = DeleteObject(hBrush)
> lResult = DeleteObject(hBitmap)
> End With
>
> End Sub
>
>