By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,673 Members | 1,268 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,673 IT Pros & Developers. It's quick & easy.

Is it a bug? Event handler: PictureBox on Form.

P: n/a
Hi, I am new to C#.
Please give me some advice on this, I would like to know if it is a
bug or not.

My application works similar to paintbrush now.
I use the mouse to draw some lines on a picture box residing on a
form.
I am using mousedown, mousemove and mouseup events of the picture box
to capture the movement of the mouse.

But, I just found out that after I clicked on the picture box and then
dragged the mouse out of the picture box, mouseup event will be
generated.
In my code, I have not use mouseleave event of the picture box.

The firing of mouseup event does not cause me any trouble.
It actually helps me in this case, because I have not consider this
scenario when I wrote the code, my application works as expected.

But, I really want to know if this is a normal behavior.
I could not find any doc about this anywhere.
I do not want my app to stop working in the future.

Thanks,
Stanley
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Yes, it is normal behaviour unless you have captured the mouse.

S.

"eplayer" <as********@hotmail.com> wrote in message
news:a9**************************@posting.google.c om...
Hi, I am new to C#.
Please give me some advice on this, I would like to know if it is a
bug or not.

My application works similar to paintbrush now.
I use the mouse to draw some lines on a picture box residing on a
form.
I am using mousedown, mousemove and mouseup events of the picture box
to capture the movement of the mouse.

But, I just found out that after I clicked on the picture box and then
dragged the mouse out of the picture box, mouseup event will be
generated.
In my code, I have not use mouseleave event of the picture box.

The firing of mouseup event does not cause me any trouble.
It actually helps me in this case, because I have not consider this
scenario when I wrote the code, my application works as expected.

But, I really want to know if this is a normal behavior.
I could not find any doc about this anywhere.
I do not want my app to stop working in the future.

Thanks,
Stanley

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.