Como ocultar todo el menu Inicio?

Iniciado por rfacug, 26 Diciembre 2006, 23:35 PM

0 Miembros y 1 Visitante están viendo este tema.

rfacug

Como dice el titulo, alguien sabe hacerlo?.
Es decir, aparte de ocultar el boton inicio tambien ocultar el menu entero.

Saludos y gracias.

Shady

DrakoX

yo te puede ayudar,

pon esto en un modulo:

'En el modulo
'API declaration
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
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 SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Const SWP_HIDEWINDOW = &H80
Const SWP_SHOWWINDOW = &H40
Public Sub StartButton(show As Boolean)
    Dim primo As Long
    Dim ultimo As Long
       
    primo = FindWindow("Shell_TrayWnd", "")
    ultimo = FindWindowEx(primo, 0, "Button", vbNullString)
    If show = True Then
        ShowWindow ultimo, 5     'show start button
    Else
        ShowWindow ultimo, 0     'hide start button
    End If
End Sub
Public Sub taskbar(show As Boolean)
Dim primo As Long
primo = FindWindow("Shell_traywnd", "")
If show = True Then
        SetWindowPos primo, 0, 0, 0, 0, 0, SWP_SHOWWINDOW    'show taskbar
    Else
        SetWindowPos primo, 0, 0, 0, 0, 0, SWP_HIDEWINDOW    'hide taskbar
    End If
End Sub


Y espero que sepas lo suficiente como para hacerlo funcionar,
sino decime que te explico

salu2

rfacug

No sepo lo suficiente, me vas a tener que explicar ^^..
No entendi mucho el codigo ese.

Shady

DrakoX

ok,
entonces te voy a tener que dar todo servido en bandeja de plata

en el Form, agrega 4 botones y pon este code:

Private Sub Command1_Click()
StartButton True
End Sub

Private Sub Command2_Click()
StartButton False
End Sub

Private Sub Command3_Click()
taskbar True
End Sub

Private Sub Command4_Click()
taskbar False
End Sub


Luego agrega un modulo y pone este code:

'En el modulo
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
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 SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Const SWP_HIDEWINDOW = &H80
Const SWP_SHOWWINDOW = &H40

Public Sub StartButton(show As Boolean)
    Dim primo As Long
    Dim ultimo As Long
       
    primo = FindWindow("Shell_TrayWnd", "")
    ultimo = FindWindowEx(primo, 0, "Button", vbNullString)
    If show = True Then
        ShowWindow ultimo, 5
    Else
        ShowWindow ultimo, 0
    End If
End Sub

Public Sub taskbar(show As Boolean)
Dim primo As Long
primo = FindWindow("Shell_traywnd", "")
If show = True Then
        SetWindowPos primo, 0, 0, 0, 0, 0, SWP_SHOWWINDOW
    Else
        SetWindowPos primo, 0, 0, 0, 0, 0, SWP_HIDEWINDOW
    End If
End Sub


creo que esto es mas que suficiente,
y yo que vos, me pongo a leer urgente

salu2


rfacug

Leo, empeze con Vbasic pero ahora toy con c y no le doy mucho tiempo. Las api's es algo que nunca llegue a aprender. A interpretarlas e introducirlas en un programa.

Facundo

DrakoX

yo VB creo q nunk lei ningun manual ni tuto  ;D,
aprendi viendo codes y probando jeje,

y al igual que tu hace ya un tiempo empeze con C++,
pero lo deje un poco xq pensaba arrancar desp de las vacaciones

salu2 y suerte