Skip to main content
InSource Solutions

TN AppSvr 110 Creating a confirmation box from within an ArchestrA Graphic

insource logo large.jpg

 

                       

Description

This tech note walks through an approach for using a windows confirmation box to confirm an action before completing it.

 

  • Author: Joseph Hefner
  • Published: 01/02/2015
  • Applies to: Application Server 3.1 or later

 

Instructions

First create a public custom property in the ArchestrA graphic that can be used in a script to determine whether or not the action should be completed:

 

Capture.JPG

 

Next create a button that uses the Microsoft message box confirmation aa below and capture the result into the Custom Property:

 

Capture2.JPG

 

dim res as System.Windows.Forms.DialogResult;

res = System.Windows.Forms.MessageBox.Show("Do you want to proceed","Confirmation Window",System.Windows.Forms.MessageBoxButtons.YesNo, System.Windows.Forms.MessageBoxIcon.Question);

result = res;

 

-----------------------------------------------------------------------------------------------------------------------

 

When you click on the button at Runtime it will create a confirmation message box as below:

 

 

When "Yes" is selected it will change the custom property at which point you could allow the original requested modification to occur and then set the custom property back to its original value.