<?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 VbScript MsgBox vs. Arcpad Application.MessageBox in ArcPad Questions</title>
    <link>https://community.esri.com/t5/arcpad-questions/vbscript-msgbox-vs-arcpad-application-messagebox/m-p/140970#M964</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have always scripted using either the vbScript msgbox or the Arcpad MessageBox interchangeably with no particular preference.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;At the moment I'm scirpting an Arcpad 8 project and have just noticed that the Application.MessageBox dialog is not modal - you can click on another object on the screen and it will loose focus.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Luckily the VbScript MsgBox is modal and seems to work fine in its place.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyone know if this is by design? Has it been fixed in 10?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;An example is to paste the following code into a Script dialog and run it with either code. Click on the Script dialog when the message box dialog is displayed to see if its modal.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;'VbScript Sub OnFormCancel&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Dim bResult &amp;nbsp;&amp;nbsp;&amp;nbsp; ' comment out either line below to compare messagebox/msgbox behaviour&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; bResult = Application.MessageBox ("Are you sure you want to cancel?", apYesNo, "Cancel?") &amp;nbsp;&amp;nbsp;&amp;nbsp; 'bResult = msgbox ("Are you sure you want to cancel?", apYesNo, "Cancel?")&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; If bResult = apNo Then &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ThisEvent.Result = False &amp;nbsp;&amp;nbsp;&amp;nbsp; End If &amp;nbsp;&amp;nbsp;&amp;nbsp; If bResult = apYes Then &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ThisEvent.Result = True &amp;nbsp;&amp;nbsp;&amp;nbsp; End If End Sub&amp;nbsp; Call OnFormCancel&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 May 2012 09:41:31 GMT</pubDate>
    <dc:creator>SteveFitzgerald</dc:creator>
    <dc:date>2012-05-08T09:41:31Z</dc:date>
    <item>
      <title>VbScript MsgBox vs. Arcpad Application.MessageBox</title>
      <link>https://community.esri.com/t5/arcpad-questions/vbscript-msgbox-vs-arcpad-application-messagebox/m-p/140970#M964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have always scripted using either the vbScript msgbox or the Arcpad MessageBox interchangeably with no particular preference.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;At the moment I'm scirpting an Arcpad 8 project and have just noticed that the Application.MessageBox dialog is not modal - you can click on another object on the screen and it will loose focus.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Luckily the VbScript MsgBox is modal and seems to work fine in its place.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyone know if this is by design? Has it been fixed in 10?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;An example is to paste the following code into a Script dialog and run it with either code. Click on the Script dialog when the message box dialog is displayed to see if its modal.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;'VbScript Sub OnFormCancel&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Dim bResult &amp;nbsp;&amp;nbsp;&amp;nbsp; ' comment out either line below to compare messagebox/msgbox behaviour&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; bResult = Application.MessageBox ("Are you sure you want to cancel?", apYesNo, "Cancel?") &amp;nbsp;&amp;nbsp;&amp;nbsp; 'bResult = msgbox ("Are you sure you want to cancel?", apYesNo, "Cancel?")&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; If bResult = apNo Then &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ThisEvent.Result = False &amp;nbsp;&amp;nbsp;&amp;nbsp; End If &amp;nbsp;&amp;nbsp;&amp;nbsp; If bResult = apYes Then &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ThisEvent.Result = True &amp;nbsp;&amp;nbsp;&amp;nbsp; End If End Sub&amp;nbsp; Call OnFormCancel&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2012 09:41:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/vbscript-msgbox-vs-arcpad-application-messagebox/m-p/140970#M964</guid>
      <dc:creator>SteveFitzgerald</dc:creator>
      <dc:date>2012-05-08T09:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: VbScript MsgBox vs. Arcpad Application.MessageBox</title>
      <link>https://community.esri.com/t5/arcpad-questions/vbscript-msgbox-vs-arcpad-application-messagebox/m-p/140971#M965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Steve,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I doubt that this was either by intentional design or a bug. The biggest reason I know to use the Application.Messagebox is that it will work on any platform or scripting language rather than msgbox for vbScript and MessageBox() for jScript.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Gareth&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2012 22:10:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/vbscript-msgbox-vs-arcpad-application-messagebox/m-p/140971#M965</guid>
      <dc:creator>GarethWalters</dc:creator>
      <dc:date>2012-05-10T22:10:05Z</dc:date>
    </item>
    <item>
      <title>Re: VbScript MsgBox vs. Arcpad Application.MessageBox</title>
      <link>https://community.esri.com/t5/arcpad-questions/vbscript-msgbox-vs-arcpad-application-messagebox/m-p/140972#M966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Would be great to enhance the MessageBox function to include a flag so the developer could use this to indicate if the dialog should be modal or not.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rolf&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 May 2012 06:05:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/vbscript-msgbox-vs-arcpad-application-messagebox/m-p/140972#M966</guid>
      <dc:creator>RolfBroch</dc:creator>
      <dc:date>2012-05-11T06:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: VbScript MsgBox vs. Arcpad Application.MessageBox</title>
      <link>https://community.esri.com/t5/arcpad-questions/vbscript-msgbox-vs-arcpad-application-messagebox/m-p/140973#M967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for clarifying that Gareth.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;STeve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 May 2012 09:36:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/vbscript-msgbox-vs-arcpad-application-messagebox/m-p/140973#M967</guid>
      <dc:creator>SteveFitzgerald</dc:creator>
      <dc:date>2012-05-12T09:36:46Z</dc:date>
    </item>
  </channel>
</rss>

