Results 1 to 6 of 6

BlockInput Not Working.

Threaded View

  1. #1
    Registered User
    Join Date
    09-27-2012
    Location
    Mumbai, IN
    MS-Off Ver
    Office 365
    Posts
    97

    BlockInput Not Working.

    Hi Guys,

    Please help me here..the idea being whenever I run the following code, the user should not be able to use the mouse or keyboard. However- the mouse doesnt block, rather nothing freezes. guide me in the right direction.

    Declare PtrSafe Function BlockInput Lib "User32.dll" (ByVal fBlockIt As Boolean) As Boolean
    Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
    
    Sub MouseKeyboardTest() 'both keyboard and mouse blocked
     
        BlockInput True ' Turns off Keyboard and Mouse
    '   Routine goes here
        Sleep 5000 ' Optional coding
    
        BlockInput False ' Turns on Keyboard and Mouse
        
    End Sub
    Last edited by yoursamrit2000; 06-18-2019 at 03:18 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 08-30-2017, 02:32 AM
  2. Replies: 1
    Last Post: 02-27-2016, 06:28 PM
  3. Correct/Working (Index,Match) formula not working between cells
    By barnerd in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 02-11-2014, 01:20 PM
  4. Replies: 4
    Last Post: 09-03-2013, 02:52 AM
  5. Replies: 9
    Last Post: 03-08-2013, 11:50 AM
  6. Replies: 2
    Last Post: 08-17-2012, 08:16 AM
  7. Replies: 1
    Last Post: 01-26-2005, 04:20 AM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1