Cancel
Showing results for 
Search instead for 
Did you mean: 

How to stop some PS functionality while custom Userform is active?

Valued Contributor
Valued Contributor

I'm creating a new function through the API.  Part of the responsibility of the function is to gather a list of operations from the open PS session and populate a userform with this data.  However, when the userform is still active, I see that you can still go and add/delete/modify the operations in PS.  Is there a way to halt this behavior from happening while the command is still active / while the the userform is still displayed?  Any help would be appreciated, thanks.

1 REPLY

Re: How to stop some PS functionality while custom Userform is active?

Valued Contributor
Valued Contributor

Okay, found my own solution.  It would help if I had speakers when watching the "how to" videos.  Smiley Happy

 

Answer is:  Make sure that the form is a TxForm and not a windows Form.  The TxForm has an added property SemiModal, which when true does exactly what I want.