Skip to content

Instantly share code, notes, and snippets.

@shalithasuranga
Created November 29, 2020 13:40
Show Gist options
  • Save shalithasuranga/8e974c226e3f494addc2a7e559f68689 to your computer and use it in GitHub Desktop.
Save shalithasuranga/8e974c226e3f494addc2a7e559f68689 to your computer and use it in GitHub Desktop.
@echo off
powershell -Command "& {Add-Type -AssemblyName System.Windows.Forms; $mainForm = New-Object System.Windows.Forms.Form; $mainForm.Text = 'Main Window'; $lbl = New-Object System.Windows.Forms.Label; $lbl.Text = 'Hello World'; $mainForm.Controls.Add($lbl); $mainForm.StartPosition = [System.Windows.Forms.FormStartPosition]::CenterScreen; $mainForm.ShowDialog()}"
@ConsoleDevPumpkin
Copy link

May I ask how can I make another file open after clicking a button?

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