[2008] Maths - Convert The Distance Between Two Coordinates
Mar 1, 2009
I'm going to start delving into maths in vb Now want I want to do is convert the distance between two coordinates. I've found this linke below on the web. Does anyone have a link to good tutorial for this conversion?
You could check to see if the distance across the form minus the distance across the picture box is equal to the horizontal location of the picture box to see if it's on the right side. For the left side, just check if the horizontal location of the picture box is 0.
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
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")
I'm trying to write a little program to help me find the distance (in feet/inches) between the frames of a ship. This would be fairly easy, except the frames are unevenly spaced.Let's say this is a top view of a shape, and the frames are vertical lines that comprise the overall ship. (In ships, this is the shape of the hull.) Each number is a frame.
1 2 3 4 5 6 7 8 9 10 11 12 13
In this example, there are 1 units between frames 1-3, two units between frames 3-6, three units between 6-9, four units between 9-11, and 1 unit between 11-13.So, what I want to do is post a program where the user inputs two frame numbers: so they would enter, for instance, a start location of 5 and an end location of 11. So, it would calculate the number of units between those two frames based on the limits. So, between 3-6 there are two units, so it would subtract the start location from the nearest limit (6).
6-5 = 1
Multiply by 2 units spacing per frame, so that's 2 units. Frames 6-9 are all included, so 9-6=3 x 3 units = 9 units. Since 9-11 are also all included, it would be 11 - 9 = 2 x 4 units = 8 units. Then the program would add that all together - 2 + 9 + 8 = 19 units total.
Now, for my instance, there are a few more complications (it's in inches, and large increments (i.e. 36" spacing), and there are 304 total frames split between the middle of the ship in two sections, fore and aft of the line), but really I'm just trying to get a handle on how to impose these limits and calculate the distance. Attached is the proposed layout for my program (ignore the 20'5", that's just how I want the output to look).
I am trying to go through a datatable and sort records that fall within a certain criteria, one being distance.I have a function that will get the distance between two points based on Lon/Lat and my records in table have Lon/Lat Values
exisitng code
Dim dtrow As DataRow Dim lat As Double = CDbl(34.213209) Dim lon As Double = CDbl(-118.629276)
[code]....
I can I now use the function to filter records in table that are with a certain distance?
I am attempting to write a speed/distance calculator using visual basic 2008 express edition. I have gotten the program to do most everything I need but am having some difficulties and have been trying to fix them for 2 or 3 days now without any success. Will somebody, anybody please tell me how to fix the problems.The calculator should display the distance traveled when the speed and time are entered. This is the only major requirement. However, It needs to have all info input via a list box with popup windows displayed for speed entry and then again for time entry. I would like a label outside of the list box to show "Total Distance Traveled" and I would like the list box to display the following information
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
I am running a program that is connected through the internet and i gets disconnected at times.wanted to know how this would be to examine a color of a pixel , If the colour turns changes, my mouse will move to reconnect
Trying to do some Maths in vb and have it all out put in lblCost.text
Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click Dim decTax As Decimal Dim decTotal As Decimal Dim decSubtotal As Decimal
I am trying to make a calculator (how original) but I am also trying to make it like a console. I have a textbox in which you enter a command and a list in which the lines appear.
My question is how can I translate the plain text which the user enters i.e 3*(2+4) to a maths command so that VB can display the answer?
I ve done the main main page which includes a button which when pressed will go on the next page etc etc.
The problem that i am facing with is the concept behind creating the main function of the game.
I.e. Once the main screen comes up it will show a formulae eg 3 + 3. After the forumale is shown the user will input the answer and then when they want to go to the next question that click the next button which inturn shows a different question if the answer is correct, if not it will stay on the same forumale. I would also like to add a skip button that will allow the user to skip the question if they cant figure it out.
So yeah my main issue is programming it ( i mean i can add buttons and program them to link to places (and show messages) but that is all lol) .
incase i didnt menmtion earlier, i am using Visual Basic 2005
I have used Winsock to receive coordinate of the objects (displayed in (Rich) Text box). How can I get those data into Excel or anything to display on GIS mapinfo??
VB 6 has a ScaleHeight and ScaleWidth property which VB 2008 does not support and this is causing me fits to work around. I'm trying to draw some lines (a graph) on a Picture Box (or a Panel) using my own coordinates (not pixels). This can't be all that hard can it?
i want to locate specific coloured pixel on whole screen (if i set it to red then it should point cursor on the first red pixel that was found on screen)i managed to get cursor coordinates and pixel color of place where cursor is pointing, but i cant figure this out.
i have two textboxes where a numeric value will get entered into both, these values will then be taken and the first value divided by the second value. The problem i am having is that if for example the first value is 11 and the second value is 10, when i divide 11 by 10 the result is 1. I have tried setting the output format to have 2 decimal places but it still displays 1 instead of 1.1. [Code]
I am fairly new to programming so please bare with me. For my coursework, I am making a maths quiz which allows the teacher to add or edit questions and solutions. then these solutions and quetsions form a quiz that students can access.But I dont know how to allow the teacher to use the weird maths symbols. The quiz is only going to be about algebra so no complex symbols are required, I saw some of these symbols in unicode. But dont know how to make that symbol appear in textbox which the teacher is going to use to enter questions etc.
I would like to develop an application that involves a lot of tables and maths, and then displaying the results. I can visualize how this would work in SQL, as far as creating the stored procedures and tables required, however the front facing application would be a completely new experience to me.I would probably be sharing the built application with friends, but completely as a no profit tool. I assume that the developer edition of dot net is a suitable option? My main query is, is dot net really the best way to develop this tool? I have a strong feeling that I will not be able to use SQL as this would require a server to be run, and this is not practical. Can the tables be implemented into a DLL or similar to be used by the application for example?
is there a way of getting the screen coordinates of individual cells on an open Excel sheet, what I want to ultimately do is pass in a cell range say, "A5" into a function and watch the mouse cursor move slowly to that cell. I know this might seem a weird request. I already have a mouse move function but that accepts the x/y coords in pixel terms where excel using .TOP and .LEFT give an entirely different format?