Powershell Form Builder

It was difficult to find some GUI Builder for me, so I've thought, that it is an good idea, to make one.Sapien Tools offers us "Primal Tools (community edition)" for free, but then we  have no permissions, to make commercial "solutions". In other cases should we buy Powershell

 
 
 
 
 
4.6 Star
(9)
Add to favorites
4/24/2015
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Wanted to say Thanks1
    1 Posts | Last post July 26, 2018
    • Thanks so much for this Z.Alex, this has made my life easier and I ended up using your script as the foundation for mine. 
      
      https://frontrunnertek.com/2018/07/26/powershell-gui-studio-posh/
      
      Added an import function, nested controls, property add/remove, etc.
      
      Thanks again!
  • Improvement Suggestion for Initial Positioning of Components
    2 Posts | Last post October 13, 2017
    • To help with the initial positioning of added components, I suggest the following:
      
      Create a Global Variable and place at top of script such as: 
      
      $Global:NextItemTop = 20
      
      In the "function Add-Element", Replace 
          $mPropertiesArr += Add-Property 'Top' 5
      with
          $mPropertiesArr += Add-Property 'Top' $Global:NextItemTop
          $Global:NextItemTop += 26
      
      That will position the next element below the previous one instead of overlaying the first element.
      
      
    • Elias thanks for sharing this.  Great addition.
  • You can easily extend this script with new controls...
    2 Posts | Last post October 13, 2017
    • This is an example of adding the MaskedTextBox (Password style) Control.
      
      If the control has any properties that are not covered by the global properties, add an if statement to the AddElement Function:
      
      if ( $mControlType.SelectedItem -eq 'MaskedTextBox'){
              $mPropertiesArr+= AddProperty 'PasswordChar' '*' 
      }
      
      Inside the AddControl Function, add a line that represents the new control:
      "MaskedTextBox"  {$mReturnControl = New-Object System.Windows.Forms.MaskedTextBox} 
      
      Finally, in the main script code (after all the Function definitions), add the new control to the list of controls (to populate the drop-down box):
      $mControlType.Items.Add("MaskedTextBox"
    • Nice addition Brett.  I added this.  Do you know how to add a toggle button?
  • Add Actions
    1 Posts | Last post October 13, 2017
    • Thanks for sharing this.  It is an elegant solution.  Is it possible to add a third panel to assign events to a control such as Click for buttons, checkedchanged for check boxes etc?  
      
      This one may be wishful thinking, but can you show how to add a toggle button?  I can only find C# references and am unsure how to add it to PowerShell.
  • PowerShell Form Designer
    1 Posts | Last post November 25, 2016
    • Hi Z.Alex,
      first of all thank you for an original idea!
      
      Inspired by this I modified your script.
      Now more usability.
      Now can open and edit the shape you created earlier.
      https://bitbucket.org/mozers/powershell-formdesigner
  • All the points
    1 Posts | Last post October 03, 2016
    • This script is quick a does just what I need it to do.  I used to waste so much time manually coding and tweaking sizes and x/y coordinates when making forms.  Thanks for your time.
  • Delete a component lead to issues
    1 Posts | Last post October 27, 2015
    • Hi Z.Alex,
      
      first of all thank you for sharing. It's an interesting script !
      
      I think there is an issue with the DELETE button as once I clicked on it, I can't add new objects anymore and exceptions are thrown.
      
      By the way, is there a way to add tabbed panels ?
  • How to attach c# functions
    2 Posts | Last post May 15, 2015
    • Hi,
      
      This looks great, but can you assign c#/.net functions to this? or is it designed to be used solely within PS?
      
      Andy.
    • What are you mean with "can you assign c#/.net functions" ?