473,466 Members | 1,360 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 4864
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Stephen Williams | last post by:
I am migrating a VB 6 PictureBox control to VB.NET. In VB 6, this control modified its border style during the mouse down and up events to provide user feedback that it was selected. Once...
0
by: Stephen Williams | last post by:
Does Microsoft have a comment the possible bug on the PictureBox Class. Here is the exchange I had on the Experts-Exchange regarding this issue: From Z_Beeblebrox: Hi, I believe it is...
6
by: Tom Rowton | last post by:
This one has me a bit confused and I'm not finding what I need in the MSDN or by searching these forums, so here goes... I have a rather large, complex code-in-page WebForm (don't ask) and a...
0
by: akh | last post by:
I want to use de Drag and Drop ´s event to move a picture box from a form and within a Picture Box. But I have behaviour if the MyPBox As PictureBox as the Globale varible or not Thanks for...
31
by: jcrouse | last post by:
Is there a quick and easy way to change the color of a label controls border from the default black to white? Thank you, John
3
by: Tom | last post by:
I have a picturebox on my VB.NET form. The picturebox size mode is set to stretched. I then load an image into that form and display it. As the user moves the mouse over the form, I want to get and...
1
by: Filippo Bettinaglio | last post by:
Hi, I have a PictureBox with the border set to BorderStyle = FixedSingle and it comes up with a nice Black border. How can I change it at runtime? I use VS2005 (net2 framework)
3
by: Andrzej | last post by:
I have a picturebox on my C# .NET form. The picturebox size mode is set to zoom. I then load an image into that form and display it. As the user moves the mouse over the form, I want to get and...
4
by: Jim McGivney | last post by:
In C# on Form1 I genetate an array of PictureBoxes and populate each with an image as seen in the code below. Later on I want to access a specific PictureBox to change its image, but I keep...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.