Re: Resize application window - more information
- From: Ltexeira <Ltexeira@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 25 Mar 2008 10:04:11 -0700
Your link takes me to download Shell32.zip, which contains the following code
in the hWndShell function. ( Taken directly from the downloaded file )
Perhaps you are referring to a newer version of yours that is not posted for
download.
Public Function hWndShell(ByVal JobToDo As String, Optional ExecMode) As Long
'
' Shells a new process and returns the hWnd
' of its main window.
'
Dim ProcessID As Long
Dim PID As Long
Dim hProcess As Long
Dim hWndJob As Long
If IsMissing(ExecMode) Then
ExecMode = vbMinimizedNoFocus
Else
If ExecMode < vbHide Or ExecMode > vbMinimizedNoFocus Then
ExecMode = vbMinimizedNoFocus
End If
End If
On Error Resume Next
ProcessID = Shell(JobToDo, CLng(ExecMode))
If Err Then
hWndShell = 0
Exit Function
End If
On Error GoTo 0
hWndJob = FindWindow(vbNullString, vbNullString)
Do While hWndJob <> 0
If GetParent(hWndJob) = 0 Then
Call GetWindowThreadProcessId(hWndJob, PID)
If PID = ProcessID Then
hWndShell = hWndJob
Exit Do
End If
End If
hWndJob = GetWindow(hWndJob, GW_HWNDNEXT)
Loop
End Function
If you have a newer version that enumerates, please direct me to it.
Thanks.
.
- Follow-Ups:
- Re: Resize application window - more information
- From: Karl E. Peterson
- Re: Resize application window - more information
- References:
- Re: Resize application window - more information
- From: Karl E. Peterson
- Re: Resize application window - more information
- From: Ltexeira
- Re: Resize application window - more information
- From: Karl E. Peterson
- Re: Resize application window - more information
- From: Ltexeira
- Re: Resize application window - more information
- From: Karl E. Peterson
- Re: Resize application window - more information
- Prev by Date: RE: Runtime Error -2147310770(8002801d): Automation Error.
- Next by Date: Re: Resize application window - more information
- Previous by thread: Re: Resize application window - more information
- Next by thread: Re: Resize application window - more information
- Index(es):