|
-
Mar 29th, 2000, 02:13 AM
#1
Thread Starter
New Member
Hello all,
I have a little problem that I just can figure out. After writing a label printing program for our office, I have found that on one or two older machines (and we are talking older machines P100-P133), the wallpaper image becomes corrupted, making it look like a negative. The image is then restored once the program is minimized. This seems to suggest to me that the program simply needs to tell windows at what point the desktop needs to be refreshed. I have a solution that I have yet to test, but I was wondering if I could get some feed back from others as well. The current solution that has yet to be tested is as follows:
This is in a module:
Option Explicit
Public Const RDW_ALLCHILDREN = &H80
Public Const RDW_ERASE = &H4
Public Const RDW_ERASENOW = &H200
Public Const RDW_FRAME = &H400
Public Const RDW_INTERNALPAINT = &H2
Public Const RDW_INVALIDATE = &H1
Public Const RDW_NOCHILDREN = &H40
Public Const RDW_NOERASE = &H20
Public Const RDW_NOFRAME = &H800
Public Const RDW_NOINTERNALPAINT = &H10
Public Const RDW_UPDATENOW = &H100
Public Const RDW_VALIDATE = &H8
Public Declare Function GetDesktopWindow Lib "user32" () As Long
' Changed the RECT to any
Public Declare Function RedrawWindowAny Lib "user32" Alias "RedrawWindow" _
(ByVal hwnd As Long, lprcUpdate As Any, _
ByVal hrgnUpdate As Long, _
ByVal fuRedraw As Long) As Long
This is being called within the program:
Public Sub sRefresh()
Call RedrawWindowAny(GetDesktopWindow(), vbNull, 1&, _
RDW_INVALIDATE Or RDW_UPDATENOW Or RDW_ALLCHILDREN)
End Sub
This should refresh the desktop folder, but I am not sure yet if it will do what I want.
Any suggestions would be welcomed.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|