How To Get Coordinates Of Another Program
May 26, 2011How would I be able to get the X,Y coords of another programs top-left corner? I am trying to make a program that "attaches" to the top of a foreign program.
View 5 RepliesHow would I be able to get the X,Y coords of another programs top-left corner? I am trying to make a program that "attaches" to the top of a foreign program.
View 5 RepliesI am trying to build a coordinates system but am having trouble with how to.. What I have sofar is a textbox that allows the user to enter a length. This length is user defined but never smaller then 610 in length since this is the minimum unit size we use to build timber frames. The overall length of a timber frame is infinite (well not really, but it is for what I want) the timber frame has beams every 610mm set apart from each other (this is a legal requirement) so I want my vb.net to set coordinates for each beam at intervals of 610 then write that coordinates system to a text based *.SCR file
[Code]...
I want to translate MouseArgEvent.Location (x,y) coordinates into my custom graph coordinates. Mouse Y coordinates increase from top to bottom while my grid's y value increase from bottom to top. Given my following code, I would need to create 21,500 separate conditional expression for 100(y) x 215(x) possible coordinate locations for my grid.
Sub OnMouseMove(ByVal e As System.Windows.Forms.MouseEventArgs)
If e.X > 48 AndAlso e.X < 50 AndAlso e.Y > 397 AndAlso e.Y < 399 Then
MessageBox.Show("about 0,0")
[code]....
Basically what I would like to do is take a screenshot of a portion of the screen based on coordinates taken with the mouse left button click.
what I can do up to now is get the coordinates with the mouse and show these in a label thanks to[code]...
What I thought to do is take the coordinates of the upper left corner and lower right corner and make a screenshot thanks to these coordinates.
I've got a piece of code of a class. When initialised a new object is made on a picturebox. But what I don't know is how does the program know that the public property x and y means the coordinates of the object?
[code]...
Develop a Company Logo application that allows users to draw shapes. The application should provide the user with RadioButtons to allow the selection of the next shape to be drawn. TextBoxes should be provided to allow the user to enter coordinates (X and Y coordinates) of the shape, the width and the height of the shapes. Users should also be able to change the shape�s colour.my question is how to allow the user to enter coordinates (X and Y coordinates) of the shape, the width and the height of the shapes and change the shape�s color from combo box. pro help
below is my code:
Public Class Form1
Dim mycolor As Color
Dim mypen As Pen
Dim mygraphics As Graphics
[code]....
I have a Geo-tagged snapshot (photo) captured with a my digital cam.
I want to read world coordinates (real coordinates) upon click on any pixel on this photo.
I'm just new with visual basic. I would like to ask a question regarding coordinates.. Suppose I have object lets say a button how do i get the coordinates of the button in the form? also I want to button to move given a particular path, example if i draw a vertical line, the button will follow the line and move vertically. how do i get the coordinates of starting and endpoints of the line?
View 2 RepliesI am using the following to store the X Y cords
Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
MyX = Me.Location.X
MyY = Me.Location.Y
My.Settings.Save()
End Sub
But the Me.Location.X or .Y are not detecting the forms position when I move it?
it is designed to be able to interact with foreground windows and display certain bits of information as each foreground window is displayed. The foreground window will most of the time NOT be a windows form so this makes things that bit more trickier for me. The program below doesn't produce any errors but the problem arises when I try and get the X, Y coordinates of the cursor, at the moment when ever the cursor is moved around I get a very long number as the X and nothing returned for my Y. I find I can set the X,Y coordinates to anywhere on the screen, can also get the foreground forms title,it's RECT coordinates but need to get the cursor info correctly.
Option Explicit On
Imports System.Text
Imports System.Runtime.InteropServices
[code]....
I'm trying to assign coordinates to the buttons I dynamically placed on the board, so that I can use those coordinates to place bombs, numbers etc I tried a collection and an array but doesn't seem to work Attached is a picture of the game board, I have literally spent days on this.
[Code]...
I've got an array that contains the following:
a;b;c;d
but it can also be that this array contains this:
a;b;c;d;(0,0,1000,1000)#(1000,1000,2000,0)
So first I do a split on ";"
If Ubound(array)= 4 then I now the second case with coordinates is valid... in this case 2 sets of 4 coordinates
How do I derive them from array(4) as xstart0,ystart0,xend0,yend0 and xstart1,ystart1,xend1,yend1 ???
Do I need to do another split on "#" first and then on the "," ?
Suppose I have object lets say a button how do i get the coordinates of the button in the form? also I want to button to move given a particular path, example if i draw a vertical line, the button will follow the line and move vertically. how do i get the coordinates of starting and endpoints of the line?
View 1 RepliesI'm writting a small program to send data to another application.Have not probs with that, my only problem now is to get the coordinates relative to the screen of that application so I don't need to move it, when I start the application, or to avoid probs if the customer moves that application on the screen.Currently this is my code to find if the other application is running or not, and if running then move it to the left upper corner of the screen.
Dim nWnd As IntPtr
Dim ceroIntPtr As New IntPtr(0)
Dim Wnd_name As String
Wnd_name = "thisname"
[code]....
Is there any way to get the mouse coordinates on a control behind an another control.
The exact scenario is, I have a picture box of size 1024*1024 and and an another picture box of size 256*256 over the bigger picture box (of size 1024*1024). Now, when I move my mouse over smaller picture box, I want the mouse coordinates with respect to the bigger picture box behind the smaller picture box on which the mouse is moved.
how can i get the actual pixel coordinates, in the pb_mousemove event, from an image with sizemode stretched or centered or zoomed?
the e.location property returns the location in the picturebox, but i need to compensate for scale + the left + top offset of the image.
I have an image that the user clicks on and I need to capture the X and Y coordinates of that click. This is what I have but it gives me the x and Y coordinates for wherever the mouse is located.
[Code]....
How are coordinates calculated on a form?
Consider the following code:
[Code].....
in vb.net is it possible to get the coordinates of an image like if i do a
document.add (jpeg_image)
x_coordinate = jpeg_image.xcoordinate???????
I am a complete n00b to VB. I was looking for a solution to get the coordinates for the users work area and the following on the net. However when i use it i get all values as 0
[Code]...
I just finished creating a program where you find the area of a 5 sided polygon. But not I want to actually draw the polygon given the coordinates
Private Sub PI_Estimation_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
Dim myGraphics As Graphics
[code].....
I'm sending a rtl text "Arabic" to a receipt printer. My problem is in selecting left and top coordinates for each line. If the paper width changes the whole procedure needs to be written for that specific width, because I'm measuring form the left edge. Is there a way in the printDocument object that flips the starting point from left to right?
p.s. the format string in the args.Graphics.DrawString() only select the direction of the printed string in case it has some numbers and symbols but it doesn't start the string from the right edge of the page.
Show coordinates in picturebox?
View 1 RepliesWhat are the correct commands for finding the coordinates of the mouse, either in relation to the form or in relation to a control such as the picturebox? I want to track it's position when it's hovering over a control.
View 3 Repliesso I want to click a button with it's coordinates. I know it can be done with the mouse event but the only problem is that it has to be focused and I don't want that to happen. The button has no id nor a name. So this is the button
View 5 Replieshow i can create Coordinates box? like in Camtasia studio?
View 10 RepliesI might sound somewhat 'newbish', this is my first post on VB. I was wondering if anyone knew how to convert screen coordinates so it works on other screens as well, I made 2 programs, one to get 'my' MOUSE coordinates and the other to click where I want it to click.
[Code]...
I was wondering what would be an easy way to get the coordinates within a webbrowser?
View 3 RepliesAnother little problem.I have a form with a control (Picturebox or perhaps flash) which uses graphic hotspots instead of controls with handles so when the control receives a mouseclick, it does different things depending on the coordinates of the click.I can obtain the handle for the main control and can see where the hotspots are as they look like buttons and set a point to that location.How can I send a mouseclick (WM_Mousedown?) to the precise point on the control?If I'm not mistaken, using Sendmessage with BM_Click would tell the control it was clicked but without coordinates.I'm trying to do this using Visual Basic from Visual Studio 2008
View 6 Repliesimplementation of SystemParametersInfo
View 3 Replies