Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
Password Reminder
Register
| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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
Reply With Quote
  #2 (permalink)  
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
Reply With Quote
  #3 (permalink)  
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

Reply With Quote
  #4 (permalink)  
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?

Reply With Quote
  #5 (permalink)  
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
Reply With Quote
  #6 (permalink)  
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

Reply With Quote
  #7 (permalink)  
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
Reply With Quote
  #8 (permalink)  
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?

Reply With Quote
  #9 (permalink)  
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
Reply With Quote
  #10 (permalink)  
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?


Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 03:06 AM.


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