code

%3CLINGO-SUB%20id%3D%22lingo-sub-2401528%22%20slang%3D%22en-US%22%3Ecode%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2401528%22%20slang%3D%22en-US%22%3E%3CP%3EAdd-Type%20-AssemblyName%20System.Windows.Forms%3CBR%20%2F%3E%5BSystem.Windows.Forms.Application%5D%3A%3AEnableVisualStyles()%3C%2FP%3E%3CP%3E%24Form%20%3D%20New-Object%20system.Windows.Forms.Form%3CBR%20%2F%3E%24Form.ClientSize%20%3D%20New-Object%20System.Drawing.Point(731%2C439)%3CBR%20%2F%3E%24Form.text%20%3D%20%22Form%22%3CBR%20%2F%3E%24Form.TopMost%20%3D%20%24false%3C%2FP%3E%3CP%3E%24CheckBox1%20%3D%20New-Object%20system.Windows.Forms.CheckBox%3CBR%20%2F%3E%24CheckBox1.text%20%3D%20%22checkBox%22%3CBR%20%2F%3E%24CheckBox1.AutoSize%20%3D%20%24false%3CBR%20%2F%3E%24CheckBox1.width%20%3D%2095%3CBR%20%2F%3E%24CheckBox1.height%20%3D%2020%3CBR%20%2F%3E%24CheckBox1.location%20%3D%20New-Object%20System.Drawing.Point(45%2C78)%3CBR%20%2F%3E%24CheckBox1.Font%20%3D%20New-Object%20System.Drawing.Font('Microsoft%20Sans%20Serif'%2C10)%3C%2FP%3E%3CP%3E%24CheckBox2%20%3D%20New-Object%20system.Windows.Forms.CheckBox%3CBR%20%2F%3E%24CheckBox2.text%20%3D%20%22checkBox%22%3CBR%20%2F%3E%24CheckBox2.AutoSize%20%3D%20%24false%3CBR%20%2F%3E%24CheckBox2.width%20%3D%2095%3CBR%20%2F%3E%24CheckBox2.height%20%3D%2020%3CBR%20%2F%3E%24CheckBox2.location%20%3D%20New-Object%20System.Drawing.Point(175%2C78)%3CBR%20%2F%3E%24CheckBox2.Font%20%3D%20New-Object%20System.Drawing.Font('Microsoft%20Sans%20Serif'%2C10)%3C%2FP%3E%3CP%3E%24RadioButton1%20%3D%20New-Object%20system.Windows.Forms.RadioButton%3CBR%20%2F%3E%24RadioButton1.text%20%3D%20%22radioButton%22%3CBR%20%2F%3E%24RadioButton1.AutoSize%20%3D%20%24true%3CBR%20%2F%3E%24RadioButton1.width%20%3D%20104%3CBR%20%2F%3E%24RadioButton1.height%20%3D%2020%3CBR%20%2F%3E%24RadioButton1.location%20%3D%20New-Object%20System.Drawing.Point(45%2C192)%3CBR%20%2F%3E%24RadioButton1.Font%20%3D%20New-Object%20System.Drawing.Font('Microsoft%20Sans%20Serif'%2C10)%3C%2FP%3E%3CP%3E%24RadioButton2%20%3D%20New-Object%20system.Windows.Forms.RadioButton%3CBR%20%2F%3E%24RadioButton2.text%20%3D%20%22radioButton%22%3CBR%20%2F%3E%24RadioButton2.AutoSize%20%3D%20%24true%3CBR%20%2F%3E%24RadioButton2.width%20%3D%20104%3CBR%20%2F%3E%24RadioButton2.height%20%3D%2020%3CBR%20%2F%3E%24RadioButton2.location%20%3D%20New-Object%20System.Drawing.Point(173%2C192)%3CBR%20%2F%3E%24RadioButton2.Font%20%3D%20New-Object%20System.Drawing.Font('Microsoft%20Sans%20Serif'%2C10)%3C%2FP%3E%3CP%3E%24ListBox1%20%3D%20New-Object%20system.Windows.Forms.ListBox%3CBR%20%2F%3E%24ListBox1.text%20%3D%20%22listBox%22%3CBR%20%2F%3E%24ListBox1.width%20%3D%20196%3CBR%20%2F%3E%24ListBox1.height%20%3D%20152%3CBR%20%2F%3E%24ListBox1.location%20%3D%20New-Object%20System.Drawing.Point(40%2C268)%3C%2FP%3E%3CP%3E%24Form.controls.AddRange(%40(%24CheckBox1%2C%24CheckBox2%2C%24RadioButton1%2C%24RadioButton2%2C%24ListBox1))%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%23Write%20your%20logic%20code%20here%3C%2FP%3E%3CP%3E%5Bvoid%5D%24Form.ShowDialog()%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2401528%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EWindows%20PowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Visitor

Add-Type -AssemblyName System.Windows.Forms
[System.Windows.Forms.Application]::EnableVisualStyles()

$Form = New-Object system.Windows.Forms.Form
$Form.ClientSize = New-Object System.Drawing.Point(731,439)
$Form.text = "Form"
$Form.TopMost = $false

$CheckBox1 = New-Object system.Windows.Forms.CheckBox
$CheckBox1.text = "checkBox"
$CheckBox1.AutoSize = $false
$CheckBox1.width = 95
$CheckBox1.height = 20
$CheckBox1.location = New-Object System.Drawing.Point(45,78)
$CheckBox1.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',10)

$CheckBox2 = New-Object system.Windows.Forms.CheckBox
$CheckBox2.text = "checkBox"
$CheckBox2.AutoSize = $false
$CheckBox2.width = 95
$CheckBox2.height = 20
$CheckBox2.location = New-Object System.Drawing.Point(175,78)
$CheckBox2.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',10)

$RadioButton1 = New-Object system.Windows.Forms.RadioButton
$RadioButton1.text = "radioButton"
$RadioButton1.AutoSize = $true
$RadioButton1.width = 104
$RadioButton1.height = 20
$RadioButton1.location = New-Object System.Drawing.Point(45,192)
$RadioButton1.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',10)

$RadioButton2 = New-Object system.Windows.Forms.RadioButton
$RadioButton2.text = "radioButton"
$RadioButton2.AutoSize = $true
$RadioButton2.width = 104
$RadioButton2.height = 20
$RadioButton2.location = New-Object System.Drawing.Point(173,192)
$RadioButton2.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',10)

$ListBox1 = New-Object system.Windows.Forms.ListBox
$ListBox1.text = "listBox"
$ListBox1.width = 196
$ListBox1.height = 152
$ListBox1.location = New-Object System.Drawing.Point(40,268)

$Form.controls.AddRange(@($CheckBox1,$CheckBox2,$RadioButton1,$RadioButton2,$ListBox1))

 


#Write your logic code here

[void]$Form.ShowDialog()

1 Reply
hi,
So whats the issue ?!