Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 11th, 2005, 06:56 AM
Authorized User
 
Join Date: Jan 2005
Location: Chennai, , India.
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to JelfMaria
Default Internet Explorer

hi,
  How to open an internet explorer in maximized state while using MS internet control reference in vb6 ?

Thanks
Jelf

__________________
Thanks
Jelfy
 
Old April 11th, 2005, 01:36 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Alameda, ca, USA.
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

in design mode, just set the WindowState of the form hosting the internet control to 2 (vbMaximized), the default is zero (normal)
Marco
 
Old April 13th, 2005, 06:41 AM
Authorized User
 
Join Date: Jan 2005
Location: Chennai, , India.
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to JelfMaria
Default

If I give like that only the form is seen in maximized state but i want the internet explorer to be opened in maximized state

 
Old April 15th, 2005, 04:48 AM
Authorized User
 
Join Date: Jan 2005
Location: Chennai, , India.
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to JelfMaria
Default

Pls can anyone help me in doing this?

 
Old April 15th, 2005, 12:46 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Alameda, ca, USA.
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

In the Form_Resize event, change the size of the IE control to fit the form
Marco
 
Old April 16th, 2005, 01:59 AM
Authorized User
 
Join Date: Jan 2005
Location: Chennai, , India.
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to JelfMaria
Default

Here I want the form size to be small and there is a button in it.When i click the button I want the Internet explorer to be opened in Maximized state

 
Old April 18th, 2005, 11:56 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Alameda, ca, USA.
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I do not understand. Are you talking about IE (the standalone application) or the IE control that you put in one of your forms? Can you post the code of your button_click event?
Marco
 
Old April 19th, 2005, 05:16 AM
Authorized User
 
Join Date: Jan 2005
Location: Chennai, , India.
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to JelfMaria
Default

from project->references->microsoft internet controls reference i selected.
then given code like

Dim IE As InternetExplorer
Private Sub Command1_Click()
With IE
        .Navigate "d:\CFCReport\CFCReport.html", 1
        .FullScreen = True

End With
End Sub

Private Sub Form_Load()
Set IE = New InternetExplorer
End Sub

If there is some other method pls do inform me.From where I can get the IE Control?

 
Old April 19th, 2005, 02:00 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Alameda, ca, USA.
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

gotcha.
try this (change google with your url) This code works only with the IE main window. If you want multiple windows, instead of the .HWND property you have to (find and) use the window handle of the newly created window.
Another option is to use the IE control (use Project->Components instead of Project->Reference) and put an IE control in a form, so you have complete control of it.
Marco


Option Explicit

Dim IE As InternetExplorer

Private Type POINTAPI
        x As Long
        y As Long
End Type
Private Type RECT
        Left As Long
        Top As Long
        Right As Long
        Bottom As Long
End Type
Private Type WINDOWPLACEMENT
        Length As Long
        flags As Long
        showCmd As Long
        ptMinPosition As POINTAPI
        ptMaxPosition As POINTAPI
        rcNormalPosition As RECT
End Type
Private Declare Function SetWindowPlacement Lib "user32" (ByVal hwnd As Long, lpwndpl As WINDOWPLACEMENT) As Long
Private Declare Function GetWindowPlacement Lib "user32" (ByVal hwnd As Long, lpwndpl As WINDOWPLACEMENT) As Long
Private Const SW_MAXIMIZE = 3

Private Sub Command1_Click()
    Dim ip As WINDOWPLACEMENT
    ip.Length = Len(ip)
    With IE
        .Navigate "www.google.com"
        GetWindowPlacement .hwnd, ip
        ip.showCmd = SW_MAXIMIZE
        SetWindowPlacement .hwnd, ip
    End With
End Sub

Private Sub Form_Load()
Set IE = New InternetExplorer
End Sub
 
Old April 20th, 2005, 01:35 AM
Authorized User
 
Join Date: Jan 2005
Location: Chennai, , India.
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to JelfMaria
Default

Its working only once.When i close ie window and when run again i got error.I got a simple way to do this task,If u want u can ask me that code.

Can u help me to do the same using inetcontrol?






Similar Threads
Thread Thread Starter Forum Replies Last Post
Internet Explorer Bug? bobtrevor HTML Code Clinic 2 May 19th, 2006 09:09 PM
Internet Explorer cannot open the internet site cathiec ASP.NET 2.0 Basics 1 October 22nd, 2005 01:30 PM
XUL and Internet Explorer 6 nick8245 XML 2 September 11th, 2004 12:51 PM
Internet Explorer Issue wndy26 BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 2 June 23rd, 2004 11:11 PM
Closing Internet Explorer mahulda ASP.NET 1.0 and 1.1 Basics 1 April 7th, 2004 08:25 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.