|
-
Aug 17th, 2000, 05:21 PM
#1
Thread Starter
Junior Member
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
-
Aug 17th, 2000, 05:26 PM
#2
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
-
Aug 17th, 2000, 05:29 PM
#3
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)
-
Aug 17th, 2000, 05:30 PM
#4
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
-
Aug 17th, 2000, 05:32 PM
#5
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)
-
Aug 17th, 2000, 05:34 PM
#6
Junior Member
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).
-
Aug 17th, 2000, 05:36 PM
#7
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
-
Aug 17th, 2000, 05:42 PM
#8
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....
-
Aug 17th, 2000, 05:50 PM
#9
If it's an instance of IE then the class will always be IEFrame.
-
Aug 17th, 2000, 05:53 PM
#10
I dont think he is trying to hide IE, I think he is trying to hide the banner-viewer that free ISPs give you.
-
Aug 17th, 2000, 06:22 PM
#11
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]
-
Aug 17th, 2000, 06:43 PM
#12
I tried it with AltaVista and SpinWay... both of them would come back up.
-
Aug 17th, 2000, 06:55 PM
#13
It's because the advertisements refresh. So the form comes back up, try hiding the advertisement and then the form.
-
Aug 17th, 2000, 07:04 PM
#14
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.
-
Aug 17th, 2000, 07:50 PM
#15
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.
-
Aug 17th, 2000, 07:59 PM
#16
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.
-
Aug 17th, 2000, 08:02 PM
#17
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|