Bonjour,

Je cherche tant bien que mal à faire apparaitre ma ListView sur mon interface graphique, mais sans succès.

Voici mon code :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
 
$ListView1 = New-Object System.Windows.Forms.ListView
$System_Drawing_Point = New-Object System.Drawing.Point 
$System_Drawing_Point.X = 255 
$System_Drawing_Point.Y = 61
$listView1.Location = $System_Drawing_Point
$listView1.Name = "listView1"
$System_Drawing_Size = New-Object System.Drawing.Size 
$System_Drawing_Size.Width = 562 
$System_Drawing_Size.Height = 454 
$listView1.Size = $System_Drawing_Size
$listView1.TabIndex = 0
$listView1.UseCompatibleStateImageBehavior = false
$listView1.View = System.Windows.Forms.View.Details
 
$form1.Controls.Add($listView1)
$ListView1.ColumnHeader.Add("Colonne 1",100)
$ListView1.ColumnHeader.Add("Colonne 2",100)
Je n'arrive pas à définir le type de View et la placer à Details pour faire afficher mes colonnes.

Merci d'avance pour votre aide.