Results 1 to 2 of 2

Thread: Help needed!!!!

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    India
    Posts
    298
    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.

  2. #2
    Junior Member
    Join Date
    Mar 2000
    Posts
    28
    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
  •  



Click Here to Expand Forum to Full Width