Bonjour
J'suis pas vraiment dev mais je bidouille mais la je bloque j'aimerai que la fenêtre qui affiche mon image, ce ferme disons quelques secondes après son apparition.
Pourriez vous m'aider svp ?
Add-Type -AssemblyName System.Windows.Forms
$Label = New-Object System.Windows.Forms.Label
$Form = New-Object system.Windows.Forms.Form
$Form.Text="Date"
$Form.AutoSize = $True
$Form.MinimizeBox = $False
$Form.MaximizeBox = $False
$Form.WindowState = "Normal"
$Form.StartPosition = "CenterScreen"
$img = [System.Drawing.Image]::Fromfile("Chemin/de/mon/Image')
$pictureBox = new-object Windows.Forms.PictureBox
$pictureBox.Width = $img.Size.Width
$pictureBox.Height = $img.Size.Height
$pictureBox.Image = $img
$form.controls.add($pictureBox)
[void]$Form.ShowDialog()
Message édité le 05 mars 2023 à 17:59:14 par maldoon