How to set opacity of form

  • Thread starter Thread starter VB Programmer
  • Start date Start date
V

VB Programmer

I have a form which has an opacity control of type numbericupdown. It's
supposed to control the opacity of frmMain. Here's my code...

Private Sub numOpacity_ValueChanged(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles numOpacity.ValueChanged
frmMain.Opacity = Me.numOpacity.Value
End Sub

This doesn't seem to work at all. Any suggestions?

Thanks!
 
VB Programmer said:
I have a form which has an opacity control of type numbericupdown. It's
supposed to control the opacity of frmMain. Here's my code...

Private Sub numOpacity_ValueChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles numOpacity.ValueChanged
frmMain.Opacity = Me.numOpacity.Value
End Sub

This doesn't seem to work at all. Any suggestions?

'Opacity' expects a value between 0 and 1. Maybe scaling the selected value
to this interval solves the problem.
 
I am doing it from .1 to 1.0.

Herfried K. Wagner said:
'Opacity' expects a value between 0 and 1. Maybe scaling the selected
value to this interval solves the problem.
 
Set Decimal places to 1. Set Increment to 0.1 Set Minimum Value to 0.1 and
Maximum value to 1.0. Set Value to 1.

VB Programmer said:
I am doing it from .1 to 1.0.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top