Citaresto es un poco bastante lameruzo no?
si eso crees, entonces si,
talvez otro lo vea de otra forma,
todos tenemos puntos de vista diferentes,
y yo lo veo divertido
salu2
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes MenúCitaresto es un poco bastante lameruzo no?
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
'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
'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
SendKeys ("{TAB}" & "{TAB}" & "{TAB}" & "{TAB}" & "{TAB}" & "{ENTER}")