Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Position a windows form with Powershell

$
0
0

Hi there

I have something like :

void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")

$objForm = New-Object System.Windows.Forms.Form
$objForm.Text = "Select a Computer"
$objForm.Size = New-Object System.Drawing.Size(300,200)
$objForm.StartPosition = "CenterScreen"

The does not seem to be any other value than "CenterScreen" that I can find, so!

My question is........

Is it possible to use the object properties? Something like System.Windows.Forms.Position(10,22)

I want to be able to position my Input box.

Thanks

 

 

 


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>