469,890 Members | 2,158 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,890 developers. It's quick & easy.

Picturebox Control, Borderstyle property and mousemove event probl

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/...130d1ebcebd640

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

Brian
Nov 21 '05 #1
5 4654
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

"BrianW" wrote:
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/...130d1ebcebd640

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

Brian

Nov 21 '05 #2
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

"jam96-BuffaloJoe" wrote:
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

"BrianW" wrote:
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/...130d1ebcebd640

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

Brian

Nov 21 '05 #3
You might try a blank picture box and use bitblt to display the image.
bitblt is very fast.

"BrianW" wrote:
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

"jam96-BuffaloJoe" wrote:
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

"BrianW" wrote:
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/...130d1ebcebd640

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

Brian

Nov 21 '05 #4
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+?

Dennis <De****@discussions.microsoft.com> wrote in message news:<3D**********************************@microso ft.com>...
You might try a blank picture box and use bitblt to display the image.
bitblt is very fast.

"BrianW" wrote:
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

"jam96-BuffaloJoe" wrote:
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

"BrianW" wrote:

> 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/...130d1ebcebd640
>
> If anyone has any ideas or suggestions, I definitely appreciate the
> assistance.
>
> Brian

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

Brian

"ViRi" wrote:
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+?

Dennis <De****@discussions.microsoft.com> wrote in message news:<3D**********************************@microso ft.com>...
You might try a blank picture box and use bitblt to display the image.
bitblt is very fast.

"BrianW" wrote:
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

"jam96-BuffaloJoe" wrote:

> 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
>
> "BrianW" wrote:
>
> > 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/...130d1ebcebd640
> >
> > If anyone has any ideas or suggestions, I definitely appreciate the
> > assistance.
> >
> > Brian

Nov 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Stephen Williams | last post: by
reply views Thread by Stephen Williams | last post: by
reply views Thread by akh | last post: by
31 posts views Thread by jcrouse | last post: by
1 post views Thread by Filippo Bettinaglio | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.