RE:algo dificil: Iniciar una programa al iniciar W
'En un Modulo Copia
Option Explicit
Private Declare Function FindWindow Lib "user32" Alias _
"FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName _
As String) As Long
Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByVal lpvParam As Any, ByVal fuWinIni As Long) 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
Private Const SWP_HIDEWINDOW = &H80
Private Const SWP_SHOWWINDOW = &H40
Public Function HideTaskBar() As Boolean
Dim lRet As Long
Dim lRet2 As Long
lRet = FindWindow("Shell_traywnd", "")
If lRet > 0 Then
lRet = SetWindowPos(lRet, 0, 0, 0, 0, 0, SWP_HIDEWINDOW)
HideTaskBar = lRet > 0
End If
lRet2 = FindWindow(vbNullString, "Program Manager")
If lRet2 > 0 Then
MsgBox "ocultado el program"
lRet2 = SetWindowPos(lRet2, 0, 0, 0, 0, 0, SWP_HIDEWINDOW)
End If
End Function
Public Function ShowTaskBar() As Boolean
Dim lRet As Long
Dim lRet2 As Long
lRet = FindWindow("Shell_traywnd", "")
If lRet > 0 Then
lRet = SetWindowPos(lRet, 0, 0, 0, 0, 0, SWP_SHOWWINDOW)
ShowTaskBar = lRet > 0
End If
lRet2 = FindWindow(vbNullString, "Program Manager")
If lRet2 > 0 Then
lRet2 = SetWindo