1
Powershellでフォームを作成しようとしています。しかし、私はそれがイメージを持っているときにボタンからパディングを削除することはできますか?あなたが写真で見ることができるように。画像とボタンの境界線の間にはスペースがあります。どうすれば削除できますか?ここでPowershellフォーム内に画像を埋め込みます。
$Item1But = New-Object system.windows.Forms.Button
$Item1But.Text = "Keyboard"
$Item1But.Width = 250
$Item1But.Height = 50
$Item1But.Image = [System.Drawing.Image]::Fromfile(".\Picture\Keyboard.gif")
$Item1But.TextImageRelation = "ImageBeforeText"
$Item1But.FlatStyle = [System.Windows.Forms.FlatStyle]::Flat
$Item1But.FlatAppearance.BorderSize=2
$Item1But.FlatAppearance.Bordercolor="red"
$Item1But.location = new-object system.drawing.point(25,25)
$Item1But.Font = "Microsoft Sans Serif,25"
$Item1But.add_click($NewAction)
$Form.controls.Add($Item1But)
です。まだ同じ :( – Pavel