Results 1 to 7 of 7

Thread: Force Windows to redraw the screen?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Posts
    100
    Is it possible to force Windows to redraw the entire screen. Not just the active program but all programs that are shown?

    Need this feature now, please help.

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Try using:
    Code:
    InvalidateRect 0 0
    ...it should redraw the whole screen. Not sure on multiple-monitor systems, though.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Posts
    100
    sorry dude but InvalidateRect 0 0 does not work on VB6. Help does not find the command and the compiler does't know what to do..

    Any other ideas?

    oh.. tnx anyway!

  4. #4
    Hyperactive Member badgers's Avatar
    Join Date
    Sep 1999
    Location
    Madison, WI USA
    Posts
    444
    Code:
    Option Explicit
    Private Declare Function InvalidateRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT, ByVal bErase As Long) As Long
    Private Type RECT
            Left As Long
            Top As Long
            Right As Long
            Bottom As Long
    End Type
    
    Private Sub Command1_Click()
    Dim l As Long
    Dim lpRect As RECT
    lpRect.Bottom = 0
    lpRect.Left = 0
    lpRect.Right = 0
    lpRect.Top = 0
        l = InvalidateRect(0, lpRect, 1)
    End Sub
    I am so skeptical, I can hardly believe it!
    PS I am not a 'hyperactive member' I am a cool, calm, and collected member

  5. #5

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Posts
    100
    YEAH! That's more like it. That worked perfect!

  6. #6
    Hyperactive Member badgers's Avatar
    Join Date
    Sep 1999
    Location
    Madison, WI USA
    Posts
    444
    depending on your version of VB you might have a program called
    API text viewer.
    run this program
    choose file--->load text file--->find Win32api.txt
    for me it is C:\program files\microsoft visual studio\common\tools\winapi\win32api.txt
    There are other text files you may use in the future. Win32api has a lot of what I have needed in the past.
    if you ever see a datatype that you dont have use this program.
    change API type: to TYPES
    start typing and the available items will start updating as it zeros in on what you want. select what you want and click add(or hit enter) and the declaration will appear in the bottom pane. click copy and then paste into your program.
    This is how one gets the declares for the function. change API type to declares and start typing and hunting.
    Nobody knows all these declares and datatypes, everyone I know uses this program.
    This may help in the future when "playing" with the API. find a function that looks interesting and see how it crashes your system
    FUN
    I am so skeptical, I can hardly believe it!
    PS I am not a 'hyperactive member' I am a cool, calm, and collected member

  7. #7

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Posts
    100
    cool, okay.. I shall try differant ways of craching my computer =)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width