troubleshooting Question

how do I get IE to open maximized?

Avatar of SRG041808
SRG041808Flag for United States of America asked on
Web BrowsersVB Script
16 Comments1 Solution2730 ViewsLast Modified:
The code attached works fine the way it is... I just need IE to open maximized, not full screen or theater mode.
Option Strict Off
Option Explicit Off
Module Module1
 
    Public Const MOUSEEVENTF_MOVE As Integer = &H1
    Public Const MOUSEEVENTF_LEFTDOWN As Integer = &H2
    Public Const MOUSEEVENTF_LEFTUP As Integer = &H4
    Public Const MOUSEEVENTF_ABSOLUTE As Integer = &H8000
    Public Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Integer, ByVal dx As Integer, ByVal dy As Integer, ByVal cButtons As Integer, ByVal dwExtraInfo As Integer)
 
    Public Sub Main()
        Dim Window
        Window = CreateObject("InternetExplorer.Application")
        PWORD = "blahblahblah"
        Window.RegisterAsBrowser = True
        Window.Navigate("websitegoeshere" & PWORD)
        Window.MenuBar = True
        Window.ToolBar = False
        Window.AddressBar = True
        Window.StatusBar = True
        Window.FullScreen = False
        Window.Resizable = True
        Window.Visible = True
        Window.Width = 800
        Window.Height = 600
 
        Dim dest_x
        Dim dest_y
 
        dest_x = 18078
        dest_y = 18078
 
        ' Move the mouse to its final destination and click it.
        mouse_event( _
            MOUSEEVENTF_ABSOLUTE + _
            MOUSEEVENTF_MOVE + _
            MOUSEEVENTF_LEFTDOWN + _
            MOUSEEVENTF_LEFTUP, _
            dest_x, dest_y, 0, 0)
    End Sub
 
End Module
ASKER CERTIFIED SOLUTION
SRG041808

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 16 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 16 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros