Results 1 to 9 of 9

Thread: r favorites window open

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2000
    Location
    didn't decide yet
    Posts
    222

    r favorites window open

    can i check if favorites r open in the IE window and then close it using any lang

  2. #2
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340
    i don't think so

    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA

  3. #3
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527

    Re: r favorites window open

    Originally posted by tolisss
    can i check if favorites r open in the IE window and then close it using any lang
    do you want to do it thru vb?

  4. #4
    scoutt
    Guest
    so if I went to your site and I wanted to put it in favorites, god knows why, you want to close it as soon as it is open.

    and any language won't talk to it, javascript is the only one that I know of. and you can't close it with that, just open it.

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Jul 2000
    Location
    didn't decide yet
    Posts
    222

    Re: Re: r favorites window open

    Originally posted by da_silvy

    do you want to do it thru vb?
    the lang is not a problem

  6. #6
    It is definitely not possible through JavaScript or a Java applet; an ActiveX control scripted with VBScript would probably work. It would only work in IE, but that's a nonissue considering that IE only has the Favorites pane thingy.

  7. #7
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    Which favorites window do you want to check if opeN?

    i.e.
    Organize Favorites
    Add Favorites?

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Jul 2000
    Location
    didn't decide yet
    Posts
    222
    on IE in the standard toolbar there is a button called favorites i want to close the frame-window that is displayed when u click that window not the add or organize favorites window i want to close the whole Favorites window-frame

  9. #9
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    VB Code:
    1. 'This closes an open Favorites, Search or History frame (they all share the same handle)
    2.  
    3. 'In a module
    4. Public Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" (ByVal hWnd As Long, ByVal Msg As Long, wParam As Any, lParam As Any) As Long
    5. Public Declare Function FindWindow Lib "user32.dll" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
    6. Public Declare Function FindWindowEx Lib "user32.dll" Alias "FindWindowExA" (ByVal hwndParent As Long, ByVal hwndChildAfter As Long, ByVal lpszClass As String, ByVal lpszWindow As String) As Long
    7. Public Const WM_CLOSE = &H10
    8.  
    9. 'wherever you want
    10. 'Code to close window
    11. Dim IEHandle As Long, WindowParent As Long, FavoritesWindow As Long
    12. IEHandle = FindWindow("IEFrame", vbNullString)
    13. WindowParent = FindWindowEx(IEHandle, 0, "BaseBar", vbNullString)
    14. FavoritesWindow = FindWindowEx(WindowParent, 0, "ReBarWindow32", vbNullString)
    15. result = SendMessage(FavoritesWindow, WM_CLOSE, ByVal CLng(0), ByVal CLng(0))

    hope it works for you as well man

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