public SAPPopUpPrompt(string ServerName, string DBName) { // // Required for Windows Form Designer support // InitializeComponent(); textBoxServer.Text = ServerName; textBoxDBName.Text = DBName; CancelWasPressed = false; MicroSoftWindows.WindowWrapper oWindow = new MicroSoftWindows.WindowWrapper(); ShowDialog(oWindow); // // TODO: Add any constructor code after InitializeComponent call // }
public static Boolean MessageSHOW(string sTxt) { // display the Message // if in DI mode, do not show the message if (LIBDI.scUIDI == "DI") { return(true); } IntPtr ptr = MicroSoftWindows.GetForegroundWindow(); MicroSoftWindows.WindowWrapper oWindow = new MicroSoftWindows.WindowWrapper(ptr); try { MicroSoftWindows.SetForegroundWindow(ptr); MessageBox.Show(oWindow, sTxt, "ERROR IN ADD-ON"); } catch (Exception ex) { //if (TFCLIB_DI.scUIDI == "UI") //{ //Interaction.MsgBox("(MessageSHOW) " + Err().Number.ToString() + " " + Err().Description + Environment.NewLine + sTxt); MessageBox.Show("(MessageSHOW) " + ex.Message + Environment.NewLine + sTxt); //} //else //{ // //MessageLOG("(MessageSHOW) " + Err().Number.ToString() + " " + Err().Description + Environment.NewLine + sTxt); // MessageBox.Show("(MessageSHOW) " + ex.Message + Environment.NewLine + sTxt); //} } //If Not oWindow Is Nothing Then System.Runtime.InteropServices.Marshal.ReleaseComObject(oWindow) ' causes an error GC.Collect(); return(true); }