private void TLoginFormLoad(System.Object sender, System.EventArgs e) { /* The following commands are needed to get the input focus after having * displayed the Splash Screen... */ TWindowHandling.SetForegroundWindowWrapper(this.Handle); }
/// <summary> /// todoComment /// </summary> /// <param name="AClosingWindowHandle"></param> public void NotifyWindowClose(IntPtr AClosingWindowHandle) { Int32 keyIndex = WindowRelationship.IndexOfKey((System.Object)AClosingWindowHandle.ToInt64()); if (keyIndex != -1) { IntPtr callerHandle = (IntPtr)((Int64)WindowRelationship.GetByIndex(keyIndex)); // MessageBox.Show('NotifyWindowClose: AClosingWindowHandle: ' + AClosingWindowHandle.ToString + '; callerHandle:' + callerHandle.ToString); // check whether the calling window is Delphi or Progress // System.Windows.Forms.Form callerForm = GetFormByHandle(callerHandle); // set focus to the caller window TWindowHandling.SetForegroundWindowWrapper(callerHandle); TWindowHandling.ShowWindowWrapper(callerHandle, TWindowHandling.SW_SHOW); // remove from list WindowRelationship.Remove((System.Object)AClosingWindowHandle.ToInt64()); } }