C# How to display a message box? - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

C# How to display a message box?

Last post 07-31-2009 08:50 AM by krazykarter. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 07-31-2009 08:25 AM

    C# How to display a message box?

    Hello,

     Two parter, first part is a question that I would like some help with, and the second part is just some advice. I am using C# for the form code.

     1. Is there a way to display a message dialogue box? I am using code to save the form. Since rules are run before the code, I do not want to use a rule to display the message (saying "save successful", or something similar) before the save actually takes place. Any suggestions?

    2. To save the form I am using the "this.Save();" command (the form has already been submitted at this point), and to close the form I am using "Application.Quit();" (I used "this.Close();" but that still left infopath open after closing the form. I want to close infopath completely). Are there any better ways to do this using code?

     

    Thanks in advance.

  • 07-31-2009 08:46 AM In reply to

    Re: C# How to display a message box?

     I'm not that well-versed on saving and closing from code, but for number 1, if you're using the 2007 object model, it's MessageBox.Show(...), just like any Windows Forms app.  In the 2003 object model, it would be thisXDocument.UI.Alert(...)

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 07-31-2009 08:50 AM In reply to

    Re: C# How to display a message box?

    That worked, thanks.

Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.