1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
#Create pen $mypen = new-object Drawing.Pen red $mypen.width = 10 $form = New-Object Windows.Forms.Form $form.Width = 500 $form.Height = 550 $formGraphics = $form.createGraphics() #K $form.add_paint({$formGraphics.DrawLine($mypen, 0, 100, 200, 0)}) $form.add_paint({$formGraphics.DrawLine($mypen, 0, 100, 200, 200)}) $form.add_paint({$formGraphics.DrawLine($mypen, 0, 0, 0, 200)}) $form.ShowDialog() |