Derive Coordinates From An Array Value?

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


ADVERTISEMENT

Take Recorded Coordinates (x,y) And Place Them Into An Array?

Jul 22, 2011

How can I take recorded coordinates (x,y) and place them into an array? I have the variables set up and everything, but I am unsure how to declare the array for this purpose and how to take what I have in the array and graph the coordinates later on.

Here is the relevant

vb.net
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
TextBox1.Text = TextBox1.Text + 1

[Code].....

View 9 Replies

Set Coordinates For Each Beam At Intervals Of 610 Then Write That Coordinates System To A Text Based *.SCR File

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

Translate MouseEventArg.Location X,y Pixel Coordinates To Custom Grid Coordinates?

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

Derive A Class From Double?

Mar 10, 2009

It seems like SO often I need to attach a "valid" flag to a standard type. For example - I have a function called "CalculateLunchTime" that I pass a vector of times. If the vector has 0 elements, they did not take a lunch, so the duration is 0 minutes. If the vector has 2 elements, subtract them and that is the lunch duration. If the vector has one element, it doesn't make sense to calculate a duration, but I don't want to return 0 because that was for the first case. In this case the valid range is >0, so of course I could return -1 or something, but it really bothers me having these magic numbers running around. I would really want to do something like

public function LunchTime(byval Times as list(of Date)) as ValidDouble
dim lunch as ValidDouble
if Times.count == 2

[Code]....

Of course I could make a struct with a double and a bool, but I have really never seen anyone else do that so I feel like it could be a bad idea (why?). It would seem a little nicer if I could derive ValidDouble from double.

View 3 Replies

Is It Safe To Derive IV And Key From The Same Password

Jun 25, 2009

I need to generate the IV and the KEY for an AES cryptography. I want to use the password and i am asking if it is safe to use the same password to get the Key and the IV?

View 2 Replies

Way To Derive The Current Function Or Sub Name?

Oct 7, 2010

As part of my exception handling, particularly in class modules, I like to pass back the offending module name and the procedure in which the exception ocurred. I can get to the module name by using;

Me.ToString
and that returns AppName.ModuleName Is there a way to programatically get to the function or sub name. For now, I have to hard type it like this;

[code]....

View 3 Replies

Derive Address Of A Function That Is Passed As An Argument?

Nov 26, 2009

ok basically i've got a delegate ByVal function_to_execute As dele0 but instead of invoking it, i wish to add it to an eventhandler

Public Sub test(ByVal function_to_execute As d0)
Dim t As Timer = New Timer()
AddHandler t.Tick, AddressOf function_to_execute.address

[code].....

View 4 Replies

Allow The User To Enter Coordinates (X And Y Coordinates)?

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

Photo Coordinates Vs. World Coordinates?

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

Getting The Coordinates Of A Object

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

How To Get Coordinates Of Another Program

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

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

IDE :: Getting The Screen Coordinates?

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

Assign Coordinates To The Buttons?

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

Forms :: Getting The Coordinates Of A Object?

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

Get Another Application Relative Coordinates?

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

Get Mouse Coordinates On A Control Behind An Another?

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

Get The Actual Pixel Coordinates?

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

Get The X And Y Coordinates Of A Mouse Click

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

How Are Coordinates Calculated On A Form

Dec 5, 2009

How are coordinates calculated on a form?

Consider the following code:

[Code].....

View 1 Replies

Itextsharp: Getting Coordinates Of Image?

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

N00b: Get The Workarea Coordinates?

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

Painting A Polygon Given The Coordinates?

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

Printing Coordinates For RTL Using The PrintDocument?

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

Show Coordinates In Picturebox?

Feb 27, 2010

Show coordinates in picturebox?

View 1 Replies

Tracking Mouse Coordinates

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

VS 2010 Clicking With Coordinates?

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

VS 2010 How To Create Coordinates Box

Aug 7, 2010

how i can create Coordinates box? like in Camtasia studio?

View 10 Replies

VS 2010 Screen Coordinates?

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







Copyrights 2005-15 www.BigResource.com, All rights reserved