|
-
Sep 2nd, 2011, 03:40 AM
#1
Thread Starter
Lively Member
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.
-
Sep 2nd, 2011, 04:24 AM
#2
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
-
Sep 4th, 2011, 03:42 AM
#3
Thread Starter
Lively Member
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?
-
Sep 4th, 2011, 03:53 AM
#4
Re: is there a way to maximize a window that is minized to the taskbar?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|