Foros del Web » Soporte técnico » Windows »

Como Bloquear El Boton De Inicio

Estas en el tema de Como Bloquear El Boton De Inicio en el foro de Windows en Foros del Web. Hola, quisiera saber como puedo quitar el boton de inicio de la barra de tareas, o deshabililitarlo para que no se tenga acceso a el ...
  #1 (permalink)  
Antiguo 28/02/2005, 17:11
Avatar de robertonavarro  
Fecha de Ingreso: octubre-2004
Mensajes: 72
Antigüedad: 19 años, 6 meses
Puntos: 1
Busqueda Como Bloquear El Boton De Inicio

Hola, quisiera saber como puedo quitar el boton de inicio de la barra de tareas, o deshabililitarlo para que no se tenga acceso a el ni por el teclado ni por el mouse. Quisiera saber si es posible programarlo desde un programa en VB 6. El sistema operativo es windows XP.

Gracias por su ayuda.
  #2 (permalink)  
Antiguo 28/02/2005, 21:44
Avatar de julwo  
Fecha de Ingreso: mayo-2004
Ubicación: santiago, Rep Dom
Mensajes: 252
Antigüedad: 20 años
Puntos: 0
encontre esto por hay haber si te sirve!!
El code que esta en el command1, deshabilita "ctrl+alt+supr", "alt+tab" y la tecla inicio (del teclado). El del command2, los habilita...

Código:
Código:
Private Declare Function SystemParametersInfo Lib "User32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, lpvParam As Any, ByVal fuWinIni As Long) As Long
Private Sub Command1_Click()
Dim res As Integer
Dim bVal As Boolean
res = SystemParametersInfo(97, True, bVal, 0) 'Deshabilita
End Sub
Private Sub Command2_Click()
Dim res As Integer
Dim bVal As Boolean
res = SystemParametersInfo(97, False, bVal, 0) 'Habilita
End Sub
Sino, podes optar por ocultar el botón inicio:
Primero pones en un módulo lo siguiente...

Código:
Código:
Option Explicit
Const WS_CHILD = &H40000000
Const WM_LBUTTONDOWN = &H201
Const WM_LBUTTONUP = &H202
Const SW_HIDE = 0
Const SW_NORMAL = 1
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As Long
Private Declare Function CreateWindowEx Lib "user32" Alias "CreateWindowExA" (ByVal dwExStyle As Long, ByVal lpClassName As String, ByVal lpWindowName As String, ByVal dwStyle As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hWndParent As Long, ByVal hMenu As Long, ByVal hInstance As Long, lpParam As Any) As Long
Private Declare Function DestroyWindow Lib "user32" (ByVal hwnd As Long) As Long
Dim tWnd As Long, bWnd As Long, ncWnd As Long
Y segundo, en el form, agregas 3 botones e ingresas

Código:
Código:
Option Explicit
Const WS_CHILD = &H40000000
Const WM_LBUTTONDOWN = &H201
Const WM_LBUTTONUP = &H202
Const SW_HIDE = 0
Const SW_NORMAL = 1
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As Long
Private Declare Function CreateWindowEx Lib "user32" Alias "CreateWindowExA" (ByVal dwExStyle As Long, ByVal lpClassName As String, ByVal lpWindowName As String, ByVal dwStyle As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hWndParent As Long, ByVal hMenu As Long, ByVal hInstance As Long, lpParam As Any) As Long
Private Declare Function DestroyWindow Lib "user32" (ByVal hwnd As Long) As Long
Dim tWnd As Long, bWnd As Long, ncWnd As Long
Private Sub Command1_Click()
'Ocultar
tWnd = FindWindow("Shell_TrayWnd", vbNullString)
bWnd = FindWindowEx(tWnd, ByVal 0&, "BUTTON", vbNullString)
ShowWindow bWnd, SW_HIDE
End Sub
Private Sub Command2_Click()
'Mostrar
ShowWindow bWnd, SW_NORMAL
End Sub
Private Sub Command3_Click()
'SebaKV
Dim R As RECT
tWnd = FindWindow("Shell_TrayWnd", vbNullString)
bWnd = FindWindowEx(tWnd, ByVal 0&, "BUTTON", vbNullString)
GetWindowRect bWnd, R
ncWnd = CreateWindowEx(ByVal 0&, "BUTTON", "SebaKV", WS_CHILD, 0, 0, R.Right - R.Left, R.Bottom - R.Top, tWnd, ByVal 0&, App.hInstance, ByVal 0&)
ShowWindow ncWnd, SW_NORMAL
ShowWindow bWnd, SW_HIDE
End Sub
saludos
__________________
Cuando las cosa son Buenas, SON BUENAS! no importan las R@tas que orinen en el camino! Me SiGUe!!
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 21:55.