 |
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
|
|
|

April 11th, 2005, 06:56 AM
|
Authorized User
|
|
Join Date: Jan 2005
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Internet Explorer
 hi,
How to open an internet explorer in maximized state while using MS internet control reference in vb6 ?
Thanks
Jelf
__________________
Thanks
Jelfy
|

April 11th, 2005, 01:36 PM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
in design mode, just set the WindowState of the form hosting the internet control to 2 (vbMaximized), the default is zero (normal)
Marco
|

April 13th, 2005, 06:41 AM
|
Authorized User
|
|
Join Date: Jan 2005
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
 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
|

April 15th, 2005, 04:48 AM
|
Authorized User
|
|
Join Date: Jan 2005
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Pls can anyone help me in doing this?
|

April 15th, 2005, 12:46 PM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
In the Form_Resize event, change the size of the IE control to fit the form
Marco
|

April 16th, 2005, 01:59 AM
|
Authorized User
|
|
Join Date: Jan 2005
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|

April 18th, 2005, 11:56 AM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|

April 19th, 2005, 05:16 AM
|
Authorized User
|
|
Join Date: Jan 2005
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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?
|

April 19th, 2005, 02:00 PM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|

April 20th, 2005, 01:35 AM
|
Authorized User
|
|
Join Date: Jan 2005
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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?
|
|
 |