473,705 Members | 3,166 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 4898
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
2686
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 BorderStyle to Fixed3D or FixedSingle during the Mouse Down event. However, doing so seems to prevent...
0
1621
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 confirms this, but I don't have .Net here to test that,
6
6669
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
3881
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
7228
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
63431
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 coordinates of the mouse over the PICTUREBOX, not the actual image underneath that (which is stretched)....
1
12437
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
22500
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 coordinates of the mouse over the PICTUREBOX, not the actual image underneath that (which is zoomed). i.e....
4
3713
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 = HoldBitMap; " where kount is an integer. I know the answer is probably in using the Controls...
0
8768
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8690
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9274
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9139
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9034
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8979
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6606
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4440
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3138
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

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.