Change the location of an image manually in Powershell
hello! i've tried changing location image in form , can't manually.
i tried:
1) $image = [system.drawing.image]::fromfile("route")
$form.backgroundimage = $image
$form.backgroundimagelayout = "property"
but, there no property change location of image manually
2)
$picturebox = new-object windows.forms.picturebox
$picturebox.image = $image
$picturebox.sizemode = "property"
$form.controls.add($picturebox)
but, there no property change location of image manually
question: how can change location of image manually in powershell?
you cannot change background image. can change stretching or tiling. location center of container.
$form.backgroundimagelayout = [[center][zoom][stretch][tile][none]]
$picturebox.backgroundimagelayout = [[center][zoom][stretch][tile][none]]
$picturebox.location = '100,50'
\_(ツ)_/
Windows Server > Windows PowerShell
Comments
Post a Comment