Picturebox Control, Borderstyle property and mousemove event probl

G

Guest

I am working on a program that has multiple picturebox controls that a user
is allowed to move around which are contained within a panel control for
visual placement. In my mousedown event, I set the picturebox control's
borderstyle to Fixed3D, but upon doing so, I am not able to track the
picturebox control through mousemove events (if you move the mouse off of the
control too quickly, the control no longer receives mouse events). If I
either set the border to None or leave it alone, the control receives mouse
events no matter how fast you move the mouse. I really need a way to display
to the user that the control they click on is "selected" by means of a
border. I found an article on google that refers to this, but unfortunately
no one responded to that poster either. The link is:

http://groups-beta.google.com/group..._doneTitle=Back+to+Search&&d#a8130d1ebcebd640

If anyone has any ideas or suggestions, I definitely appreciate the
assistance.

Brian
 
G

Guest

Have you tried to slow down the number of events by having the code wait in
the mousedown event.
Some times this works.
or

Insted of changing the border, which might be the problem, change the
background color, or the mouse pointer to show the picture is selected!?
Joe
 
G

Guest

I added a sleep instruction but still no luck. Changing the background color
will not do any good as the picturebox control has images assigned that
consume the entire space and they are not translucent so no background color
will show. Hopefully there are some alternatives and more suggestions, I am
at a loss right now. Thanks.

Brian
 
G

Guest

You might try a blank picture box and use bitblt to display the image.
bitblt is very fast.
 
V

ViRi

You could use a boolean value to not allow the event to be processed
while you are processing the move, to make sure every event is
captured as you want.

As for the border... why not get the positions and dimesions of the
picturebox controll and draw a border in GDI+?
 
G

Guest

Thank you, that worked perfectly. Still new to VB and .Net so it didn't dawn
on me to use GDI+.

Brian
 

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

Top