Search found 13286 matches

by jvierra
Fri Mar 15, 2019 2:56 pm
Forum: PowerShell GUIs
Topic: PictureBox Timer
Replies: 8
Views: 195

Re: PictureBox Timer

What are you trying to say?
TotalSeconds will never change in your example. Something has to decrement the span.

If you are looking for an elapsed time timer then just set the timer to 16000 and stop it when the event is expired.
by jvierra
Fri Mar 15, 2019 2:22 pm
Forum: PowerShell GUIs
Topic: PictureBox Timer
Replies: 8
Views: 195

Re: PictureBox Timer

David to the rescue. Good idea. Here is a sample of how to use a timer. Add-Type -AssemblyName System.Windows.Forms # control creation $form = New-Object System.Windows.Forms.Form $buttonOK = New-Object System.Windows.Forms.Button $form.Controls.Add($buttonOK) $timer = New-Object System.Windows.Form...
by jvierra
Fri Mar 15, 2019 1:39 pm
Forum: PowerShell GUIs
Topic: PictureBox Timer
Replies: 8
Views: 195

Re: PictureBox Timer

Just add a timer from the toolbox. You can use the timer default event to do things at each timer tick.

For instructions and example on how to use the Timer control see: https://info.sapien.com/index.php/guis/ ... er-control
by jvierra
Fri Mar 15, 2019 1:32 pm
Forum: Windows PowerShell
Topic: Select-Object : Cannot convert System.Management.Automation.PSObject
Replies: 3
Views: 212

Re: Select-Object : Cannot convert System.Management.Automation.PSObject

What you have posted is not a CSV file. Open the CSV in notepad and post the contents or, at least, the first few rows.
by jvierra
Fri Mar 15, 2019 8:38 am
Forum: Windows PowerShell
Topic: Creating a Kerberos or NTLM logon to an Active Directory Domain Controller at will.
Replies: 7
Views: 265

Re: Creating a Kerberos or NTLM logon to an Active Directory Domain Controller at will.

The remoting create remote session. There is no local session or logon event. All parts of the session are on the remote system only. That is what remoting means.
by jvierra
Thu Mar 14, 2019 6:08 pm
Forum: PowerShell GUIs
Topic: RichTextBox: Adding dynamically-generated picture to existing content
Replies: 23
Views: 267

Re: RichTextBox: Adding dynamically-generated picture to existing content

The following is how to get the image as a hex string:

Code: Select all

    $f = Get-Item 'd:\Epson\IM_A0037.JPG'
    $s = $f.OpenRead()
    $bytes = [byte[]]::new($s.Length)
    $s.Read($bytes,0,$s.Length)
    $hex = [System.BitConverter]::ToString($bytes) -replace '-'
by jvierra
Thu Mar 14, 2019 5:44 pm
Forum: PowerShell GUIs
Topic: RichTextBox: Adding dynamically-generated picture to existing content
Replies: 23
Views: 267

Re: RichTextBox: Adding dynamically-generated picture to existing content

Here is one way to load an RTF image into an RTB.

$richtextbox1.Rtf = Get-Content C:\Users\jvier\OneDrive\Pictures\Jim\Document.rtf -raw
by jvierra
Thu Mar 14, 2019 2:58 pm
Forum: PowerShell GUIs
Topic: RichTextBox: Adding dynamically-generated picture to existing content
Replies: 23
Views: 267

Re: RichTextBox: Adding dynamically-generated picture to existing content

I don't believe that the RTB control supports images. Try opening a Wordpad rtf document in the control. I think it will not display the image.