mercredi 25 février 2015

Powershell LinkClicked event for a RichTextBox

Im using windows Windows.Forms.RichTextBox to redirect my powershell script output "$var". Detect.Urls is already enabled and working, but unable to open them by clicking.


Can any one help me with the code for link click event handler in powershell script........



$outputBox = New-Object System.Windows.Forms.RichTextBox
$outputBox.Location = New-Object System.Drawing.Size(10,150)
$outputBox.Size = New-Object System.Drawing.Size(700,300)
$outputBox.MultiLine = $True
$outputBox.SelectionIndent = 8
$outputBox.SelectionHangingIndent = 3
$outputBox.SelectionRightIndent = 12
$outputBox.ScrollBars = "ForcedBoth"
$Form.Controls.Add($outputBox)
$outputBox.Text = $var
$Form.Add_Shown({$Form.Activate()})
[void] $Form.ShowDialog()

Aucun commentaire:

Enregistrer un commentaire