omnibuster
06-15-2009, 05:44 PM
Hi.
I Cant control Minimize/Normal protcess.
How control: if IE WindowsSize Minimized then do something.
Option Explicit
Declare Function apiShowWindow Lib "user32" Alias "ShowWindow" _
(ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Public Enum apiShowWindowSize
SW_MAXIMIZE = 3
SW_SHOWNORMAL = 1
SW_sHOWMINIMIZED = 2
End Enum
Sub test()
Dim strSavePath As String
Dim URL As String, ext As String
Dim buf, Ret As Long
Dim objIE As Object
'Close All opened IE Windows??
Set objIE = CreateObject("InternetExplorer.Application")
'On Error GoTo errHandler
With objIE
.Navigate "http://somesite.com"
Do While .Busy: DoEvents: Loop
objIE.Visible = True
apiShowWindow objIE.hwnd, SW_SHOWNORMAL
'IE NormalSize, because need insert capthasymbols.
' If symbols inserted and website end loading then user should click IE MINIMIZE i.e. this trigered: go to next operation
Do While .ReadyState <> 4: DoEvents: Loop
End With
10
With objIE
If objIE.hwnd = SW_SHOWNORMAL Or objIE.hwnd = SW_MAXIMIZE Then
GoTo 10
Else
Call GETinfo
End If
End With
Set objIE Nothing
IE Quit
End Sub
I Cant control Minimize/Normal protcess.
How control: if IE WindowsSize Minimized then do something.
Option Explicit
Declare Function apiShowWindow Lib "user32" Alias "ShowWindow" _
(ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Public Enum apiShowWindowSize
SW_MAXIMIZE = 3
SW_SHOWNORMAL = 1
SW_sHOWMINIMIZED = 2
End Enum
Sub test()
Dim strSavePath As String
Dim URL As String, ext As String
Dim buf, Ret As Long
Dim objIE As Object
'Close All opened IE Windows??
Set objIE = CreateObject("InternetExplorer.Application")
'On Error GoTo errHandler
With objIE
.Navigate "http://somesite.com"
Do While .Busy: DoEvents: Loop
objIE.Visible = True
apiShowWindow objIE.hwnd, SW_SHOWNORMAL
'IE NormalSize, because need insert capthasymbols.
' If symbols inserted and website end loading then user should click IE MINIMIZE i.e. this trigered: go to next operation
Do While .ReadyState <> 4: DoEvents: Loop
End With
10
With objIE
If objIE.hwnd = SW_SHOWNORMAL Or objIE.hwnd = SW_MAXIMIZE Then
GoTo 10
Else
Call GETinfo
End If
End With
Set objIE Nothing
IE Quit
End Sub