Introducing WinFormPS - PowerShell module to interact with WinForms controls

2015/02/15 | 1 minute read |

</div> I started to work on a PowerShell module called WinFormPS. This module contains a few functions that let you interact with Windows Form controls such as DataGridView, ListBox or Button controls for example.

To build those forms I mostly use PowerShell Studio from Sapien but this can also work with any simple Form created from scratch.

The motivation to create User Interfaces has always been to ease the work of departments and teams with some of their heavy tasks, or simply to speed up some very repetitive processes. I definitely don’t have a developer background, so please bear with me and feel free to critique or push update to the module on GitHub :-)

WinForms Windows Forms (WinForms) is the name given to a graphical (GUI) class library included as a part of Microsoft .NET Framework, providing a platform to write rich client applications for desktop, laptop, and tablet. While it is seen as a replacement for the earlier and more complex C++ based Microsoft Foundation Class Library, it does not offer a comparable paradigm and only act as a platform for the user interface tier in a multi-tier solution. -Wikipedia

Functions

I hope to bring some more functions and features in the next couple of months with the help of the PowerShell Community (hopefully)

Note that some of the functions were written by guys at Sapien Inc (identified at the end)

# WinFormPS

Add-DataGridViewColumn
Add-DataGridViewRow
Append-Richtextbox
Clear-DataGridViewSelection
Clear-ListBox
Clear-RichTextBox
Disable-Button
Disable-RichTextBox
Disable-TabControl
Enable-Button
Enable-RichTextBox
Enable-TabControl
Find-DataGridViewValue
Get-Form
Get-ListBoxItem
Get-ListViewItem
New-BalloonNotification
New-OpenFileDialog
New-OpenFolderDialog
New-InputBox
New-MessageBox
New-SpeakerBeep
Refresh-DataGridView
Remove-ListBoxItem
Reset-DataGridViewFormat
Set-DataGridView
Set-DataGridViewFilter
Set-Form
Set-RichTextBox

# Function from Sapien
Add-ListViewItem
ConvertTo-DataTable # With some of my customization
Load-DataGridView
Load-ListBox
Sort-ListViewColumn

Download

https://github.com/lazywinadmin/WinFormPS

I will post some examples in the next few days/weeks.

Leave a Comment