"null" is probably wrong as there will be no windows classes called "null". You probably want an empty string "" instead. However this should not cause a compile time error, and in fact
If dzhw.GetWindowHandle("null", "Rekenmachine") > 0 Then
....
End If
compiles and runs fine for me in both legacy and optimised compilers. Are you sure there isn't a typo, like a missing quote, in the GetWindowHandle line?
|