How To Store X / Y Coordinates
Aug 15, 2011
I 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?
View 2 Replies
ADVERTISEMENT
Dec 2, 2010
I 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]...
View 1 Replies
Nov 29, 2010
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]....
View 5 Replies
Jan 18, 2011
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]....
View 3 Replies
Mar 26, 2012
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.
View 1 Replies
Mar 22, 2012
I am coding a program that will allow the user to input 5 payrolls for Store 1, Store 2, and Store 3. The total of the 5 payrolls are then added together and shown in the respective Store's labels. A total label is also there to add up all the totals into one number. The numbers in the label must be in currency form. My problem is the numbers don't add correctly when I hit calculate. The first two numbers add together, but then after that the number just seems to subtract a random amount.
So far I have this --
Public Class Form1
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.Close()
End Sub
[CODE[...
View 14 Replies
Feb 19, 2009
i know that integer is a variable to store whole numbers and that a string is a varialbe used to store any text, but what variable type would you use to store a number that has decimals?
View 7 Replies
Apr 15, 2012
"Create a class called Invoice that a hardware store might use to represent an invoice for an item sold at the store. An Invoice should include four pieces of information as instance variables--a part number (type String), a part description (type String), a quantity of the item being purchased (type Integer) and a price per item (Type Integer). Your class should have a constructor that initialize for each of the four instance variables. Provide a property for each instance variable. If the quantity is not positive it should be set to zero. If the price per item is not positive it should be set to zero."
I attached the code I have. obj is underlined and says "Argument not specified for parameter 'Invoice4' of the 'Public Sub New (Invoice1 As Object, Invoice2 As Object, Invoice3 As Object, Invoice4 As Object)' and so the program won't run. What am I doing wrong?
Public Class Form1
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim obj1 As New Invoice(Val(TextBox1.Text))
TextBox1.Text &= obj1.Invoice1 & vbNewLine
TextBox1.Text &= obj1.Invoice2 & vbNewLine
TextBox1.Text &= obj1.Invoice3 & vbNewLine
TextBox1.Text &= obj1.Invoice4 & vbNewLine
[CODE]...
View 14 Replies
Jun 22, 2010
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 Replies
May 26, 2011
How 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 Replies
Apr 13, 2010
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]....
View 2 Replies
Mar 22, 2009
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]...
View 4 Replies
Apr 30, 2012
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 "," ?
View 6 Replies
Nov 9, 2009
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 Replies
Jun 17, 2009
I'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]....
View 2 Replies
Dec 23, 2011
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.
View 1 Replies
Feb 24, 2011
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.
View 3 Replies
Mar 31, 2011
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]....
View 5 Replies
Dec 5, 2009
How are coordinates calculated on a form?
Consider the following code:
[Code].....
View 1 Replies
Dec 15, 2009
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???????
View 1 Replies
Jun 4, 2009
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]...
View 7 Replies
Feb 18, 2011
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].....
View 1 Replies
Sep 20, 2009
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.
View 1 Replies
Feb 27, 2010
Show coordinates in picturebox?
View 1 Replies
Sep 11, 2009
What 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 Replies
Jun 25, 2011
so 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 Replies
Aug 7, 2010
how i can create Coordinates box? like in Camtasia studio?
View 10 Replies
Jan 19, 2012
I 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]...
View 1 Replies
Mar 25, 2011
I was wondering what would be an easy way to get the coordinates within a webbrowser?
View 3 Replies
Oct 12, 2009
Another 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 Replies