question

Ian3-9218 avatar image
0 Votes"
Ian3-9218 asked JackJJun-MSFT commented

Images for StatusStrip

I search Internet and get several images download. Then use the below to add them on StatusStripItems of Powershell Form as below:

$statusstrip1.Items.Add('Text', [System.Drawing.Image]::FromFile('c:\image.png'))

I found the images show poor quality. Is it the issue of image size? If so, what is the right pixel size? Thanks.

windows-server-powershellwindows-forms
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@Ian3-9218, is any update?

0 Votes 0 ·
RichMatheisen-8856 avatar image
0 Votes"
RichMatheisen-8856 answered

The "images" should be icons, not full-on graphics. So probably one of these dimensions (depending on screen resolution):

 128 x 128 pixels
 96 x 96 pixels
 180 x 180 pixels
 72 x 72 pixels
 64 x 64 pixels
 24 x 24 pixels
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

LimitlessTechnology-2700 avatar image
0 Votes"
LimitlessTechnology-2700 answered

Hi Ian3-9218,

The ImageScalingSize property may help with the image quality.

You may find the following article helpful:

https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.statusstrip?view=windowsdesktop-6.0

I hope this answers your question.



--If the reply is helpful, please Upvote and Accept as answer--

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.