I'm trying to make arrays which lead to different files on my computer. Then I want to display the arrays in a check box, so I can just click and open my files from there. The array can be static, but would be nice if I could add new stuff dynamically.
$menulist.DataBindings.DefaultDataSourceUpdateMode = 0
$menulist.FormattingEnabled = $True
$System_Drawing_Point = New-Object System.Drawing.Point
$System_Drawing_Point.X = 12
$System_Drawing_Point.Y = 24
$menulist.Location = $System_Drawing_Point
$menulist.Name = "menulist"
$System_Drawing_Size = New-Object System.Drawing.Size
$System_Drawing_Size.Height = 328
$System_Drawing_Size.Width = 235
$TemplateArray = $template1,$template2;
$template1 = Get-ChildItem -Path C:\Users\$Env:USERNAME\Documents\test.tx
$template2 = Get-ChildItem -Path C:\Users\$Env:USERNAME\Documents\test2.txt
$menulist.Items.AddRange($TemplateArray)
$menulist.Size = $System_Drawing_Size
$menulist.TabIndex = 7
$Form.ShowDialog();or something similar? stackoverflow.com/a/21009953/897326 Generally speaking, when it comes to showing forms, you should consider switching to C#/WinForms app, because it's much more simple over there, and you are using .NET anyway, whether from Powershell or C#, the only difference is syntax simplicity, and Visual Studio which helps you build.$TemplateArray = $template1,$template2;<-- this does not make much sense to me, especially since you (re)define$template1,$template2;after.