VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



This code shows how to Lock or Unlock any Window on Win95/98/NT

by nofx (8 Submissions)
Category: Windows System Services
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Mon 4th January 1999
Date Added: Mon 8th February 2021
Rating: (1 Votes)

This code shows how to Lock or Unlock any Window on Win95/98/NT

API Declarations


' CaptiveX TM. '
' Writen by nofx (op-ivy) '
'http://www.sharpnet.net/~nofx/'
'or visit us on EFNET #captivex'
' P.S. '
' Have Fun '


#If Win32 Then
Declare Function EnableWindow& Lib "user32" (ByVal hWnd As Long, ByVal fEnable As Long)
Declare Function FindWindow& Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String)
#Else
Declare Function EnableWindow% Lib "user" (ByVal hWnd As Integer, ByVal aBOOL As Integer)
Declare Function FindWindow% Lib "user" (ByVal lpClassName As Any, ByVal lpWindowName As Any)
#End If 'WIN32

Rate This code shows how to Lock or Unlock any Window on Win95/98/NT



Dim lFndWnd As Long
Dim lDisEnWnd As Long

lFndWnd = FindWindow(vbNullString, WindowName$) 'Finds the Window Name
lDisEnWnd = EnableWindow(lFndWnd, ByVal EnabOrDisab&) 'Disables all mouse and keyboard input to the specified window.
                                                      'In ByVal EnabOrDisab& you either enter: 0 to Disable Window or 1 to Enable it.
End Function


Download this snippet    Add to My Saved Code

This code shows how to Lock or Unlock any Window on Win95/98/NT Comments

No comments have been posted about This code shows how to Lock or Unlock any Window on Win95/98/NT. Why not be the first to post a comment about This code shows how to Lock or Unlock any Window on Win95/98/NT.

Post your comment

Subject:
Message:
0/1000 characters