G
Guest
Hello,
I am trying to acheive the following in Visual Basic 6.0. Can someone point
me in the right direction.
====================================================
I am using the following code to paint a normal form and it works.
PaintDesktop Me.hdc
In the standard module i have the declaration for PaintDesktop
Public Declare Function PaintDesktop Lib "user32" (ByVal hdc As Long) As
Long
Now I am not able to get the Me.hdc for the MDI Form. So I used the
following additional API calls.
Public Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Public Declare Function GetDesktopWindow Lib "user32" () As Long
Now in the MDI Form I use the code:
Dim lngLong As Long, hdc As Long
hdc = GetDC(GetDesktopWindow())
lngLong = PaintDesktop(hdc)
the result in lngLong is 1 but the MDIForm is not painted with the
desktop.
=====================================================
Thanks,
Pradeep
I am trying to acheive the following in Visual Basic 6.0. Can someone point
me in the right direction.
====================================================
I am using the following code to paint a normal form and it works.
PaintDesktop Me.hdc
In the standard module i have the declaration for PaintDesktop
Public Declare Function PaintDesktop Lib "user32" (ByVal hdc As Long) As
Long
Now I am not able to get the Me.hdc for the MDI Form. So I used the
following additional API calls.
Public Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Public Declare Function GetDesktopWindow Lib "user32" () As Long
Now in the MDI Form I use the code:
Dim lngLong As Long, hdc As Long
hdc = GetDC(GetDesktopWindow())
lngLong = PaintDesktop(hdc)
the result in lngLong is 1 but the MDIForm is not painted with the
desktop.
=====================================================
Thanks,
Pradeep