473,398 Members | 2,212 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Mouse Move

Hello.
I'v got one problem.
On formular I have 2 Picturebox.
I write this code:

Private Sub PictureBox1_MouseDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseDown

PictureBox1.BackColor = System.Drawing.Color.Cyan

End Sub

Private Sub PictureBox2_MouseMove(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles PictureBox2.MouseMove

PictureBox2.BackColor = System.Drawing.Color.Cyan

End Sub

I want ,that when I click with mouse on picturebox1, this picturebox1 change
color, and When I move with mouse cursor over picturebox2 BUT STILL I HAVE
MOUSEDOWN, Picturebox2 change color,.

Thanks.
Nov 20 '05 #1
3 2107
Cor
Hi Peter,

With two empty picturebox this code does exactly what it should do for me.

When I click on picturebox1 it becoms cyan

And when I enter with the mouse picturebox2 it becomes also cyan.

And it stays of course that colour.

I hope this helps?

Cor

I'v got one problem.
On formular I have 2 Picturebox.
I write this code:

Private Sub PictureBox1_MouseDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseDown

PictureBox1.BackColor = System.Drawing.Color.Cyan

End Sub

Private Sub PictureBox2_MouseMove(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles PictureBox2.MouseMove

PictureBox2.BackColor = System.Drawing.Color.Cyan

End Sub

I want ,that when I click with mouse on picturebox1, this picturebox1 change color, and When I move with mouse cursor over picturebox2 BUT STILL I HAVE
MOUSEDOWN, Picturebox2 change color,.

Thanks.

Nov 20 '05 #2
ok, but I what you write is ok, but I think, that when I click/mousedown/ on
picturebox1 color of this picture is cyan and then still I have mousedown ,
I move with mouse over picturebox2 nothink is doing.
Thanks for answer
"Cor" <no*@non.com> wrote in message
news:ei**************@TK2MSFTNGP12.phx.gbl...
Hi Peter,

With two empty picturebox this code does exactly what it should do for me.

When I click on picturebox1 it becoms cyan

And when I enter with the mouse picturebox2 it becomes also cyan.

And it stays of course that colour.

I hope this helps?

Cor

I'v got one problem.
On formular I have 2 Picturebox.
I write this code:

Private Sub PictureBox1_MouseDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseDown

PictureBox1.BackColor = System.Drawing.Color.Cyan

End Sub

Private Sub PictureBox2_MouseMove(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles PictureBox2.MouseMove

PictureBox2.BackColor = System.Drawing.Color.Cyan

End Sub

I want ,that when I click with mouse on picturebox1, this picturebox1

change
color, and When I move with mouse cursor over picturebox2 BUT STILL I HAVE MOUSEDOWN, Picturebox2 change color,.

Thanks.


Nov 20 '05 #3
Cor
Hi Peter,

Now I understand what you mean, when you enter the control with the
mousedown (you do not need that picturebox1 one for that), than the move
event is not firing.

I think that should be normal, how would you do a nice drag and drop in
another way?

But just a thought about this.

Cor

Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Csaba2000 | last post by:
I have set onmousedown to change the cursor, but this setting is ignored (IE 5.5; NN 6.1 on Win 2K Pro) until the mouse is either moved or the mouse button is released. On Opera 7.01, the setting...
3
by: red | last post by:
mouse events when the mouse is on a "child control" hi everyone; my problem: I have a userControl in this usercontrol, I have a child control (a button) when the mouse moves over the...
1
by: suhas | last post by:
Hi, I have an MDI app that allows user to create flowcharts. User can drag flowchart objects (squares, rectangles, elipses, etc) from the toolbar and put on a form. They should be able to move...
1
by: Benny Raymond | last post by:
In my attempt to make a macro recording program where i can then playback mouse movements i'm running into a big problem: I'm trying to simulate the movement of the mouse to a point on the...
1
by: Boni | last post by:
Dear all, A mouse click on some object in my application should select this object, where mouse down should start moving until mouse up. But, when I press mouse down small move always happens. I...
5
by: Nick | last post by:
Hey guys, I have 2 events on a windows forms datagrid, the mouse move as well as the double click events. What's happening is that when I double click on a row in the grid, the mouse move event...
6
by: Rob | last post by:
This is a curious problem. It seems like it should be quite easy. Of course a timer is used to determine when form should be closed, but how do you consistently reset the timer when the mouse is...
19
by: wmanzo | last post by:
I have a really professional conspiracy movie site and I use tons of layers and an external scroll bar assembly. I would like to put the various sections into MS Iframes and in order to clean up...
3
by: wanwan | last post by:
I made a game with a window form that needs to record the mouse position to an array at 100 samples per second, so I use the mouse move event to do the job. The problem is the mouse move event...
2
by: markszlazak | last post by:
In the following script, a control displays (black box) in each table cell once you mouse over the cell. Mouse down on the control to change the mode of the table. Drag the mouse over cells in the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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
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...
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...

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.