<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: MessageBox always returns OK in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/messagebox-always-returns-ok/m-p/1094054#M7089</link>
    <description>&lt;P&gt;The ArcGIS Pro API's MesssageBox.Show method returns the same result as the MessageBox method in .Net.&amp;nbsp; According to the .Net documentation these are the results that are returned (depending on the type of MessageBox):&lt;/P&gt;&lt;P&gt;Show returns a MessageBoxResult value that specifies which button on a message box a user clicked. MessageBoxButton specifies which buttons are displayed on a message box.&lt;/P&gt;&lt;P&gt;The result value that is returned from a message box depends on what buttons the message box has and how a user closes a message box:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;On a message box that has an OK button, OK is returned if a user clicks the OK button, clicks the Close button in the title bar, or presses the ESC key.&lt;/LI&gt;&lt;LI&gt;On a message box that has an OK button and a Cancel button, OK is returned if a user clicks the OK button. If a user clicks the Cancel button or the Close button in the title bar, Cancel is returned.&lt;/LI&gt;&lt;LI&gt;On a message box that has a Yes button and a No button, the Close button in the title bar is disabled. Consequently, Yes is returned if a user clicks the Yes button, and No is returned if a user clicks the No button.&lt;/LI&gt;&lt;LI&gt;On a message box that has a Yes button, a No button, and a Cancel button, Yes is returned if the Yes button is clicked and No is returned if the No button is clicked. If a user clicks the Cancel button or the Close button in the title bar, Cancel is returned.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;See:&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/dotnet/api/system.windows.messageboxresult?view=net-5.0" target="_self"&gt;https://docs.microsoft.com/en-us/dotnet/api/system.windows.messageboxresult?view=net-5.0&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 31 Aug 2021 16:28:55 GMT</pubDate>
    <dc:creator>Wolf</dc:creator>
    <dc:date>2021-08-31T16:28:55Z</dc:date>
    <item>
      <title>MessageBox always returns OK</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/messagebox-always-returns-ok/m-p/1093974#M7088</link>
      <description>&lt;P&gt;The defaultResult of MessageBox didn't work for me. It was always 'OK'!&lt;/P&gt;&lt;P&gt;I tried to show a MessageBox with the NONE-Result (or CANCEL) as the defaultRersult:&lt;/P&gt;&lt;P&gt;Arc.MessageBox.Show("msg", "title",MessageBoxButton.OK, someIcon, MessageBoxResult.Cancel/None)&lt;BR /&gt;Now even clicking on "X" (up right in the box), the OK was returned!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Running Pro 2.7.2&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 13:24:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/messagebox-always-returns-ok/m-p/1093974#M7088</guid>
      <dc:creator>ghefarm</dc:creator>
      <dc:date>2021-08-31T13:24:58Z</dc:date>
    </item>
    <item>
      <title>Re: MessageBox always returns OK</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/messagebox-always-returns-ok/m-p/1094054#M7089</link>
      <description>&lt;P&gt;The ArcGIS Pro API's MesssageBox.Show method returns the same result as the MessageBox method in .Net.&amp;nbsp; According to the .Net documentation these are the results that are returned (depending on the type of MessageBox):&lt;/P&gt;&lt;P&gt;Show returns a MessageBoxResult value that specifies which button on a message box a user clicked. MessageBoxButton specifies which buttons are displayed on a message box.&lt;/P&gt;&lt;P&gt;The result value that is returned from a message box depends on what buttons the message box has and how a user closes a message box:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;On a message box that has an OK button, OK is returned if a user clicks the OK button, clicks the Close button in the title bar, or presses the ESC key.&lt;/LI&gt;&lt;LI&gt;On a message box that has an OK button and a Cancel button, OK is returned if a user clicks the OK button. If a user clicks the Cancel button or the Close button in the title bar, Cancel is returned.&lt;/LI&gt;&lt;LI&gt;On a message box that has a Yes button and a No button, the Close button in the title bar is disabled. Consequently, Yes is returned if a user clicks the Yes button, and No is returned if a user clicks the No button.&lt;/LI&gt;&lt;LI&gt;On a message box that has a Yes button, a No button, and a Cancel button, Yes is returned if the Yes button is clicked and No is returned if the No button is clicked. If a user clicks the Cancel button or the Close button in the title bar, Cancel is returned.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;See:&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/dotnet/api/system.windows.messageboxresult?view=net-5.0" target="_self"&gt;https://docs.microsoft.com/en-us/dotnet/api/system.windows.messageboxresult?view=net-5.0&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 16:28:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/messagebox-always-returns-ok/m-p/1094054#M7089</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2021-08-31T16:28:55Z</dc:date>
    </item>
  </channel>
</rss>

