Polygon Area And Centriod Coords?

Jan 5, 2010

i dont know how to do this.i need to create a macro to use on microsoft excel to calculate the area of any polygon. my problem is similar to this one: [URL]..but de vb code is not working for me.in attach i send the excel page.i also have to calculate the coordenates of the "center of mass", Cx and Cy using diferents functions.

View 1 Replies


ADVERTISEMENT

Drawing Polygon Within A Polygon At Runtime?

Jun 7, 2011

how do you draw or place a polygon/line within another polygon e.g. a circle within a triangle.

View 5 Replies

Get The Points Which Make A Polygon From A Region Which Was Derived From The Polygon's Points?

Jan 31, 2010

how can i get the points which make a polygon from a region which was derived from the polygon's points?

View 1 Replies

Web Cam XY Coords Of Dot

Jul 22, 2010

I'm working on a project for personal use. I have a web Cam where I took out the lens and replaced it with Blue and Red Cellophane, to filter out light.

The web cam is fed into VB and an infrared (IR) light is shined into the web cam from different positions.

This produces a Black image with a bright white dot moving around.I would like to know if there is a way to get the Dots coordinates (or any other way to measure relative movement from the first dot).[code...]

Would it be viable to take snapshot of webcam's video and search with this engine? (I assume testing is the only way which I am about to try...)

View 1 Replies

X-y Coords Of MenuStrip Item?

Dec 20, 2010

I want to show a ContextMenuStrip beneath a MenuStrip item when that item is clicked. Stuff in the ContextMenuStrip changes dynamically. The ContextMenuStrip is used in a DataGridView. I don't want to duplicate the same items in the MenuStrip.

I can get the mouse coordinates OK, but I don't want that. I want to use the ContextMenuStrip show method referenced to a control. An item in the MenuStrip is not a control, but the entire MenuStrip is a control. If I can get the x-y position of the item in the MenuStrip I can show the ContextMenuStrip in the right place, and it will look just as if it was part of the MenuStrip. how to obtain the location of the MenuStrip item that's active.

View 1 Replies

XY Coords From Mouse Click?

Sep 20, 2010

I am working with a PictureBox and trying to click on the picture and OnClick i want to capture XY coord from the cursor.

I am using the following code

Private Sub PictureBox1_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseClick
Dim X As Long

[Code]....

The issue i have is that no matter where i click on the picturebox it returns a 0 for both the X and Y coordinates.

I read something somewhere about seting the Scale to Pixel but that doesnt seem to be working for me.

View 2 Replies

Set The Viewable Area To A Smaller Screen Area?

Jun 11, 2012

Trying to set the viewable area to a smaller screen area and have it cycle through as the person moves using collision detection to move the backgroudn image. Here is the start but its off to a bad start so far.

Public Class Form1
Dim Mapx As Integer = 600
Dim Mapy As Integer = 2000

[code]....

Basically the forum size is set to 600x2000 but the client should only allow you to view 600x600. I want it to add +1 once you "collide with a invisable box I'll add and this will redraw the screen.

View 4 Replies

Specify Actual Usable Form Area Instead Of Outside Area?

May 12, 2010

I designed a form and managed to fit graphics inside it. Picture box is 465 pixels high. Form1 is 500 pixels high. SnapShot of the screen verifies that the 500 pixel height is the overal height. It includes the upper Bar and lower frame. Is there an instruction to set the From's inner pixel size and not overal?

View 2 Replies

VS 2008 - How To Jump To X / Y Coords On Picture

Sep 18, 2011

I have a vary big picture with a map on it but the picture is 4110, 4110 X Y. Any way to jump to an x y coords on the picture its all in a panel control.

View 7 Replies

VS 2010 Getting X / Y Coords From Mouse And Clicking

Feb 10, 2011

I am trying to make a program so that u can click a button to save multiple spots on the screen of the x/y coords of the mouse and then after you choose them there will be a hotkey u can press that will automatically click on each of the x/y coords that were chosen earlier. I am not really good at this stuff but if someone could help me out that would be really awesome! =D

View 1 Replies

Tile Game: Converting Pixels To X/y Coords

May 5, 2009

So now I'm working on the map editor for my game. The map itself displays 32x32 pixels out from the upper and left bounds of the form. Each tile is also 32x32. So then i have two labels which display the corresponding coordinates divided by 32, this way it would show you x: 7, Y: 8, or whatever. The issue is that the map will be like 15x10, and when moving the mouse to the 15th row/column, it shows 15, but then moving to the 14th row, still shows 15. The rest of it works fine. Here is the code.

Private Sub FrmDesign_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove
If e.X < (subZone.Width * 32) + 32 And e.X > ((subZone.Width * 32) -

[Code]....

View 3 Replies

Vb 2008 Click On Specific Window With Coords

Jul 7, 2011

i'm using Visual Basic 2008, and my question is following: Is here a way to make vb2008 app click on specific window with coordinates? for example i want to click on my notepad window ( for example on next coords: 20;150 )

View 1 Replies

VS 2008 - Changing Mouse Position Coords Based On Form?

Oct 18, 2011

Basically I want to move my mouse to the coords that is received based on the location of a certain coloured pixel. I can get the coords of the pixel but when using them on mouse position, the mouse position is based on the entire screen rather than the form. How could I change the position coords based on the form rather than the entire screen. E.G. If a certain coloured pixel is 2,2 in a form and I put that as the mouse position, it would go outside the form but I dont want that. I want it to hover of the pixel coords

This is my
Dim bmp As Bitmap = DirectCast(PictureBox1.Image, Bitmap)
For x As Integer = 0 To bmp.Width - 1
For y As Integer = 0 To bmp.Height - 1
If bmp.GetPixel(x, y) = (Color.FromArgb(108, 90, 60)) Then
Windows.Forms.Cursor.Position =
End If
Next
Next

View 2 Replies

Use WPF Polygon In Another Thread?

Nov 19, 2010

I'm having an issue when passing an object of type Dictionary(Of Int16, Polygon) as an argument to a backgroundworker so the background worker is able to access the Polygons in the Dictionary. I'm getting the typical "The calling thread cannot access this object because a different thread owns it" message.[code]...

View 2 Replies

Calculating Points On Polygon?

Apr 11, 2012

how can i calculate the 13 points on the polygon (see image)?

the 2 points either side of the centre points

are +/- width or height * 0.2761423749154

i have 4 known points, topLeft, topRight, bottomRight, + bottomLeft.

the polygon won't always be a regular rectangle as it is in the image

View 11 Replies

How To Check For Point Within Polygon

Nov 27, 2010

If I have some polygon lat lon coordinates stored in sqlserver db. how would I query it to see if a point was in contained within a polygon?

View 2 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

.net - Polygon From Collection Of Latitudes & Longitudes?

Dec 23, 2011

I have a collection of latitudes and longitudes and I'll be grabbing sets of these and want to draw a polygon based on them.The datasets won't be the outline so will need an algorithm to establish which ones make up the outline of a polygon containing all the latitudes and longitudes supplied. This polygon needs to be flexible so the polygon can be concave if the points dictate that.

My code below produces a horrible looking polygon. As explain in my first post I want to create a nice concave or convex polygon based on the latlng's provided.Just need a way of plotting the outer latlngs.

function initialize() {
var myLatLng = new google.maps.LatLng(51.407431, -0.727142);
var myOptions = {

[code]....

View 1 Replies

Finding All Points Inside A Polygon?

Feb 9, 2011

I'm making a game for a school project We've created a character that moves around the screen and creates blocks behind him as he moves around.We want to make it so that when the character moves from one edge of the screen to another, it fills the screen. So in order to do this we have a Points array that stores every point the character touches on his way to a wall.We then fill the Points array with "formsurface.fillPolygon(Points)"Now I'm wondering is there anyway we can retrieve all the points that are WITHIN or INSIDE the Points array we made? ( remember the points array simply contains the outline or the path the character created, we're filling inside that outline)

View 1 Replies

Inflate An Array Of Points Which Describe A Polygon?

Jan 31, 2010

how can i inflate an array of points which describe a polygon?

View 1 Replies

Random Scaled Polygon - Different Coordinates And Colors

Apr 21, 2009

On click, I'd like this piece of code to create new polygon, shown in multiples with different coordinates and colors, sizes and orientation. Color and polygon in multiples works. My issue is I'd like to add more code that will allow each of the multiple polygon created scaled randomly and rotated. How to keep the polygons inside the canvas?

So far looks like this when user clicks start: [URL]

Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles startButton.Click
Dim endCount As Integer = random.Next(1, 10)
Dim plotPoint As New Point
For count = 1 To endCount
[Code] .....

View 1 Replies

Use Point In Polygon Function In Visual Basic

May 18, 2009

I'm working on a small freeware application in Visual Studio 2008 Standard that will match geographic data to a geographic position. For this I need some mathemathical functions and one of them is how to detect if a point is inside a polygon. There's a great solution for this from the Microsoft team at: [URL]

but it is in a different programming language that I do not know anything about. How can I use these functions in my program? I'm afraid that if I try to rewrite them in Visual Basic I'll make mistakes that I can't detect. To be complete, I'm not using screen graphics so I really need a mathemathical solution.

View 4 Replies

Wpf - Create 'object' Containing A Polygon And Variables And Other Data Elements

Apr 6, 2012

I'm trying to write a simple game ui, it is grid/tile based, and i have the grid built using grid column and row definitions and I'm successfully placing objects in various grid locations. I am currently stuck as trying to build the player object. I want a single object reference to represent the various components of the players piece.

Currently I am using a polygon to represent the piece on the grid. Eventually I want to replace this with images or something. I want to add in properties for what weapon and armor it has equipped I want properties for health

Essentially in code i want something like this

dim player1 as new playerobject
player1.polygon.points = 0,0 60,30 0,60
player1.health = 100

[Code]....

I can instantiate all this as separate variables etc, but I'd like to have a singular reference that contains all the variables, properties, objects, controls etc.

I'm using vb .net in vs 2010 (and no, I'm not looking to write in something else)

View 1 Replies

Wpf - Create 'object' Containing A Polygon And Variables And Other Data Elements?

Jun 10, 2011

I'm trying to write a simple game ui, it is grid/tile based, and i have the grid built using grid column and row definitions and I'm successfully placing objects in various grid locations.I am currently stuck as trying to build the player object. I want a single object reference to represent the various components of the players piece.

Currently I am using a polygon to represent the piece on the grid. Eventually I want to replace this with images or something.I want to add in properties for what weapon and armor it has equipped I want properties for health Essentially in code i want something like this

dim player1 as new playerobject
player1.polygon.points = 0,0 60,30 0,60
player1.health = 100
player1.weapon = "axe"
etc

I can instantiate all this as separate variables etc, but I'd like to have a singular reference that contains all the variables, properties, objects, controls etc.I'm using vb .net in vs 2010.

View 3 Replies

Created A Polygon Shape And Filled Which Fills Blue On Startup?

May 31, 2010

I've created a polygon shape and filled which fills blue on startup.Upon toggling a check box it should be filled yellow.It doesn't go yellow (unless i step through in debugging).

[Code]...

View 7 Replies

Draw A Foursided Polygon When User Clicks Corners In .net 2008?

May 30, 2012

I am writing a program wherein the user draws shapes by clicking a button for the desired shape and then clicking on points on the drawing area. I cannot figure out how to store four clicked points to create a foursided polygon. I read many articles that say use the "mousedown" command and store points in a list, I have tried but it's not working for me. To summarize, I need the user to click the polygon button, go to the drawing area, click four points and have a foursided polygon created.

View 6 Replies

Extend The Client Area Of Form To To The Non-client Area?

Nov 19, 2009

I guess thats what I need to do, Im trying to allow the user to right click on the top of my form, and my custom Context Menu Strip is displayed, not windows context menu strip. I guess somehow i would need to get the size and draw a rectangle on the non client area and see if the user has right clicked in that rectangle? if so how would I get the area of the non client area?

View 7 Replies

Error Message "5:Object Is Currently In Use Elsewhere." When Drawing Polygon

Jun 22, 2010

I am developing the map tool application in vb.net where user can create maps. I gave the check boxes for show/hide the layers of map like village boundary(polygon), plot boundary(Polygon), roads(Lines), bore wells(points), dug wells(points), schools(points).

I am using the function RedrawMap for displaying various layers of maps as user checked the check boxes. If user click village boundary map shows the village boundary etc on panel control named "picMap".

The problem i am facing is when user check the village boundary layer map shows the boundary but when user check the next polygon layer i.e. plot boundary layer it gives the error message "5:Object is currently in use elsewhere.".

My code is as follows:

Public Sub RedrawMap(ByVal index As Integer)
Dim f As Font
'Object Style
Dim Size1 As Short

[code]....

View 1 Replies

Offset The Points In A Polygon Without Having To Change Each One Individually The Points Are In An Array?

Apr 20, 2010

is there a way to offset the points in a polygon without having to change each one individually the points are in an array

View 2 Replies

Scan A Certain Area Of A PDF Or Tif?

Mar 6, 2012

I'm looking for a way to scan a certain area of a PDF or Tif,

and extract the OCR regonizied text which will help me rename these documents I have.

What tools or libaries can I use in .NET to make a quick short program to rename

TIF or PDF files into their appropriate name coming from a portion of text that is on each file.

View 2 Replies







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