Welcome to the new Schneider Electric Community

It's your place to connect with experts and peers, get continuous support, and share knowledge.

  • Explore the new navigation for even easier access to your community.
  • Bookmark and use our new, easy-to-remember address (community.se.com).
  • Get ready for more content and an improved experience.

Contact SchneiderCommunity.Support@se.com if you have any questions.

Close
Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
84579members
353849posts

Hide or Remove the form close button "X"

EcoStruxure Geo SCADA Expert Forum

Find out how SCADA systems and networks, like EcoStruxure Geo SCADA Expert, help industrial organizations maintaining efficiency, processing data for smarter decision making with IoT, RTU and PLC devices.

Solved
Ali80
Ensign Ensign
Ensign
0 Likes
6
2757

Hide or Remove the form close button "X"

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"

Popup Window.JPG


Accepted Solutions
BevanWeiss
Spock
Spock
1
2743

Re: Hide or Remove the form close button "X"

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.


Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..

See Answer In Context

6 Replies 6
BevanWeiss
Spock
Spock
0 Likes
5
2755

Re: Hide or Remove the form close button "X"

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.


Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..
Ali80
Ensign Ensign
Ensign
0 Likes
4
2753

Re: Hide or Remove the form close button "X"

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.

BevanWeiss
Spock
Spock
0 Likes
3
2750

Re: Hide or Remove the form close button "X"

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).

 

 


Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..
Ali80
Ensign Ensign
Ensign
0 Likes
2
2746

Re: Hide or Remove the form close button "X"

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.

BevanWeiss
Spock
Spock
1
2744

Re: Hide or Remove the form close button "X"

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.


Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..
Ali80
Ensign Ensign
Ensign
0 Likes
0
2735

Re: Hide or Remove the form close button "X"

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