Windows 10 Notification with PowerShell: Difference between revisions
From WickyWiki
Created page with "Category:Windows Powershell Category:202304 This script allows you to select the window from a list that you want to have as a borderless window that fills your screen. You could try this for a game that does not natively supports this function. Note that some applications will override these settings. <source lang=powershell> [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") $objNotifyIcon = New-Object System.Windows.Forms.Notif..." |
mNo edit summary |
||
| Line 1: | Line 1: | ||
[[Category:Windows Powershell]] | [[Category:Windows Powershell]] | ||
[[Category:202304]] | [[Category:202304]] | ||
This script allows you to | This script allows you to show a notification in the Windows 10 Notification area on the bottom left of the screen. | ||
<source lang=powershell> | <source lang=powershell> | ||
| Line 12: | Line 10: | ||
$objNotifyIcon.Icon = [System.Drawing.SystemIcons]::Information | $objNotifyIcon.Icon = [System.Drawing.SystemIcons]::Information | ||
$objNotifyIcon.BalloonTipIcon = "Info" | $objNotifyIcon.BalloonTipIcon = "Info" | ||
$objNotifyIcon.BalloonTipTitle = " | $objNotifyIcon.BalloonTipTitle = "Some title" | ||
$objNotifyIcon.BalloonTipText = " | $objNotifyIcon.BalloonTipText = "YOUR MESSAGE HERE" | ||
$objNotifyIcon.Visible = $True | $objNotifyIcon.Visible = $True | ||
$objNotifyIcon.ShowBalloonTip(10000) | $objNotifyIcon.ShowBalloonTip(10000) | ||
Latest revision as of 20:19, 25 April 2023
This script allows you to show a notification in the Windows 10 Notification area on the bottom left of the screen.
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
$objNotifyIcon = New-Object System.Windows.Forms.NotifyIcon
$objNotifyIcon.Icon = [System.Drawing.SystemIcons]::Information
$objNotifyIcon.BalloonTipIcon = "Info"
$objNotifyIcon.BalloonTipTitle = "Some title"
$objNotifyIcon.BalloonTipText = "YOUR MESSAGE HERE"
$objNotifyIcon.Visible = $True
$objNotifyIcon.ShowBalloonTip(10000)
Start-Sleep 500
Source: