Is it possible to determine if the image under a mouse changes in VB.net
code? For example if I position the mouse using the command;
Windows.Forms.Cursor.Position = New System.Drawing.Point(680, 595)
Is there code that would help me determine if the image under it has
changed? 9 1509
On Mon, 19 Jun 2006 18:00:11 -0700, "Daniel N"
<sa***********@yahoo.com> wrote: Is it possible to determine if the image under a mouse changes in VB.net code? For example if I position the mouse using the command; Windows.Forms.Cursor.Position = New System.Drawing.Point(680, 595)
Is there code that would help me determine if the image under it has changed?
Changed how?
A new image has replaced a previous image?
It's the same image, but has been modified?
Gene
Well, when I position the mouse in a certian area, eventually a new image
will replace what was there. I wanted to tell my program exactly when that
happened.
"gene kelley" <ok**@by.me> wrote in message
news:aq********************************@4ax.com... On Mon, 19 Jun 2006 18:00:11 -0700, "Daniel N" <sa***********@yahoo.com> wrote:
Is it possible to determine if the image under a mouse changes in VB.net code? For example if I position the mouse using the command; Windows.Forms.Cursor.Position = New System.Drawing.Point(680, 595)
Is there code that would help me determine if the image under it has changed? Changed how? A new image has replaced a previous image? It's the same image, but has been modified?
Gene
On Mon, 19 Jun 2006 21:38:47 -0700, "Daniel N"
<sa***********@yahoo.com> wrote: Well, when I position the mouse in a certian area, eventually a new image will replace what was there. I wanted to tell my program exactly when that happened.
There's not enough app description given to provide a definitive
answer.
You might take a look at the PictureBox Invalidated event which fires
whenever an image is loaded. You might be able to adapt something
like this:
Private CursorInBox as Boolean
Private Sub PictureBox1_MouseEnter(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles PictureBox1.MouseEnter
CursorInBox = True
End Sub
Private Sub PictureBox1_MouseLeave(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles PictureBox1.MouseEnter
CursorInBox = False
End Sub
Private Sub PictureBox1_Invalidated(ByVal sender As Object, _
ByVal e As System.Windows.Forms.InvalidateEventArgs) Handles _
PictureBox1.Invalidated
If CursorInBox Then
MsgBox("Picture changed")
End If
End Sub
Gene
"gene kelley" <ok**@by.me> wrote in message news:aq********************************@4ax.com.. . On Mon, 19 Jun 2006 18:00:11 -0700, "Daniel N" <sa***********@yahoo.com> wrote:
Is it possible to determine if the image under a mouse changes in VB.net code? For example if I position the mouse using the command; Windows.Forms.Cursor.Position = New System.Drawing.Point(680, 595)
Is there code that would help me determine if the image under it has changed? Changed how? A new image has replaced a previous image? It's the same image, but has been modified?
Gene
The image is outside my form, so I am unsure what to do next. Thank you for
the help.
"gene kelley" <ok**@by.me> wrote in message
news:eo********************************@4ax.com... On Mon, 19 Jun 2006 21:38:47 -0700, "Daniel N" <sa***********@yahoo.com> wrote:
Well, when I position the mouse in a certian area, eventually a new image will replace what was there. I wanted to tell my program exactly when that happened.
There's not enough app description given to provide a definitive answer.
You might take a look at the PictureBox Invalidated event which fires whenever an image is loaded. You might be able to adapt something like this:
Private CursorInBox as Boolean
Private Sub PictureBox1_MouseEnter(ByVal sender As Object, _ ByVal e As System.EventArgs) Handles PictureBox1.MouseEnter CursorInBox = True End Sub
Private Sub PictureBox1_MouseLeave(ByVal sender As Object, _ ByVal e As System.EventArgs) Handles PictureBox1.MouseEnter CursorInBox = False End Sub
Private Sub PictureBox1_Invalidated(ByVal sender As Object, _ ByVal e As System.Windows.Forms.InvalidateEventArgs) Handles _ PictureBox1.Invalidated If CursorInBox Then MsgBox("Picture changed") End If
End Sub
Gene
"gene kelley" <ok**@by.me> wrote in message news:aq********************************@4ax.com. .. On Mon, 19 Jun 2006 18:00:11 -0700, "Daniel N" <sa***********@yahoo.com> wrote:
Is it possible to determine if the image under a mouse changes in VB.net code? For example if I position the mouse using the command; Windows.Forms.Cursor.Position = New System.Drawing.Point(680, 595)
Is there code that would help me determine if the image under it has changed? Changed how? A new image has replaced a previous image? It's the same image, but has been modified?
Gene
Daniel N wrote: The image is outside my form, so I am unsure what to do next. Thank you for the help.
Aha, so you are watching another application's window? This most likely
takes you out of the realm of what will be 'straightforward' to do in
VB.NET (or in .NET period) - it will involve API calls, I'm fairly
sure. You might try asking in general terms how to do this in one of
the win32 groups, although their answers will probably be in C++, so be
prepared for that...
Unless of course someone is about to dazzle us with a clean managed
solution?
--
Larry Lard
Replies to group please
On 20 Jun 2006 07:55:27 -0700, "Larry Lard" <la*******@hotmail.com>
wrote: Daniel N wrote: The image is outside my form, so I am unsure what to do next. Thank you for the help.
Aha, so you are watching another application's window? This most likely takes you out of the realm of what will be 'straightforward' to do in VB.NET (or in .NET period) - it will involve API calls, I'm fairly sure. You might try asking in general terms how to do this in one of the win32 groups, although their answers will probably be in C++, so be prepared for that...
Unless of course someone is about to dazzle us with a clean managed solution?
Interesting how these added "by-the-way" statements can change
everything.
Gene
On Tue, 20 Jun 2006 09:37:28 -0700, "Daniel N"
<sa***********@yahoo.com> wrote: The image is outside my form, so I am unsure what to do next. Thank you for the help.
That statement creates a whole new ballgame. If you want to possibly
get some help, you need to describe in detail what the app is all
about. What is the source of the image you are monitoring? (A web
page or webcam app perhaps?). What is supoosed to happen when the
image does change?
Gene
Essentially, I am playing a game using in an application. I am trying to
make a program that would automate me playing. When a clock appears in a
certain portion of the App, it is my turn to make a decision. That clock
appearing is the only way to tell my program when to automate a decision. My
plan was to move the cursor above where the clock appears, then where it
does, have my program automate the decision.
On Tue, 20 Jun 2006 19:16:04 -0700, "Daniel N"
<sa***********@yahoo.com> wrote: Essentially, I am playing a game using in an application. I am trying to make a program that would automate me playing. When a clock appears in a certain portion of the App, it is my turn to make a decision. That clock appearing is the only way to tell my program when to automate a decision. My plan was to move the cursor above where the clock appears, then where it does, have my program automate the decision.
There is really no reliable way to do what you want to do. Outside of
your application, the cursor is a screen cursor or the cursor of
another application.
Good Luck,
Gene This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Wonko |
last post by:
Here's my problem if anyone could be so kind to help me out. I assume
it's quite easy for an experienced programmer but I'm not one of them
:)
I have a JavaScript code that:
- displays multiple...
|
by: masantha wee |
last post by:
Hi all,
I am using Firefox and embedding Javascript in html. I understand that
we can use mouse events by coding them in the body of html (by creating
a button or anything and by adding in the...
|
by: Carlos García-Carazo |
last post by:
Hello,
I am working on a C# application for an industrial machine, using Windows
Forms,
where the user could look at the screen from a 90 degree rotated position,
like he
could turn the monitor...
|
by: Henry Wu |
last post by:
Hi, I see examples of Magnifying an area under mouse coordinates to a
form or picturebox using VB6 and VC6, does anyone know how to do it
under VB.NET? Its nice to use the new GDI+ for it.
...
|
by: Niels Jensen |
last post by:
I have been developing a little project which draw's a hexgrid on a panel
within a form similar to this - it:s used as a client from a e-mail based
strategy game:
____ ____
/ \...
|
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...
|
by: quickcur |
last post by:
Hi, I have html like this:
<div id="myCanvas" style="border:10px,
black;position:relative;height:250px;width:100%;">
<img id="p" src="p.jpg">
</div>
When user click the mosue, I would like
...
|
by: vsvnmurthy |
last post by:
Hai ,
When i am trying to load an image using javascript popup window(same dimensions of image), the status bar and Mouse pointer showing continuous loading even though image loaded.
How can i...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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
|
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...
|
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,...
|
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...
|
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...
| |