We can also place an object on the clipboard that does not remain.
https://docs.microsoft.com/en-us/dotnet ... work-4.7.2
RichTextBox: Adding dynamically-generated picture to existing content
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Re: RichTextBox: Adding dynamically-generated picture to existing content
With the Net Framwork we can also use this to copy and restore the clipboard
# save clipboard contents
$clp = [System.Windows.Forms.Clipboard]::GetDataObject()
# restore clipboard contents
[System.Windows.Forms.Clipboard]::SetDataObject($clp)
# save clipboard contents
$clp = [System.Windows.Forms.Clipboard]::GetDataObject()
# restore clipboard contents
[System.Windows.Forms.Clipboard]::SetDataObject($clp)
Re: RichTextBox: Adding dynamically-generated picture to existing content
Thanks for going the extra mile to help me with this. I have removed any code I had previously utilized/posted, and have swapped it out to your correct/efficient code.
Re: RichTextBox: Adding dynamically-generated picture to existing content
I just wanted you to understand why your code was unusable and unnecessary so you would understand how PowerShell, Net and the clipboard work.