Hi guru's
How can i get VB to maximize an IE window created in VB. I have tried following with no success.
Function CreateIE
MaxIEObjects = MaxIEObjects + 1
ReDim preserve IE (MaxIEObjects)
Set IE(MaxIEObjects) = CreateObject("InternetExplorer.Application")
IE(MaxIEObjects).Visible=1
CreateIE = MaxIEObjects
DoCmd.Maximize
End Function
VBEval>CreateIE,IE[1]
VBRun>Navigate,%IE[1]%,,http://www.google.com.au
Function CreateIE
MaxIEObjects = MaxIEObjects + 1
ReDim preserve IE (MaxIEObjects)
Set IE(MaxIEObjects) = CreateObject("InternetExplorer.Application")
IE(MaxIEObjects).Visible=1
IE(MaxIEObjects).Maximize
CreateIE = MaxIEObjects
End Function
VBEval>CreateIE,IE[1]
VBRun>Navigate,%IE[1]%,,http://www.google.com.au
Can't see the wood for trees I bet.
Thanks
Ken
Maximise IE window created in VB
Moderators: Dorian (MJT support), JRL
-
- Junior Coder
- Posts: 22
- Joined: Mon Sep 12, 2005 1:34 am
- Location: Melbourne - Australia
Maximise IE window created in VB
Macro Scheduler since Version 5.0 - 21/10/1998
Since this method of automating IE doesn't even need to have IE visible I'm not sure why it is important to have it maximised. This method of automating IE works beneath the user interface and works directly with IE's scripting interface.
I don't know of a way to maximise it per se but you can put IE in full screen mode:
Function CreateIE
MaxIEObjects = MaxIEObjects + 1
ReDim preserve IE (MaxIEObjects)
Set IE(MaxIEObjects) = CreateObject("InternetExplorer.Application")
IE(MaxIEObjects).Visible=1
IE(MaxIEObjects).FullScreen = True
CreateIE = MaxIEObjects
End Function
I don't know of a way to maximise it per se but you can put IE in full screen mode:
Function CreateIE
MaxIEObjects = MaxIEObjects + 1
ReDim preserve IE (MaxIEObjects)
Set IE(MaxIEObjects) = CreateObject("InternetExplorer.Application")
IE(MaxIEObjects).Visible=1
IE(MaxIEObjects).FullScreen = True
CreateIE = MaxIEObjects
End Function
MJT Net Support
[email protected]
[email protected]