Apr 28th, 2003, 04:28 PM
#1
Thread Starter
Addicted Member
Picturebox Mousedown button check?
What im trying to do is check which button is clicked and set the fillcolor based on that can anyone help?
Picture1.DrawWidth = Text1.Text
If Button = 1 Then Picture1.FillColor = Picture2.BackColor
If Button = 1 Then Picture1.Line -(x, y)
If Button = 2 Then Picture1.FillColor = Picture3.BackColor
If Button = 2 Then Picture1.Line -(x, y)
Thanks
Apr 28th, 2003, 04:36 PM
#2
Sleep mode
Are you having array of buttons ?
Apr 28th, 2003, 04:42 PM
#3
Thread Starter
Addicted Member
no button 1 = right mouse button
button 2 = left mouse button
Apr 28th, 2003, 04:49 PM
#4
Sleep mode
Hmm , try this now .
VB Code:
Private Sub Form1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
Picture1.DrawWidth = Text1.Text
If Button = 1 Then Picture1.FillColor = Picture2.BackColor
If Button = 1 Then Picture1.Line -(x, y)
If Button = 2 Then Picture1.FillColor = Picture3.BackColor
If Button = 2 Then Picture1.Line -(x, y)
End Sub
Apr 28th, 2003, 05:06 PM
#5
Thread Starter
Addicted Member
thats exactly what im using and its not working..
Apr 28th, 2003, 05:09 PM
#6
Sleep mode
Oh , I meant Picture MouseDown event not the form , have you tried this :
VB Code:
Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
End Sub
Apr 28th, 2003, 05:50 PM
#7
Thread Starter
Addicted Member
yes i know it doesnt work thow you try make 2 pic box's with 2 different back colors and one to draw on
Apr 28th, 2003, 06:02 PM
#8
Sleep mode
MouseClick isn't your problem then . Is this what you are doing ?
Attached Files
Apr 28th, 2003, 09:04 PM
#9
Thread Starter
Addicted Member
yes i know it doesnt work thow you try make 2 pic box's with 2 different back colors and one to draw on
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