private SWF.Form GetForm( SWF.Control windowHandle )
{
SWF.Control tmp = windowHandle;
if ( windowHandle == null )
return null;
if ( tmp is SWF.Form )
return (SWF.Form)tmp;
do
{
tmp = tmp.Parent;
} while ( !( tmp is SWF.Form ) );
return (SWF.Form)tmp;
}