Have Different Types Of Rectangles?

Mar 8, 2010

I am trying to have different types of rectangles. I thought something like this would work, but Rectangle is not a class.

Public Class xRectangle
Inherits Rectangle
End Class

What I wanted this for was to remove a selection rectangle from an existing drawing. I have all of the objects to draw stored in a list and I am trying to remove the selection rectangle without removing the object it is covering.

View 4 Replies


ADVERTISEMENT

C# :: Determining Object Equivalence For Value Types, Reference Types And ILists?

Nov 1, 2009

I have a class with a Property called 'Value' which is of type Object.Value can be of any type, a structure, a class, an array, IList etc.My problem is with the setter and determining whether the value has changed or not.This is simple enough for value types, but reference types and lists present a problem.For a class, would you assume that the Equals method has been implemented correctly, or just assume that the value has changed every time the setter is called?If I did assume it's changed, then perhaps I should assume it for value types as well, so that the behaviour is consistent.

View 2 Replies

Flip Rectangles In Picturebox?

Jun 7, 2011

how to flip rectangles in picturebox?

View 3 Replies

How To Flip Rectangles In PictureBox

Aug 9, 2011

How to flip rectangles in picturebox?

View 5 Replies

Intersect In Two Rectangles For VB2008

Feb 7, 2009

How to know if two rectangles intersect. i know for polygon center, length, width and angle. i want to fast algorithm for visual basic 2008.

View 12 Replies

Intersect In Two Rectangles For VB2008?

Feb 7, 2009

how to know if two rectangles intersect i know for polygon center, length, width and anglei want to fast algorithm for visual basic 2008

View 5 Replies

Any Way Can Check Intersection Between Any Two OBJECTS Not Just Rectangles?

Feb 11, 2012

I have made considerable progress on a game I am making, but one of the fundamentals of it relies on collision detection. At the moment, I am using Rectangle.IntersectsWith() to check "collision" between two PictureBoxes, but I don't want everything all square (graphics, etc). So I set about adjusting regions and have ended up with a circular button (from the MSDN example). What I'd like to know is this: Is there any way I can check intersection between any two OBJECTS, not just rectangles? As in, if the rectangle intersects with or is inside the circle in any way then how do I check it programmatically?

View 3 Replies

Custom DrawLine Function Between Rectangles?

Dec 13, 2011

I just want to draw some lines between the rectangles in vb.net. I used g.drawstring() method to that.

But now, based on a value I just want to change the opacity of the arrow.

View 1 Replies

Draw Rectangles To Make A Map File?

Dec 11, 2009

I have an automated electrical tester, I want to create a type of map file so that way the user can select a subset of devices to test. So basically I want to create a type of grid that the user will be able to highlight specific rectangles in the grid so that way the tester knows to test only those specific locations. To start I want to create a 4X4 grid and each individual rectangle in the grid will contain some coordinate information. Does anyone have a tiny example of how I can draw a 4X4 grid, or any thoughts on the best way to do this? The real final map I will be making will have over 50K devices.

View 1 Replies

Drawing PolygonHotSpot Coordinates Around Two Rectangles?

Feb 2, 2011

Lets say that I've got the coordinates of two Rectangles, they could be right next to each other or have space between them. I need to draw a PolygonHotSpot around the two rectangles (so it will only cover the two rectangles and the space between them). I've come to find that I have to give the coordinates a clockwise order around the entire polygon, rather than around each rectangle (which works fine for a single rectangle).

So given a list of coordinates, is there a way to get them into the order that I need for there to not be any gaps in my PolygonHotSpot?

View 1 Replies

Identify Filled Rectangles In Picture Box?

Oct 15, 2011

i want to Identify filled rectangles in picture given picture in vb .net.

View 2 Replies

VS 2005 A Line Intersecting Rectangles?

Jun 20, 2010

I have a bunch of rectangles simulating players for a football game I'm designing. I want to find out how many "players" are in between two points on the field. I have a start point (a defender trying to locate the ball carrier) and endpoint (the ball carrier). I need the number of other players in between those two points (I have all of their coordinates as well). The more traffic in the defender's field of vision the harder it will be to find the ball.

View 3 Replies

VS 2008 Collision Detection With Rectangles?

May 29, 2010

I have two rectangles; a character and a block. The character is suppose to jump onto the block and then either jump off it or walk off it. I am really getting frustrated with this because I cannot get it to work.

View 9 Replies

Calculating Physics - Rigid Body Rectangles

Apr 13, 2010

I need some help calculating physics after a collision, sort of like rigid body physics but just for rectangles, I don't need them to rotate but only to know the x and y speed they leave each other and the angular velocity etc. the collision with the walls work fine since all I'm doing is reversing the speeds of the rectangles (which is probably the wrong way of doing it) but unfortunately this does not not work for the two rectangles colliding with each other, so can some1 lead me in the right direction as to how I can go about calculating this.

View 7 Replies

Draw Single Pixels And Rectangles On Any Web Browser?

Nov 17, 2010

My aim is to draw single pixels and rectangles on any web browser.

I ve been thinking alot about this and I think I that there might be 2 ways to do this:

1) Send message api maybe?

2) Direct 3d hook with C++ (Although this is quite complicated)

So my questions are:

Btw the use for it is to detect a certain pixel on the webbrowser and draw on it.

Don't ask why since it is quite complicated and I know also how to use Send message api and I once managed to program a direct 3d hook (but for a 3d game which was based on direct x SDK) with C++ although im not sure if it will work due to webbrowsers dont work with directx.

View 7 Replies

Game Programming :: Redrawing Rectangles On A Form?

Jul 30, 2008

Redrawing rectangles on a Form? I have a problem repainting my form, I'm creating a "Bouncing block" Type of game , the Ball as a PicturBox, the Bar as A Picture Box And the Breakable "Targets" as An Array of Rectangles created in my forms Paint event using "e.Graphics.FillRectangles(Brush, rectsF)". It Looks a little like this:

Top of my Form(in the MainForm class):
Dim Brush As New SolidBrush(Color.Red)
Dim rectsF() As Rectangle

[Code].....

View 1 Replies

How To Paint Rectangles Around Individual Cells Or Rows

Mar 1, 2012

I have a DataGridView (not data bound, not editable) that displays a bunch of data. I want to draw rectangles around some of the blocks of cells to set them apart visually. For example, I want to draw a red border around the block of cells from row 3 colum 2 to row 6 column 3 so that there is a red rectangle around the 8 cells.I've found how to paint rectangles around individual cells or rows, but I can't work out how to do it for a block of cells.

View 10 Replies

VS 2008 Draw Rectangles, Then Putting Them In VARIABLES?

May 16, 2009

I don't really know how to explain this except that I want to draw a bunch of rectangles in a LOOP, then I want each rectangle to be put into an array. To be more specific as alot of people keep telling me to be....I am making a robot, that can move left or right from below the screen, the robot is a rectangle with a barrel in the middle of it. The robot can shoot bullets, but as I understand I have to draw the bullets from the code. So far I have the functions written down to get started and I have tried all the drawing methods, and none of them will do what I want.

vb.net
Public Class Form1
Robot Settings

[code].....

View 1 Replies

Find Total Overlap Percent Of Multiple Rectangles ?

Jun 19, 2012

I've got a list of System.Drawing.RectangleF objects that all overlap the same RectangleF object.In my picture below, the 3 overlapping rectangles would be the pink, yellow, and red rectangles.My main rectangle in question is the light blue rectangle.

Second Image: I know that with RectangleF objects I can use the Intersect() method that will return me another RectangleF object representing the overlap. But as far as I can tell, this only really works when comparing two rectangles.

My question is: How could I determine the TOTAL area/percentage (i.e. the combined total overlap of the red, yellow, and pink rectangles when compared to the light blue rectangle - but it would need to be smart enough to not count the area in which the red and yellow overlaps twice, and same for the pink and yellow)?

NOTE: The green lines represent the area I'm looking for, just the total area of the blue rectangle that is not visible.

UPDATE: I've added a 2nd image to further demonstrate what I'm looking for. In the second image, the presence of the burgundy rectangle should have no affect on the total percent covered because that area is already covered by the yellow and green rectangles.

View 2 Replies

Get The Lines To Change Their Locations But The DragHandle Rectangles Won't Update?

Feb 23, 2010

I am able to get the lines to change their locations, but the dragHandle rectangles won't update - they stay at their starting locations. I would have thought since the points list changed the updateLinehandles() would fix it.

Friend Class Line
#Region " Variables "
Public p1 As Point
Public p2 As Point

[code]....

View 1 Replies

Show Two Rectangles On A User Control Which Inherits Picturebox

Mar 7, 2009

I need to show two rectangles on a user control which inherits picturebox.For that I have used pictureboxes (so that i can move and resize them), with transparent background. [code]

View 6 Replies

VB 2010 Underscore And Small Rectangles In String Outputs?

Dec 1, 2010

I've made some good progress with my first attempt at a program, but have hit another road block. I'm taking standard output (as a string) froma console CMD window (results of dsquery piped to dsget) and have found small rectangles in the output. I tried using Regex to clean the little bastards but it seems they are related to the _ (underscore), which I need to keep (to return 2000/NT logins). Odd thing is - when I copy the caharcter and paste it into VS2K10 Express it acts like a carrige return?Going to try using /U or /A CMD switch next..

View 2 Replies

VS 2008 - Get Rectangles In Area And Loop Through Every Single Position

Dec 26, 2009

I want to be able to click and drag the mouse over the picturebox to create a selection area and I want it to snap an image to each place on the picturebox that it can. So if I have it set to snap to 50 pixels, and I select the points (50,50) - (100,100) I should get back 4 points: (50,50), (50,100), (100,50), and (100,100). The thing is though, It can't loop through every single location.

View 2 Replies

VS 2010 Drawing Circles, Rectangles, Elongated Shapes?

Apr 20, 2012

I would like to draw a rectangle on a form, for example to mimic a steel beam that is 6 metres long.Within this rectangle, there may be 4 "openings" or circles that mimic a diameter of 600mm, so i need to draw 4 circles within the rectangle, to indicate a beam that has 4 openings. Other issues I need to cater for is that one of the circles may not be in the centre, it may be slightly raised.The user can change the length of the beam and the size of the openings so i'd like to refresh my drawing to keep in line with this.

View 3 Replies

Compare Two Types In Dictionary Of Types .net?

Jun 23, 2012

I need to compare two dictionary values if the types stored are equal, this is what i have

if gettype(Args(key)) = gettype(argtypes(key)) then
'' do something
end if

[Code]....

View 1 Replies

Events - WindowForms - Display A Tooltip When Someone Moves His Mouse To One Of The Rectangles

Aug 7, 2009

I am looking for a specific custom control. I am drawing some rectangles to my picture box, now I would like to display a tooltip when someone moves his mouse to one of the rectangles, so a hover rectangle-hover event. Does this sound doable at all? If yes

View 1 Replies

Drawing With VB - User Must Make A Series Of Figures Such As Rectangles, Text Boxes And Lines

Oct 19, 2011

I'm doing a web application in which the user must make a series of figures such as rectangles, text boxes and lines, Is something like like google docs draw

View 2 Replies

Interface And Graphics :: "Append Rectangles" To Region?

Jan 17, 2011

This is quite useful, and there's something that would make my life much easier: Append rectangles to a region.You see, you can create a Region by using a Rectangle as parameter. But what if I wanted many rectangles? Add more rectangles to the Region later?

[Code]...

View 1 Replies

Add Together Two Nullable Types?

Aug 27, 2010

I have: Dim nVar1 As Long?Dim nVar2 As Long?Dim nVarSum As Long?nVar1 = Nothing nVar2 = 5 nVarSum = nVar1 + nVar2 I would prefer the result to end with nVarSum being 5, instead of Nothing. I understand if you add something to an unknown value, you will end up with "somthing + unknown" or x+5 will always equal "x+5" not "5" because you are still carrying around that unknown "x". However, how can I effectively treat an unknown or Nothing as a zero for the purposes of addition in this case?(What is basically happening is that the end user is sending us a data file, this code parses that file and then sums together about 15 fields. If the user leaves those fields blank instead of assigning a zero to them, I need to treat it as if it was a zero for this one addition operation, but all the rest of the code needs to continue seeing it as a Nothing value since the user did not ACTUALLY submit zero... they submitted blank or nothing)

View 3 Replies

C# - .NET - Custom Types Possible?

Apr 5, 2012

In Delphi you can do something like this :

TArray = array[1..3] of byte;
where you can then declare
T2Array = array[1..3] of TArray

[code].....

View 4 Replies







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