Minimize, Maximize IE4 or IE5 using VB6 code 
Author Message
 Minimize, Maximize IE4 or IE5 using VB6 code

How to Minimize, Maximize IE4 or IE5 using VB6 code or API function.

Thanks

N.B. please send a copy (Cc:) of your answer to my email address

Khodr



Sun, 07 Oct 2001 03:00:00 GMT  
 Minimize, Maximize IE4 or IE5 using VB6 code
Hi-
    Trimmed a couple of groups from the reply. (Enterprise?)
Anyway, here's some thoroughly untested, but seemingly OK
code.
Joe
PS- I can't send email from my current configuration.

________________snip__________________________________________-
Option Explicit
Private Declare Function FindWindow Lib "user32" _
   Alias "FindWindowA" (ByVal lpClassName As String, _
   ByVal lpWindowName As String) As Long
Private Declare Function SendMessage Lib "user32" _
   Alias "SendMessageA" (ByVal hwnd As Long, _
   ByVal wMsg As Long, ByVal wParam As Long, _
   lParam As Any) As Long
Private Const SC_MAXIMIZE = &HF030
Private Const SC_MINIMIZE = &HF020
Private Const WM_SYSCOMMAND = &H112

Private Sub Command1_Click()
   Dim lRetVal As Long
   Dim lwnd As Long
   lwnd = FindWindow("IEFrame", vbNullString)
   If lwnd Then
      lRetVal = SendMessage(lwnd, WM_SYSCOMMAND, SC_MAXIMIZE, 0&)
   End If
End Sub

Private Sub Command2_Click()
   Dim lRetVal As Long
   Dim lwnd As Long
   lwnd = FindWindow("IEFrame", vbNullString)
   If lwnd Then
      lRetVal = SendMessage(lwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0&)
   End If
End Sub
_________________snip____________________________________________

--
 ***********************************************************

 Microsoft Developer MVP- Visual Basic
 Check out Yankee Clipper Plus- August 98 PCComputing
 Mag "Amazing Free Stuff: Programs and Power Toys"
 http://www.tiac.net/users/lvasseur/ycphome.html
 "He preaches well that lives well, quoth Sancho; that's
 all the divinity I understand." Miguel de Cervantes
 **********************************************************
 PS- Please reply to the newsgroup- except in the
 case of flames, insults, etc. (Don't bother.)

Quote:

>How to Minimize, Maximize IE4 or IE5 using VB6 code or API function.

>Thanks

>N.B. please send a copy (Cc:) of your answer to my email address

>Khodr



Sun, 07 Oct 2001 03:00:00 GMT  
 Minimize, Maximize IE4 or IE5 using VB6 code
HI,

Add a reference to Microsoft Internet Controls, then copy this code:

Private Declare Function CloseWindow Lib "User32" (ByVal hwnd As Long) As
Boolean

Public Sub MinimizeAllIE()
Dim IEWindow As InternetExplorer
Dim ExplorerWindows As ShellWindows
Dim DocType As String

    Set ExplorerWindows = New ShellWindows

    On Error Resume Next

    For Each IEWindow In ExplorerWindows
        With IEWindow

            DocType = .Type

            ' Explorer windows does not support
            ' Type property

            If Err.Number = 0 Then
                CloseWindow .hwnd
            Else
                Err.Clear
            End If

        End With
    Next

End Sub

--
Eduardo Morcillo
Free ActiveX Controls: http://www.geocities.com/SiliconValley/Foothills/9940

Quote:
> How to Minimize, Maximize IE4 or IE5 using VB6 code or API function.

> Thanks

> N.B. please send a copy (Cc:) of your answer to my email address

> Khodr



Sun, 07 Oct 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Minimize, Maximize IE4 or IE5 using VB6 code

2. Minimize, Maximize IE4 or IE5 using VB6 code

3. Why this code works in IE5 and into in IE4

4. Maximizing/Minimizing Form from code

5. Using VBScript to minimize, restore/maximize, close window

6. Using VBScript to minimize, restore/maximize or close a window

7. Window Refreshing When Using Minimize And Maximize

8. Maximizing vb6 form or code window on startup

9. Maximize window in IE4.0

10. How does IE5 or IE4 does it?

11. tdc IE4 vs iE5 What's changed?

12. VB Script compatibility with IE4 & IE5

 

 
Powered by phpBB® Forum Software