|
-
Mar 20th, 2000, 11:25 PM
#1
Thread Starter
Hyperactive Member
Hi,
i need to close the browser(IE) from my VB application.
KenX had said that I could use the code:
SendKeys "%{F4}", True
to close the browser.
but, I can't igure out where Im to use this code..... ive used
sendkeys "{HOME}+{END}"
to highlight the text in a textbox......(i used this code in the GotFocus event of the textbox)...
but as for
SendKeys "%{F4}", True
Im afraid im stuck..... :-( please help me out here.....
Thanks a ton,
Ramya.
-
Mar 21st, 2000, 02:27 AM
#2
Junior Member
You can't send Alt + F4 because it will close your own app, unless you manege to set the focus on the IE!
The best way is to find the IE window and close it!
I don't know how that window is called but
if you know the IE handle, use:
Code:
Public Declare Function CloseWindow Lib "user32" Alias "CloseWindow" (ByVal hwnd As Long) As Long
If you don't know the handle, tell me that i will help you!
Is the IE called by your app?
Do you know the IE Window name?
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
|