I'm Trying to Code something that tells whether a certain other app is running (not mine) and i have no idea what classname is, if anyone can give me some idea or working code please do so
I'm Trying to Code something that tells whether a certain other app is running (not mine) and i have no idea what classname is, if anyone can give me some idea or working code please do so
What app are you talking about? Is the problem that you don't know the classname or do you want the code to find the app (that needs the classname), or Both?
If you know the window caption of the app then just use FindWindow to establish if it is running.
and I'm looking to check if the window is there i dont have any clue what classnames are tho
Do this my friend!
Hit Control-Alter-Delete and check for the name of the application you closing.
Go back into your codes and use the function
On Error Resume Next
AppActivate "Program Name"
If err.number <>0 then ?????
If it returns an error that means the application is not open.
See Ya
Hi there...
Well mate, Nitro is pretty much ontrack.. However it may NOT work if the App is already activated.. that is if the app in questions window is the top level window.. then u may have a problem... so we're back to kedaman's question what exactly is your problem?? not knowing the class name or do u want code??
Cheers
So much hullabaloo for nothing- Use these to get the active windows classname:
Declare Function GetForegroundWindow Lib "user32" () As Long
Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long