|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Mouse/Screen Image StatusIs 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? On Mon, 19 Jun 2006 18:00:11 -0700, "Daniel N"
<saintdark_***@yahoo.com> wrote: >Is it possible to determine if the image under a mouse changes in VB.net A new image has replaced a previous image?>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? 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. Show quoteHide quote "gene kelley" <o***@by.me> wrote in message news:aqee92t6obtbnmgeb68j7k0bdj72lv7rfv@4ax.com... > On Mon, 19 Jun 2006 18:00:11 -0700, "Daniel N" > <saintdark_***@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"
<saintdark_***@yahoo.com> wrote: >Well, when I position the mouse in a certian area, eventually a new image There's not enough app description given to provide a definitive>will replace what was there. I wanted to tell my program exactly when that >happened. > 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 Show quoteHide quote >"gene kelley" <o***@by.me> wrote in message >news:aqee92t6obtbnmgeb68j7k0bdj72lv7rfv@4ax.com... >> On Mon, 19 Jun 2006 18:00:11 -0700, "Daniel N" >> <saintdark_***@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. Show quoteHide quote "gene kelley" <o***@by.me> wrote in message news:eo1f92do58ai05bnj54agh44r1rqkche2r@4ax.com... > On Mon, 19 Jun 2006 21:38:47 -0700, "Daniel N" > <saintdark_***@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" <o***@by.me> wrote in message >>news:aqee92t6obtbnmgeb68j7k0bdj72lv7rfv@4ax.com... >>> On Mon, 19 Jun 2006 18:00:11 -0700, "Daniel N" >>> <saintdark_***@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 Aha, so you are watching another application's window? This most likely> the help. 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
Show quote
Hide quote
On 20 Jun 2006 07:55:27 -0700, "Larry Lard" <larryl***@hotmail.com> Interesting how these added "by-the-way" statements can changewrote: > >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? everything. Gene On Tue, 20 Jun 2006 09:37:28 -0700, "Daniel N"
<saintdark_***@yahoo.com> wrote: >The image is outside my form, so I am unsure what to do next. Thank you for That statement creates a whole new ballgame. If you want to possibly>the help. > 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"
<saintdark_***@yahoo.com> wrote: >Essentially, I am playing a game using in an application. I am trying to There is really no reliable way to do what you want to do. Outside of>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. > your application, the cursor is a screen cursor or the cursor of another application. Good Luck, Gene
Oracle read only transaction in VB .NET?
Counting rows in an SQL table Datagrids Locking a Combo-Box How do I make my computer unstupid? asp.net template for user registration Concurrency question how do i compare two string and get the difference? windows Registry parameter "any" VB 6 (what is your equivalent in vb 2005 ?) |
|||||||||||||||||||||||