CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2005
    Posts
    94

    Lightbulb LockScreenUpdate - LockWindowsUpdate

    LockScreenUpdate - LockWindowsUpdate

    Hi
    Dos anyone now how Can i lock My Screen 2 Update

    ?
    LockWindowsUpdate Me.hWnd (not working)
    And
    LockWindowsUpdate GetDesktopWindow (not working)
    Last edited by imosha; August 8th, 2007 at 08:17 PM.

  2. #2
    Join Date
    Nov 2002
    Posts
    278

    Re: LockScreenUpdate - LockWindowsUpdate

    Code:
    Option Explicit
    Private Declare Function LockWindowUpdate Lib "user32" (ByVal hwndLock As Long) As Long
    
    Private Sub Command1_Click()
    Dim iCount As Long
        
        LockWindowUpdate Me.hwnd
        
        iCount = 0
        Do Until iCount = 100000
            ' This loop will cause flicker when the LockWindowUpdate is commented out
            Me.List1.AddItem iCount
            DoEvents
            iCount = iCount + 1
        Loop
        
        LockWindowUpdate False
    
    End Sub

  3. #3
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: LockScreenUpdate - LockWindowsUpdate

    the question was for screen #2, though
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

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

Featured