locked
PowerShell $Form.ShowDialaog Problem RRS feed

  • Question

  • Hi Everbody

    I'm new to Powershell. I have downloaded  a sample code Snippet, for testing purpose. Now i get stucked whit a very silly Problem.

    i have manged to load my Form(not very difficult) but at point of closing that $Form, it wont close, only if you provide a button to this $Form and after pressing the button.  Actually i want to close this $form based on a condition. Like if my background color changes to red, then close or let it open until the bg-color changes.

    i Just noticed, that when you use $Form.ShowDialaog, the Form waits until a user interaction happens to the $Form. Wich event can i use to acomplish my task whitout a user interaction.  i don't want a use the button for the form. So this $Form should close based on conditions and not at the user interaction.

    i hope its clear whats my problem is. would be nice, if somebody could point me the correct Event which i should use.

    kind regards

    Suren

     


    Friday, February 11, 2011 4:35 PM