Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing Window Class names...

Status
Not open for further replies.

WhiteTiger

Programmer
Jun 26, 2001
605
US
Whenever I check this out w/ spy software, I notice that all my VB produced applications have the class name 'ThunderForm' or something like that...(I forgot exactly what it says)...is there a way to change this w/ an API call? ----------------------------------------
The Learning process is just a way to get rid of all the stupids in your head.

Now where's that cute kitten? ;-)
 
Every application built in Visual Basic 5.0 has a hidden, run-time-only window which is in fact the top-level window for that app. Thus, even when an application has several "main" windows, this top-level window can be used to interact with the program as a whole. Its class name is "ThunderRT5Main"* (Thunder was the original code name for VB) and its text string is the Application Title (specified in Project Properties before you compile). This is the window you want to subclass and/or send messages to.

* If the application was built in Visual Basic 4.0 or earlier, its class name will be "ThunderRTMain". Furthermore, if it is running under VB (not compiled), any version, its class name will be "ThunderMain."

To obtain the handle of this window, you can use either the FindWindow API function, if you know that only one instance of the app is running, or EnumWindows if you think there might be several instances. Once you've located the window, you can start using it.

check out this site for some more info
 
Question: before you go around trying to change window class names, do you have a reason for wanting to do so?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top