EcoStruxure Geo SCADA Expert Forum
Schneider Electric support forum about installation, configuration, integration and troubleshooting of EcoStruxure Geo SCADA Expert (ClearSCADA, ViewX, WebX).
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-02-05 10:49 PM . Last Modified: 2023-05-03 12:17 AM
Hi. Perhaps has somebody a good idea how I can remove or hide the popup close button. This popup was created with the VBscrpt language with the commands "Form.Init()" ... "Form.Show()" I can't find in the help or in the web a solution how I can remove "X". It exists also not form property for hide or an event which occur when I click on "X"
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-02-06 01:07 AM
Here's some code... run it
Form.Init("Test Form")
Form.AddStaticText 10, 10, "Here's a form"
Form.Show()
MsgBox "We definitely returned afterwards"
Now if you click the 'X' and the MsgBox appears then you are wrong.
That means that after pressing the 'X' the control flow does indeed return to your (my) code.
Problem solved.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-02-05 10:54 PM
Unfortunately I don't think this is possible.
This is a VBscript form, so is outside the control of ViewX/ClearSCADA.
There's not really a way that I can think of to hack something similar either. You could always handle the form closing using the 'X' (since the .Show() result will be empty) and re-display the form again.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-02-05 11:11 PM
Thanks for the quick answer!! The problem is when the form opens then there is a variable in the database which is set to 1. If I push the "Cancel" button then the VBscript set this variable to 0. But if I push "X" then there is no chance to modify the variable. It's very pitty.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-02-05 11:17 PM
When the 'X' is pressed, control is still returned to your VBscript.
So you could have your VBscript detect this condition and do the most appropriate thing.
If that's to set your variable to 0, then you could do that, or you could redisplay the form if you really need to try to get them to enter correct values (although this obviously isn't bullet proof, if the user closes ViewX you don't get any valid entry).
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-02-05 11:48 PM
Hey Bevan,
to your last answer:
When the 'X' is pressed, control is still returned to your VBscript.
That's not so. Unfortunately when the "X" was pressed the VBscript execution stopps. There is no part in the script which is after "X" continued.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-02-06 01:07 AM
Here's some code... run it
Form.Init("Test Form")
Form.AddStaticText 10, 10, "Here's a form"
Form.Show()
MsgBox "We definitely returned afterwards"
Now if you click the 'X' and the MsgBox appears then you are wrong.
That means that after pressing the 'X' the control flow does indeed return to your (my) code.
Problem solved.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-02-06 05:42 AM
Hi Bevan,
thank you very much. I'm so happy that it works. My problem was that I have realy long vb scripts and up to day I didn't know that the script continue after form.show(). Also my colleagues doesn't know this. I'll inform them.
Thanks a lot!!!!!!
Best regards
Alois
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.