/ Forums / Advansys Formativ / Creating Solutions with Formativ / Using GroupWise.CloseWindow() to close a message window

  • Creator
    Topic
  • #4293
    jcromwijk
    Participant

      Hi,

      I am using GroupWise.CloseWindow() to close a e-mailmessage window in Groupwise.

      But when I am using 2 mainwindows in Groupwise, then also one of the 2 mainwindows is closed.

      Is there a way I can prevent this behaviour?

      Thanks,
      Jan Cromwijk

    • Author
      Replies
    • #7751
      Support 3
      Participant

        Groupwise.CloseWindow() closes the current window. You need to make sure when calling this method, the e-mail message window is the activate the window. Here is a sample code to set the e-mail message as active window:

          
          iHandle = Utilities.FindWindow("OFMailView","")
          if (iHandle > 0) then
            utilities.SetForegroundWindow(iHandle)
            GroupWise.CloseWindow()
          end if
        

        Please note, attempting to close GroupWise from a C3PO (i.e. Formativ) either did not work or resulted in unpredictable behavior. See the forum post “How to shut down GroupWise?” for more information.

        Regards,
        Advansys Support

        #7750
        jcromwijk
        Participant

          Thanks, I think this will work.

          After testing I will let you know the result.

          Greetings,
          Jan Cromwijk

          #7752
          Support 3
          Participant

            Thanks for your feedback.

            Regards,
            Advansys Support

          Viewing 3 replies - 1 through 3 (of 3 total)
          • You must be logged in to reply to this topic.