private bool EnumWindowsFindKinectStudio(IntPtr hWnd, int lParam)
{
if (hWnd == IntPtr.Zero)
return true; // Not a window
int buffer = win32API.GetWindowTextLength(hWnd);
if (buffer == 0)
{
return true;
}
StringBuilder title = new StringBuilder(buffer + 1);
win32API.GetWindowText(hWnd, title, title.Capacity);
if (title == null)
{
return true;
}
if (title.ToString().Contains("Kinect Studio"))
{
this.hWnd = hWnd;
return false;
}
return true;
}