How to refresh screen? 
Author Message
 How to refresh screen?

Dear all, I'm trying to write a wallpaper changer, but don't know how to
repaint the screen so that the new wallpaper will show. Please help. Do I
use RedrawWindow?

I've tried this in a module:
-------------------------------------------------------
Option Explicit

Declare Function RedrawWindow Lib "user32" Alias "RedrawWindow" (ByVal hwnd
As Long, lprcUpdate As RECT, ByVal hrgnUpdate As Long, ByVal fuRedraw As
Long) As Long

Public Const RDW_ERASE = &H4

Type RECT
    left As Long
    top As Long
    right As Long
    bottom As Long
End Type
-------------------------------------------------------
And this in the code:
-------------------------------------------------------
Option Explicit

Private Sub Command1_Click()
    Dim Scrn As RECT
    Call RedrawWindow(Me.hwnd, Scrn, "", RDW_ERASE)
End Sub
-------------------------------------------------------

But it says type not matching. So I presume Scrn isn't correct. How do I
make it work?

Thanks,
            Jules

*There is not enough darkness to extinguish the light of a small candle*



Wed, 08 Aug 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. DirectDraw - refreshing screen

2. How to refresh screen?

3. How to refresh screen?

4. Help ! Refresh screen problem

5. How to refresh screen?

6. How to refresh screen?

7. How to refresh screen?

8. How to refresh screen?

9. How to refresh screen?

10. Screen refreshing on form with embedded Excel chart

11. Screen refresh while executing code?

12. MS Graph and no screen refresh

 

 
Powered by phpBB® Forum Software