Como bloquear tu escritorio [VB]

Topic created · 4 Mensajes · 2331 Visitas
  • Creamos un nuevo proyecto, y antes de nada, importamos estas declaraciones.

    Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal sproc As String, ByVal ntitle As String) As Int32
        Declare Function EnableWindow Lib "user32" (ByVal hwnd As Int32, ByVal nOption As Int32) As Int32
        Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hwnd As Int32, ByVal nclass As Int32, ByVal spz1 As String, ByVal spz2 As String) As Int32
        Declare Function ShowWindow Lib "user32" (ByVal hwnd As Int32, ByVal nCmd As Int32) As Int32
        Declare Function SendMessageA Lib "user32" (ByVal hwnd As Int32, ByVal msg As Int32, ByVal wParam As Int32, ByVal TextStart As String) As Int32
        Dim Hdesk, TaskbarWnd, StartWnd, Traynotify, clockwnd As Int64, StartText As String
    


    Ponéis 2 botones y le hacéis un diseño cool xDD

    En el botón bloquear ponéis:

    Hdesk = FindWindow("Progman", vbNullString)
    
            EnableWindow(CInt(Hdesk), 0)
    

    En el botón desbloquear ponéis:

    Hdesk = FindWindow("Progman", vbNullString)
    
            EnableWindow(CInt(Hdesk), 1)
    

    El SourceCode es sacado de internet :3

  • cuando dices blokear el escritorio ak te referess? pa k sirve blokearlo?xD

  • Es para poner una "capa" que no puedas hacer click en nada del escritorio, ni inicio, ni mi PC. Nada. xD

  • No funcionaaaa.... no bloquea nada..