is there a way to maximize a window that is minized to the taskbar?
is there a way to maximize a window that is minimized to the taskbar?
I do not want to do this in a VB form, I want to any windows program, that I have the windows title for.
Re: is there a way to maximize a window that is minized to the taskbar?
try like this
Code:
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 SetForegroundWindow Lib "user32.dll" (ByVal hwnd As Long) As Long
Private Const SW_SHOWNORMAL = 1
Private Const SW_SHOWMINIMIZED = 2
Private Const SW_SHOWMAXIMIZED = 3
Private Sub Command1_Click()
Dim lHwnd As Long
lHwnd = FindWindow("Notepad", vbNullString)
If lHwnd <> 0 Then
MsgBox "Notepad is opened!", vbInformation, "Notepad"
ShowWindow lHwnd, 1
SetForegroundWindow (lHwnd)
Else
MsgBox "Notepad isn't opened", vbInformation, "Window not found."
End If
End Sub
Re: is there a way to maximize a window that is minized to the taskbar?
That works well for notepad, but what about other programs?
does the FindWindow work with a partial window name?
Re: is there a way to maximize a window that is minized to the taskbar?