Results 1 to 3 of 3

Thread: Lockscreen

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2004
    Location
    Cleveland,Oh
    Posts
    95

    Lockscreen

    Hi All:
    Is there a similar function to Lockscreen in VB? In VFP you could use Lockscreen when the code needs to refresh lots of text boxes or comboboxes. The Lockscreen prevent screen flickering. I was wondering if there is a similiar function in VB.

    Thanks
    Zus

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974
    There isnt one built in, but it is easy to use the Windows one, all it takes is a simple API call. Unfortunately only one window can be locked at a time, but you wont get errors if it fails (you just wont get the locking effect).

    VB Code:
    1. 'Add this to the declarations section of a form/module:
    2. Declare Function LockWindowUpdate Lib "user32" Alias "LockWindowUpdate" (ByVal hwndLock As Long) As Long
    3.  
    4.  
    5. 'Usage:
    6.              'Lock
    7.   LockWindowUpdate Me.hWnd
    8.  
    9.              'Unlock
    10.   LockWindowUpdate False

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 2004
    Location
    Cleveland,Oh
    Posts
    95

    lockscreen

    Thanks very much for your help, it worked !!!!
    Zus

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