|
-
May 15th, 2002, 10:13 AM
#1
Thread Starter
Frenzied Member
How do you close IE from VB ?
This could end up being the most stupid question I have ever posted, but here goes .............
If the following line of code opens IE (which it does), how do I then close IE ?
I tried the obvious of duplicating the line and changing "Open" to "Close", but nope.
VB Code:
OpenPage = ShellExecute(Form1.hwnd, "Open", "C:\test.html", 0&, 0&, 0&)
So, am I being dull ?
-
May 15th, 2002, 10:25 AM
#2
Fanatic Member
I don't think that you are being dull (or if so then that makes 2 of us!)
I think you will need to use the TerminateProcess API but I don't have any sample code handy for this
-
May 15th, 2002, 10:28 AM
#3
Fanatic Member
-
May 15th, 2002, 10:31 AM
#4
Thread Starter
Frenzied Member
Cheers Martin.
I found some code eventually, and its simpler, thus :
VB Code:
Set ie = CreateObject("InternetExplorer.Application")
ie.Navigate ("www.btopenworld.com")
ie.Visible = True
ie.Top = 0
ie.Left = 0
ie.Height = 600
ie.Width = 800
ie.quit
Set ie = Nothing
Thanks for your help
-
May 15th, 2002, 10:32 AM
#5
Fanatic Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|