Results 1 to 4 of 4

Thread: Help! Stop Flickering Images

  1. #1

    Thread Starter
    Hyperactive Member mikef's Avatar
    Join Date
    Jun 2000
    Location
    Beach bound...
    Posts
    510

    Angry

    I have an image control that contains an .ICO in the corner of a picture box, but when the picturebox refreshes (which is every few seconds) it makes the image in the image control flicker - Anyway to stop this??

    The image control contains an icon with the letters "X Y" in it. It is to help visually ID the XY grid drawn with the LINE command.

    If you know how to stop the flicker or have a better way to do this PLEASE LET ME KNOW!! All suggestions (good or bad) accepted. I am at the far end of frustration now!

    Thanks for 'da help!

  2. #2
    Hyperactive Member MPrestonf12's Avatar
    Join Date
    Jun 1999
    Location
    NY
    Posts
    330

    Cool heres a soution!!!

    Try this api call

    Module:
    Declare function LockWindowUpdate lib "User32" (byval hWndlock as long) as long

    Form code
    Dim lerr as long
    Dim X as integer

    screen.mousepointer = vbhourglass
    lerr = lockwindowupdate(me.hwnd)

    lerr = lockwindowupdate(0)
    screen.mousepointer = vbdefault

    hope it helps
    Matt

  3. #3

    Thread Starter
    Hyperactive Member mikef's Avatar
    Join Date
    Jun 2000
    Location
    Beach bound...
    Posts
    510

    Unhappy

    Nope that did'nt work. Thanks anyways.......anyone else??

  4. #4
    Guest
    Use the LockWindowUpdate as MPrestonf12 said, but change Me.hWnd to Picture1.hWnd (Or whatever the name of your PictureBox is.

    Assuming you have your code in a Timer, use this code.

    Code:
    Private Declare Function LockWindowUpdate Lib "User32" (ByVal hWndlock As Long) As Long
    
    Private Sub Timer1_Timer()
    
        Picture1.Refresh
        LockWindowUpdate Picture1.hwnd
    
    End Sub

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