I want pre approval pop up when I press any command.

hello everyone! I want pre approval pop up when I press any command. but i can not able to get the results. I am using YES_NO Function. Can anyone help me. It's urgent. Thanks in advance.

Parents
  • Hi Asadullah, We need some more context to help you here.

    Is it Industrial Graphics based products you are using? InTouch, OMI, etc?

    If so, here is an example of how I have solved it in similar scenarios in Industrial Graphics, it requires the script function library System.Windows.Forms.dll to be imported in your galaxy/application though. 
    If you do not know from where, please use the following location
    (C:\Program Files (x86)\ArchestrA\Framework\Bin\Microsoft_Corporation__System.Windows.Forms.dll)

    Here is the example code to use in graphics (animation script).

    dim DialogResult as System.Windows.Forms.DialogResult;
    'DialogResult = System.Windows.Forms.MessageBox.Show("Are you sure?","Prompt for reply...",System.Windows.Forms.MessageBoxButtons.YesNo);
    DialogResult = System.Windows.Forms.MessageBox.Show("Are you sure?","Prompt for reply...",System.Windows.Forms.MessageBoxButtons.YesNoCancel);
    if DialogResult == System.Windows.Forms.DialogResult.Yes then
    	'User selected Yes
    	LogMessage("Yes");
    elseif DialogResult == System.Windows.Forms.DialogResult.No then
    	'User clicked No
    	LogMessage("No");
    else
    	'User clicked cancel or closed dialog box (if possible).
    	LogMessage("Cancel");
    endif;

    Example with Yes, No and Cancel

    Example with Yes, No only.

Reply
  • Hi Asadullah, We need some more context to help you here.

    Is it Industrial Graphics based products you are using? InTouch, OMI, etc?

    If so, here is an example of how I have solved it in similar scenarios in Industrial Graphics, it requires the script function library System.Windows.Forms.dll to be imported in your galaxy/application though. 
    If you do not know from where, please use the following location
    (C:\Program Files (x86)\ArchestrA\Framework\Bin\Microsoft_Corporation__System.Windows.Forms.dll)

    Here is the example code to use in graphics (animation script).

    dim DialogResult as System.Windows.Forms.DialogResult;
    'DialogResult = System.Windows.Forms.MessageBox.Show("Are you sure?","Prompt for reply...",System.Windows.Forms.MessageBoxButtons.YesNo);
    DialogResult = System.Windows.Forms.MessageBox.Show("Are you sure?","Prompt for reply...",System.Windows.Forms.MessageBoxButtons.YesNoCancel);
    if DialogResult == System.Windows.Forms.DialogResult.Yes then
    	'User selected Yes
    	LogMessage("Yes");
    elseif DialogResult == System.Windows.Forms.DialogResult.No then
    	'User clicked No
    	LogMessage("No");
    else
    	'User clicked cancel or closed dialog box (if possible).
    	LogMessage("Cancel");
    endif;

    Example with Yes, No and Cancel

    Example with Yes, No only.

Children