I have developed a Windows Service in VS2010 which is running on Windows7. I am trying to get "MainWindowTitle" but it returns empty.
lObj_Process = Process.GetProcessById(Pi_ProcessID)
lObj_Process.MainWindowTitle
If same service runs on Windows XP, title is found so it is not a Windows Service restriction.
Moreover if I use the same code in windows application rather than service then it returns proper title.
Please note that Service is reading/writing files so there should be no privileges issue.
Question:
Why "MainWindowTitle" property works fine for windows application but returns empty if used in Windows Service.
Regards,
Immi