In PInvoke.NET you'll find an instructive note saying:
"You can avoid using FindWindow which is a native code by calling a combination of Process.GetProcessesByName and Process.MainWindowHandle."
The example given is somewhat like (using System.Diagnostics):
Process[] processes = Process.GetProcessesByName("notepad");
foreach (Process p in processes) {
IntPtr pFoundWindow = p.MainWindowHandle;
...
}
The point is:
Avoid API calls wherever possible -- especially these days: whereas this was not so much an issue in ASP.NET and Winform apps (we could always fiddle CAS for more rights), I think that with API calls being unportable/impossible in Silverlight, this is going to quickly become an issue.
Coders (such as me...) who relied on API's to get around shortcomings of NET 1.1 and NET 2.0 will be looking at the problems a second time, trying to figure out ways to do in NET only, hoping that some safe wrappers were added in NET 3.0/3.5...