Results 1 to 17 of 17

Thread: hideing windows

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2000
    Posts
    16

    Question

    Ok i need to know how to hide a window/free access banner which is hidden from ctrl-alt-delete how would i hide it it so that it doesn't pop back up?

    Thanks

  2. #2
    Guest
    If you know the hWnd of it, you can use the ShowWindow API to hide it.

    Code:
    Private Declare Function ShowWindow Lib "user32" Alias "ShowWindow" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
    
    Private Sub Command1_Click()
        ShowWindow Myhwnd, 0
    End Sub

  3. #3
    Guest
    First you have to find the Window. Find it using an api spy. Than hide it. Here is an example showing how to hide or show the taskbar.

    Code:
    Declare Function findwindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
    
    Declare Function showWindow Lib "user32" Alias "ShowWindow" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
    Public Const SW_HIDE = 0
    Public Const SW_SHOW = 5
    Dim progman&
    Dim shelldlldefview&
    Dim syslistview&
    Dim tray&
    
    Hide:
    
    tray& = findwindow("Shell_TrayWnd", vbNullString)
    T = showwindow(tray&, SW_HIDE)
    
    Show:
    
    tray& = findwindow("Shell_TrayWnd", vbNullString)
    T = showwindow(tray&, SW_SHOW)

  4. #4
    Guest
    download my API Spy,
    http://64.82.89.57/
    and find the classname
    then use this code

    Code:
    Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
    Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
    
    Private Const SWP_NOMOVE = &H2
    Private Const SWP_NOSIZE = &H1
    
    Private Sub Command1_Click()
        Dim TheHwnd As Long
    
        TheHwnd = FindWindow("theclassname", vbNullString)
        Call SetWindowPos(TheHwnd, 0, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE Or SWP_HIDEWINDOW)
    End Sub

  5. #5
    Guest
    I dont mean to brag Matthew, but I think my API Spy is much better than patorjk's api spy,
    mine shows all the parent windows, but it doesnt have a code generator(all the button does is popup a window)

  6. #6
    Junior Member
    Join Date
    Mar 2000
    Posts
    29
    Originally posted by Megatron
    If you know the hWnd of it, you can use the ShowWindow API to hide it.

    Code:
    Private Declare Function ShowWindow Lib "user32" Alias "ShowWindow" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
    
    Private Sub Command1_Click()
        ShowWindow Myhwnd, 0
    End Sub
    You can easily find a window's hWnd using FindWindow:

    Code:
    Declare Function FindWindow Lib "user32.dll" Alias "FindWindowA" (ByVal lpClassName As Any, ByVal lpWindowName As Any) As Long
    
    hwnd = FindWindow(CLng(0), "Window Title")  ' look for the window
    If hwnd = 0 Then  ' could not find the window
      Debug.Print "Could not find Window Title."  
    
    Else  
      ' Write your code to hide the window in here
    
    End If
    This code was copy-pasted from http://www.vbapi.com
    The only thing you need with this is the window's title (in the title bar).

  7. #7
    Guest
    Matthew, it's easier to just use FindWindow then to use an API Spy.

    Code:
    Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
    Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
    
    Private Sub Command1_Click()
    
        Dim hPage As Long
        'Get the hWnd of the page
        hPage = FindWindow("IEFrame", "Enter Title Bar Text Here")
        'Hide it
        ShowWindow hPage, 0
        
    End Sub

  8. #8
    Guest
    well you have to use an API Spy to get the class name.
    and a lot of times the banner ads dont have captions...
    so you pretty much HAVE TO use an API spy to get the classname.

    and I tried to hide the banner's once from a free ISP..
    every time you hide it, it reappears, i think it has a timer that keeps making it visible....

  9. #9
    Guest
    If it's an instance of IE then the class will always be IEFrame.

  10. #10
    Guest
    I dont think he is trying to hide IE, I think he is trying to hide the banner-viewer that free ISPs give you.

  11. #11
    Guest
    Megatron Matthew, it's easier to just use FindWindow then to use an API Spy.
    Megatron, what if you didn't know the class? As Dennis said.

    Or even the title, than how would you find it by not knowing it?
    That's where an api spy comes in.
    I'm sure he doesn't know the Free ISPs Banner, so he has to use an Api Spy to find it.

    Microslip, what free isp are you using?

    [Edited by Matthew Gates on 08-17-2000 at 08:54 PM]

  12. #12
    Guest
    I tried it with AltaVista and SpinWay... both of them would come back up.

  13. #13
    Guest
    It's because the advertisements refresh. So the form comes back up, try hiding the advertisement and then the form.

  14. #14
    Guest
    Matthew: Banner's that appear are part of the CabinetWClass. Also, if you are distributing this kind of program, telling the user to use an API Spy to get the classname defeats whole purpose of it.

  15. #15
    Guest
    I'm not distributing anything. What do they use to view the banners anyway? Webbrowser? Can that not be hidden? I thought it could. Anyway, it is illegal activity, really, to hide a banner when it's suppose to be viewed. (I should talk :-x), well I'm off this subject now, I won't say more.

  16. #16
    Guest
    what is CabinetWClass?
    and he's not telling the user to use an API Spy,
    the creator just needs it so he can get the initial class name.
    and any programmer that uses API Should have a good API Spy, and I think mine is pretty damn good, I have two versions out now

    http://64.82.86.58


    version one outputs like this

    Code:
    class 0
    ..class 1
    ....class 2
    hwnd 0
    ..hwnd 1
    ....hwnd 2
    caption 0
    ..caption 1
    ....caption 2
    version two outputs like this

    Code:
    class 0
    hwnd 0
    caption 0
    ..class 1
    ..hwnd 1
    ..caption 1
    ....class 2
    ....hwnd 2
    ....caption 2
    its a matter of what you like better...

    BTW both are available at my IP,
    when I get some time, and a good webspace provider(geocities sucks) I will offer them to download at a static URL.

  17. #17
    Guest
    Matthew:

    yeah its illegal, but if you get cought, all you get is a slap on the wrist(terminated account)
    but if you get cought cheating(lots and lots of clicks) something like alladvantage, you are probably gonna get into some amount of real trouble.

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