Skip to content

Instantly share code, notes, and snippets.

@Hexality
Created September 13, 2022 18:27
Show Gist options
  • Save Hexality/53d0ecd3cd6d7da1675ffb64d9c9e7f7 to your computer and use it in GitHub Desktop.
Save Hexality/53d0ecd3cd6d7da1675ffb64d9c9e7f7 to your computer and use it in GitHub Desktop.
using namespace System.Windows
using namespace System.Windows.Forms
using namespace System.Drawing
Set-Alias -Name load -Value 'Add-Type'
Set-Alias -Name new -Value New-Object
load -assembly System.Windows.Forms
load -assembly System.Drawing
$a = new Form
$b = new Label
$c = new Label
$b.Font = new Font('Arial',14)
$c.Font = new Font('Segoe UI Emoji',16)
$b.Location = new Size(16,16)
$a.Size = '402,138'
$a.Text = "Today is your day!"
$b.Text = "Happy International Programmers' Day!!!"
$c.Text = "🎉"
$b.AutoSize = $true
$c.AutoSize = $true
$c.Location = new Size($(($a.Size.Width/2)-26),52)
$a.Controls.AddRange(@($b,$c))
[void]$a.ShowDialog()
@Hexality
Copy link
Author

Hexality commented Sep 13, 2022

Compiled version:
happy_programmers_day.exe
(click the link, do ctrl+s and rename the file extension to .exe)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment