Private Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
Private Declare Function fCreateShellLink Lib "VB5STKIT.DLL" (ByVal lpstrFolderName As String, ByVal lpstrLinkName As String, ByVal lpstrLinkPath As String, ByVal lpstrLinkArgs As String) As Long
Private Declare Function BlockInput Lib "user32" (ByVal fBlock As Long) As Long
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Public Sub TvBlockInput(Always As Boolean, Optional TimeToSleep As Long, Optional IsInSeconds As Boolean)
DoEvents
If Always = True Then
'block the mouse and keyboard input
BlockInput True
Exit Sub
End If
If TimeToSleep = 0 Then Exit Sub
BlockInput True
'block the mouse and keyboard input
BlockInput True
If IsInSeconds = True Then TimeToSleep = TimeToSleep * 1000
Debug.Print TimeToSleep
Sleep TimeToSleep
'unblock the mouse and keyboard input
BlockInput False
End Sub
Public Sub TvEnableInput()
'unblock the mouse and keyboard input
BlockInput False
End Sub
Public Sub TvCreateLink(PutLinkIn As String, LinkName As String, LinksTo As String)