Hi everyone,
Is there a way to make my form's opacity change if you click and drag the form to a different location on the screen?
Printable View
Hi everyone,
Is there a way to make my form's opacity change if you click and drag the form to a different location on the screen?
sure that is possible, but if you can be more specific as to what you are trying to do then perhaps we can be more help.
Hi bmahler,
I am trying to make my form's opacity change to 75% if a user tries to click and drag the form to a new location on the screen.
If the user merely clicks on the form, I would like the opacity to change the same. Only when the form is clicked and dragged is the opacity supposed to change to 75%.
This is one way of doing it, the boolean flag is there because the move event fires as soon as the from is displayed, this one needs to be ignored.
vb Code:
Dim ignoreFirst As Boolean = False Private Sub Form1_Move(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Move If ignoreFirst Then Me.Opacity = 0.75 End If ignoreFirst = True End Sub
Tinbeard,
I tried that code and it did not change the opacity as expected :sick:
hmm works fine for me, does anything happen ?
75% opacity is actually .75 in code. So 100% opacity would just be 1.0
And yea. it works for me as well
Make sures you be uzin da right event!