How Do you get a windows class name
Printable View
How Do you get a windows class name
use an api spy - vb has one called spy++
You have to use an API Spy to get it. Here is the link to download Patorjk's api spy.
If you would rather get it yourself, check out the GetClassName api.
you can download my api spy!
its called CSpy.zip or CSpy2.zip
the only difference is the way the thing is displayed.
I like version 1 better.
http://64.82.89.52
I really think I need to quibble here. So many people who are supposed to be good at this sort of thing are calling it an API Spy. It isn't. Technically, an API spy would tell you all the functions in a DLL. This is just a Window Spy.
Sorry to be causing trouble, but I've seen them called this a lot, and it's wrong. :(
i'm not one of those people who are supposed to be good at this sort of thing ... lol
parksie: Do you know where I can get a Real API spy (or DLL viewer, whatever you call it)?
I really don't think you can. The problem is, DLLs don't have a well-defined 'contents list'. The only real way to know what's in there is by having the header file for it. I have tried and failed to find function definitions for DLLs, but it is extremely difficult.
Parksie, I know its not really called an API Spy, but if I called it a Handle spy, nobody would know what I was talking about,
I do have a Real API Spy, it spy's on all the functions from what dll's a certain program uses, its shareware though, and I dont use it enough to buy.
I downloaded it from http://www.download.com and I searched for "API Spy".
Use GetClassName
Code:Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
Private Sub Command1_Click()
Dim sClass As String
sClass = Space(255)
nChar = GetClassName(Command1.hwnd, sClass, 255)
Print Left(sClass, nChar)
End Sub