473,587 Members | 2,263 Online
Bytes | Software Development & Data Engineering Community
+ 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 4888
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****@discuss ions.microsoft. com> wrote in message news:<3D******* *************** ************@mi crosoft.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****@discuss ions.microsoft. com> wrote in message news:<3D******* *************** ************@mi crosoft.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
2671
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 selected its position was adjusted in accordance with the mouse move events. After migrating it to VB.NET I tried setting the PictureBox class's...
0
1617
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 standard windows behavious to continue to send mouse events to the window in which the mouse was depressed until the mouse is released. A quick test in VB6...
6
6656
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 section of that Form is 4 or 5 ASP:Panels pretending to be a set of Tabs, each with its own section of the form.
0
3875
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 your help, Here is the code.
31
7192
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
63339
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 display (in the status bar) the image coordinates of the mouse location. However, if I use the picturebox's MouseMove event, I am getting the...
1
12430
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
22395
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 display (in the status bar) the image coordinates of the mouse location. However, if I use the picturebox's MouseMove event, I am getting the...
4
3693
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 getting the error "The name 'PictureBox1' does not exist in the current context" The code I use to try to access the PictureBox is "PictureBox1.Image =...
0
7915
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8205
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8339
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7967
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8220
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5712
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3872
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2347
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 we have to send another system
0
1185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.