Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/teeotsa/easyform
Easily create PowerShell GUIs with cmdlets!
https://github.com/teeotsa/easyform
easy gui powershell powershell-gui
Last synced: 10 days ago
JSON representation
Easily create PowerShell GUIs with cmdlets!
- Host: GitHub
- URL: https://github.com/teeotsa/easyform
- Owner: teeotsa
- License: mit
- Created: 2022-01-17T21:25:59.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-19T12:23:29.000Z (about 3 years ago)
- Last Synced: 2024-11-14T12:46:12.589Z (2 months ago)
- Topics: easy, gui, powershell, powershell-gui
- Language: PowerShell
- Homepage:
- Size: 7.81 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Easy-Form
EasyForm allows you to create PowerShell GUIs easily without any messy code!
# Examples
Some of the examples are listed down below to help you create anything with this module!
```powershell
#--- Import Custom Module ---#if (Test-Path (Join-Path -Path $PSScriptRoot -ChildPath "EasyForm.psm1"))
{
Unblock-File -LiteralPath (Join-Path -Path $PSScriptRoot -ChildPath "EasyForm.psm1") `
-ErrorAction SilentlyContinue | Out-NullImport-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath "EasyForm.psm1") -DisableNameChecking `
-Global -ErrorAction SilentlyContinue | Out-Null
}
``````powershell
#--- Form Example ---#$Form = New-Form -Caption "EasyForm Example"
$Form.ShowDialog() | Out-Null
``````powershell
#--- Form Example ---#$Form = New-Form -Caption "EasyForm Example"
Show-Form -Parent $Form | Out-Null
``````powershell
#--- Form Example ---#$Form = New-Form -Caption "EasyForm Example" -Height 200 -Width 400 -Color Red -BorderStyle FixedSingle
Show-Form -Parent $Form | Out-Null
``````powershell
#--- Button Example ---#$ButtonFormExample = New-Form -Caption "Button Example" -Height 200 -Width 300 -VisualStyles
$Button = New-Button -Text "Press me!" -Parent $ButtonFormExample -Width 100 -Color Black -Left 20 -Top 20
Add-Click -Parent $Button -ScriptBlock {[System.Windows.Forms.MessageBox]::Show("Button example works?")
}
Show-Form -Parent $ButtonFormExample
``````powershell
#--- Checkbox Example ---#$MainForm = New-Form -Caption "LMAO" -Height 200 -Width 200
$Checkbox = New-Checkbox -Text "Dark Mode" -Parent ($MainForm) -Top 20 -Left 20
Add-Check -Parent $Checkbox -ScriptBlock {
if ($Checkbox.Checked)
{
[System.Windows.Forms.MessageBox]::Show("Checked")
}
else{
[System.Windows.Forms.MessageBox]::Show("Not Checked")
}
}
Show-Form -Parent $MainForm
```