|
-
Apr 10th, 2007, 01:20 PM
#1
Thread Starter
Addicted Member
Click & drag opacity change
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?
-
Apr 10th, 2007, 01:24 PM
#2
Re: Click & drag opacity change
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.
-
Apr 10th, 2007, 01:30 PM
#3
Thread Starter
Addicted Member
Re: Click & drag opacity change
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%.
-
Apr 10th, 2007, 02:48 PM
#4
Hyperactive Member
Re: Click & drag opacity change
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
If my post helps , please feel free to rate it 
-
Apr 10th, 2007, 03:30 PM
#5
Thread Starter
Addicted Member
Re: Click & drag opacity change
Tinbeard,
I tried that code and it did not change the opacity as expected
-
Apr 10th, 2007, 04:01 PM
#6
Hyperactive Member
Re: Click & drag opacity change
hmm works fine for me, does anything happen ?
If my post helps , please feel free to rate it 
-
Apr 10th, 2007, 10:05 PM
#7
Frenzied Member
Re: Click & drag opacity change
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!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|