Create A Rectangle For Two Points (vector)?
Nov 15, 2011
I am wanting to create a rectangle for two points (vector). I need a function that takes two points and a length and calculates a perpendicular point from line (vector) AB, to a given length.
I found this code, however it doesn't seem to work.
[Code]...
View 2 Replies
ADVERTISEMENT
Sep 6, 2010
Looking for something like:
dim rect as system.drawing.rectangle
For each point in rect
Debug.print(point.name, point.value)
Next
View 2 Replies
Jul 20, 2010
I'm making a game that needs to hit test a Rect object inside 4 points that basically forms rotated a rectangle. This means I can't use the Rect class's IntersectsWith function to hit test. So my question is: if I have 4 points that creates an imaginary rectangle of any orientation, how can I tell if another rectangle is inside the "fence" so to speak?
View 9 Replies
Nov 17, 2011
I have a camera in my 3D game. I have a start vector and and end vector for its positioning. I am wanting to move it smoothly from the first vector to the end vector.
View 2 Replies
Oct 2, 2009
I'm trying to create an array of Points but can't seem to get it right.
I can create an array of Integers just fine.
Dim MyArray() as Integer = {1,2,3,4,5}
View 3 Replies
Jun 5, 2011
How to make back-up and restore point? what I want to happen is when I click the button back-up. It will generate a back-up of database in access on the current date. And if I click the button restore. the system will restore the last back-up point. So that when there is a file accidentally deleted, the system can retrieve it again.
View 1 Replies
Mar 14, 2009
currently i dont have any code to show but i am curently creating an application on a windows mobile 5 device and wondered how i can plot a route manually....ie what i want to be able to do is use the stylus to touch somewhere on the screen and plot that as point A, then touch the screen somewhere else and plot that as Point B (in some sort of database) so that i can review that route afterwards
View 1 Replies
Aug 25, 2011
I am attempting to draw and fill a rectangle using percentages passed through the text properties of 4 textboxes. I am attempting to do this in VB 2008. For example:
textbox1, 15%, green
textbox2, 35%, blue
textbox3, 40%, red
textbox4, 10%, orange
View 1 Replies
Mar 30, 2012
I am creating a points system for a game, this is the code I have but it isn't working as I want it to.
Dim intScore As Integer = 10
Dim intNumOfGames As Integer = 0
intNumOfGames += 1
intScore = intScore - 2
The user will start will a score of 10, but everytime they click the button the user should lose 2 points off the score. But my code above that doesn't happen, when the user clicks the button it only happens once leaving the user with 8 points throughout the game.
View 1 Replies
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
Apr 3, 2012
I need to calculate a couple of lengths and an angle, so basic trig. Embarrassingly I can't remember enough of my school trig to sort this out in my head.
Here's the problem pictorially, I need to calculate the two variables in red text (with light blue background) where Radius can anything between 1 and "r.Height /2" and r.Width can be anything between >0 and Radius.
The only other thing I can tell you is ther total width of the dark blue rectangle and the % of that width that r.Width represents - I didn't include it in the picture since it didn't seem relevant.
Ultimately I am trying to create a rectangle to use with GraphicsPath.AddArc.
View 2 Replies
Nov 16, 2009
In need of some desperate help. Has anyone had any experience with a software product called Pres? The programme provides a function (userhook) that can run externally created dll's as the programme offers no COM support. The basic requirements for the dll are as follow.
1, The dll requires a public function named UserInstruction
2, The UserInstruction must have 5 parameters. The first and second of type long, the third a double array and the fourth and fifth parameters required type is a string.
This all seems pretty simple. But as .NET doesnt support exporting functions within a DLL to allow direct public access to the function through third party software it becomes tricky. After doing some research it seems as though this isn't possible in .NET. The only way I can see to do this is to convert the dll to Intermediate Language and play around with it once this is converted and then convert the IL code back to a DLL. I found this on the following site [URL]..After trying this when I try to use the DLL via Pres I am still getting no joy.
View 1 Replies
Jul 26, 2010
i've got a little problem with List(on T) variables.
[code]...
It works perfectly fine. Does anyone know what the problem is?
View 2 Replies
Feb 22, 2010
Given a rectangle of width w and height h. and a coordinate x,y in that rectangle I would like to identify which triangle I am within.
i.e. the function should take parameters(x,y) and return a,b,c,d or a zero based number representing that triangle index i.e. (0=A,1=B,2=C,3=D) if they are in that order.
I think this would be something like >= the formula of the red line and >= the formula of the green line?
I'd like to implement this in VB.NET
View 3 Replies
Feb 14, 2011
i'm trying to create a flat tabcontrol with a rounded rectangle tab for the selected tab + no border for inactive tabs?basically i'm trying to recreate that ribbon control in a very simplified form as a usercontrol.
View 5 Replies
Dec 3, 2011
This code is to draw rectangle. How can I draw rectangle divided to four rectangle or more
e.Graphics.DrawRectangle(Pens.Coral, 50, 200, 30, 40)
View 11 Replies
Jul 26, 2009
I'M creating a kind of photo viewer, and I cannot figure out how to orient the scroll buttons with the photos I want to draw because they all are different sizes.This is really hard to explain so please ask questions if you don't understand.I'M thinking if i could draw every photo on a single rectangle and then the scroll bars will position that rectangle up or down. but is there a way to make a rectangle inside another one so it only shows inside that rectangle?
View 10 Replies
May 14, 2010
I have found how to create a metafile using graphics but I can't save it to a vector file. I tried the Metafile.Save("*.emf") function but when I insert the image into PPT, it appear to be a bitmap when I enlarge it.
Here are the code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Using gRef As Graphics = Me.CreateGraphics
Dim hdc = gRef.GetHdc()
[code]....
View 4 Replies
Sep 21, 2009
Can I get an example of how to make something like a Vector or an ArrayList in Visual Basic .NET?
View 4 Replies
May 20, 2009
is it possible to save inkstrokes in a format that is something like a vector typein order to be able to keep its features independetly of its magnification?
View 1 Replies
Feb 15, 2010
Is it possible to insert vector images (ecw or ai) in an VB.NET application? If so...is it possible to zoom in on them and keep the same precision? I'm trying to create a very basic GIS system and I need to zoom in on some places.
View 11 Replies
Nov 5, 2010
Have some vector graphic files stored as hex strings, I ahve now idea how to go about displaying these as graphics,
View 1 Replies
May 5, 2011
I need to write a simple program that imports tab delimited x,y coordinates into a simple form, by clicking an "Import" button and navigating to the particular .txt file. On the button press I want to read the text file and display these in the shape of anything from a simple square to a slightly more complex closed polygon (maybe using a path function) in the main picture box to view the shape.
Then I would like to press an "Export" button and save the displayed shape coordinates/vertices back to a file location of my choice as a .txt file.
View 16 Replies
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
Nov 4, 2011
suppose i have a tree that have a root node. that root node have 3 child nodes. each child node have 3 child nodes and so on say up to level 4. if i number each node from the root node and numbering from left to right, the root node being number 1 and the left child of the root being number 2, the middle child of the root being number 3 and the right being number 3. on the third level the left child node of the left child node of the root being number 5 and so on. if i have numbers 1 up to 13 and want to put each number into a node numbered the same i.e number 1 gets into the root node, number 2 gets into the left child node of the root and so on. how would i achieve that.
View 1 Replies
Sep 13, 2010
I have a program in C++, that is doing some calculations. I use a vector in C++ and resize the vector in the program, in order to conserve and allocate memory. Can you allocate memory in vb.net? So if my user inputs 1000, I want an array/vector to have a size of 1000. Can I change the size of the vector in the program? And is there a difference between container types in vb.net, I was just assuming
Dim xx(1 to 1000) as double, is the standard way of declaring.
And resize xx(1 to N) would be the way to resize.
I am using visual studio 2008 express.
View 17 Replies
Dec 7, 2011
I am working on a project where my forms resize to fill the users screen (which means they have different dimensions depending on screen resolution).I have made some vector images (.eps) in hopes of using them on my forms so that when the form opens the images always look clear, crisp, and not skewed.I am finding that vb.net will not let me import a .eps file into my resources. Is there a way around this? Is there another way to get a vector image into vb? possibly an SDK that will allow me to work with .eps files the same way i work with .dcm images?
View 8 Replies
Jul 16, 2011
How do I go about generating a random vector coordinate that is within say 200 units of another vector coordinate?
View 2 Replies
Oct 3, 2009
I am looking for tools that will enable me to search and manipulate pdf files and pdf vector graphics. I want to search a pdf image/file for specific content and then manipulate the image. Are there any known resources out there? I have looked at the documentation on the Adobe web site, but I don't know where to begin. I'm looking for books or a forum where I can get specific information and examples.
View 1 Replies
Oct 21, 2011
Just wondering how if it is possible to draw onto something, with GDI+, that can then be saved to some kind of vector format?
View 2 Replies