Simkoo
Simkoo

Reputation: 74

opacity value for my C# form isn't adjusting

I wanted to make one of my forms opaque. I did this by changing the opacity value in the form between 0 and 100. I later wanted to change this value during run-time, so i wrote some code:

Opacity = 80;

However my form doesn't seem to change opacity. Does anyone know what i'm doing wrong.

Upvotes: 0

Views: 99

Answers (1)

gilliduck
gilliduck

Reputation: 2918

The Form.Opacity property ranges from 0 to 1. So to achieve 80% opacity, you would write Opacity = 0.8

Upvotes: 4

Related Questions