.net - Built-in Rectangle Intersection Function?

Mar 31, 2011

Someone once told me VB.net had some built-in function to check if two rectangles intersected. But I cannot find it.

View 1 Replies


ADVERTISEMENT

.net - Array Intersection Function Speed?

Sep 8, 2010

I've written a short function for array intersection and wanted to know why one function is faster than the other.

1)Dim list2() As String 'Assume it has values'Dim list2length As Integer = list2.length

[Code]...

View 3 Replies

C# - Built-in Function To Repeat String Or Char In .net?

Nov 6, 2010

Best way to repeat a character in C#

I wonder if there is a function that returns x times of given char or string. Or I must code it?

View 3 Replies

Built-in Function In NET Framework Which Encodes A String To A Valid XML Unicode?

Sep 13, 2010

After checking an Xps file i noticed that the string within the Xps file <> is converted to &lt;&gt;So is there any built-in function in the .Net framework that could do this job for me?If it does not exist what characters becides <> should i escape in myOwn function?

I try to implement a search within an xps file, but searching for <> instead of &lt;&gt; returns nothing.

UPDATE: At least i found the list here of xml document escape characters

View 3 Replies

Use Code That Is Built In A Dynamically Built Assembly?

Jun 29, 2010

Is it possible to immediately use code that is built in a dynamically built assembly?I would like to create an instance of an ENUM built using.http:[url]......

View 4 Replies

List(of Rectangle), Rectangle.offset(x,y) Doesn't Work?

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

Identify Subtriangle Within A Rectangle Given A Coordinate In That Rectangle?

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

Collection And Picturebox Intersection?

Jan 8, 2009

(VB 2008) ok im making space invaders for a midterm project, that is i made space invaders and then lost my thumb drive, WITHOUT BACKING UP ANY OF MY PROJECTS. point is its due tomorrow and im having trouble with one of my methods. i have a collection that stores all the missles the enemy shoots, then i have a collection that stores each picture box that makes up the barriers. my method is supposed to search thro both collections and check to see if they intersect. if they are both visible they become invisible creating an illusion that they dissappear. i hav organized the rest of my code to ignore the missles and barriers if they are invisible but this part isnt working for some reason.

[Code]...

View 3 Replies

Graphicspath And Line Intersection?

Mar 17, 2010

This is my problem...I have created graphicspaths (gp) in Visual Basic...but every gp has a name. So I want to print every name next to the gp. I use GetBounds to get the nearest rectangle around the gp. But like for a circle the name will be quite far away from the gp. Now I want to draw a line from the name to the outline of the gp...can somebody help me with this little part of script?

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

Nunit Assertion For An Empty Intersection Between Collection

Dec 21, 2010

I have a list of user names (we'll call 'original list') one object is returning. I have a list of user names (we'll call 'filtration list') another object is returning. I am testing a method that returns all of the items from the original list not in the filtration list. Ideally what I want is something like:

Assert.That(returnedList, Has.No.Members.In(filtrationList))

So far the only thing I can do is iterate over the filtrationList and do

Assert.That(returnedList, Has.None.EqualTo(filteredUser))

View 1 Replies

Draw Rectangle Divided To Four Rectangle?

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

Drawing Rectangle Inside Another Rectangle?

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

Draw Ishihara-transformations (circles In Circle Without Intersection)?

Apr 28, 2011

Question: I need to draw pictures as below in C#/VB.NET Draw ishihara-transformations (circles in circle without intersection)?

Note that my problem is NOT drawing circles in C#.

My problems is drawing them without much whitespace and without intersection.

My thought would be using "Orbits" and then draw the circles with center on the "orbit" lines. (with some orbit lines for bigger and some only for smaller circles)

View 2 Replies

Find Line Intersection Point With A Grid Of Lines?

Jun 4, 2009

I am suing VB 2008 express edition.

I am trying to solve this problem since many days. The problem seems to be rather mathematical, but I faced difficulties dealing with Grids and how to store them using visual basic.

[URL]

In my problem, I have a world of 200 x 200 units divided into 4 x 4 grids (Each of 50 units).

There is a line crosses some areas has the coordinates of Point A (Starting Point) of (XA = 12.43, BA = 159.48) and Point B coordinates (Ending Point) of (XB = 112.95, YB = 20.95).

The question is, how can find the length of (A to C1), (C1 to C2), (C2 to C3), (C3 to C4), (C4 to C5) and finally (C5 to B)?

In addition, how can I indicate the square in which the line is inside?

note that the method should work for all conditions (-ve and +ve line slopes) and for different A and coordinates.

View 1 Replies

How To Pass A Function To A Function Is Functors/function Objects Avaiable In VB2010

Oct 12, 2011

I want to make an numerical integration method with takes in an analytic function and integrate it over a specific interval. For the numerical integration procedure I want to use some procedures in nr.com. The problem is that these are programmed in C++ and they uses functors to pass a function to the integration method. How can I do this in VB 2010?

I want to initialize the function (i.e. set a=1,b=0 for function y(x)=a*x+b) and then pass the function to the integration method. Then when the integration method call the function it only calls the function with one parameter (i.e. x since a,b is already set)

What is the best way to do this in VB2010?I want to make a general integration method where I can pass any single valued function and integration limits.

I have just started using VB, and from what I have found so far it seems like the tools you have is

- to us a delegate for the function
- to use a lambda expression for the function
- send a pointer/adressOf
- to create a function class/structure and submit this to the function

As for now I am most inclined to create a function-class. But I am not really sure how.F.ex. I make different classes for each "uniqe function" I want to integrate, but how can I pass them to the integration function when I need to specify the argument type in the integration-function-call?This seems like a basic problem which applies to many Math operations, so I think it would be very useful to clarify this.

View 2 Replies

C# - Built-in Types When (not) To Use?

May 26, 2009

C# and VB.NET comes with built in types that maps to the CLR types. Examples are: int (C#) and Integer (VB) maps to System.Int32, long (C#) and Long (VB) maps to System.Int64. What are the best practices for deciding when to use built in types or not to use them (using the System.* structs/classes instead)?

View 7 Replies

Import A Dll Which Is Not Built In .Net?

Apr 13, 2010

Is it possible to import a dll which is not built in .Net in a vb.net project like htis:Add Reference -> Browse -> CreatingDll.dll file

Or the <DllImport>attribute needs to be used in case where i want to add a .dll file which is not created in .Net within a vb.net project?

View 12 Replies

Use Built In Data?

Mar 28, 2012

I have a program that reads a .csv file which contains 378 lines with 16 fields. The problem is, I want this data to be built in to the .exe, instead of in a separate file. In the old days, it would have looked something like this[code]...

Is there an easy way to do this in VB, or am I going to be stuck writing 1 line for each 6064 actual variables? I know it is considered by many to be "bad" to have data built in, but this is what I am after.

View 4 Replies

What Is All The .net Framework's Built-in Dll's

Sep 25, 2011

I need all the dll's in the following format:

Dim references() As String = {"Reference1.dll", "Reference2.dll"}

but I don't know where to find the dll names.

View 3 Replies

Add Built-in Constants To Program?

Jul 30, 2010

It would be good if visual basic had standard math constants like pi, the Euler number, and others built-in so one doesn't have to define them each time and have the possibility of making typos. Even some of the physical constants in MKS unit could be included like the Boltzmann's Constant, speed of light, permittivity and such. Each could be a special simple like kb for the Boltzmann's constant. Or it could be a properties like phyconst.c for the speed of light, phyconst.kb for the Boltzmann's, phyconst.sb for the steffan-Boltzmann's constant, pmathconst.e for e=2.71.

View 3 Replies

Add Controls To Form After App Is Built?

Apr 26, 2009

let's say my app is buit and i want to add xtra controls to the app.[code]...

View 4 Replies

Automate The Built In Web Browser?

Jun 24, 2011

I want to code some thing up that logs you into a site and automatically posts to it.

I heard you need to use httpwebrequest but I've seen literally almost every tutorial on the subject and I am still super lost.

Also, is it possible to automate the built in web browser? I coded a semi-automatic program in the past but I want something automated.

View 5 Replies

Button Not Appearing When App Built?

Nov 3, 2011

I have a problem where a button at the top left of a tab control will not appear in debug or compiled. There is no code telling it to hide.

Now, I can make it re-appear by moving it, then moving it back to the exact same position. If I then re-build it will be there.

It will then be there for a number of builds, at which point it might disappear again. This seems to happen for a few buttons in my project. The common factors are that they are on a tab control (standard dot net ctrl) and near the top left of a tab page.

View 13 Replies

How Is A Bot For A Game Like Match 3 Built

Mar 14, 2012

How is a bot for a game like Match 3 built? Match 3 type games are basically when you have different objects and you have to match 3 in a row either sideways or up and down.[code]

View 8 Replies

VS 2008 Win 7 - Built With Several Functions?

May 14, 2010

i have an application that's in development, but some modules of the application are already built, so the application it's installed in several computers. In my code, i call an external class that i built with several functions that i use in multiple applications, in this class i have a small piece of code that checks in the network (internal), if a new version of the application (Msi File), of the current application it's available, and if it's available, it runs the Msi file.

msiexec /package MSIPackage.msi That worked fine in windows XP, but now some machines have been upgraded to windows 7, and the user need other credentials to run the package. (Elevate Privileges). Other problem it's that in my application i create several folders in the installation and the user doesn't get any permissions to write in the folders.For example i have one Log folder, and i can't write any logs to it.

View 1 Replies

Why Isn't Invoke Via Delegate Built Into .NET

Sep 1, 2011

I understand that .NET is multi-threaded and that is a good thing, but I continually run into issues when I have a background worker for example that is updating some control on my form and I have to do:[code] My question is why is this not built into the framework - surely if I am trying to update a DataGridView it should be intelligent enough to know when the update is from another thread and it could do all the above itself?

View 3 Replies

Function Syntax - Call A Function With 2 Arguments When The Function Is Only Defined For One

Apr 1, 2010

I'm trying to undersatnd the syntax of calling a funciton and it seem confusing when I'm using a web service in ASP.net. Maybe this question should be in an ASP forum, but it is a VB question. This simple web service allows you to type in your name and it response with an alert box with you name.

My question is, How can you call a function with 2 arguments when the function is only defined for one. I understand that the second argument is actually a method that handling the respons, but how can you interchange function arguments for methods and how do you know that there are methods for

Here's my call:

<script type="text/javascript">

function HelloWorld()
{

var yourName = $get('txtYourName').value;

[CODE]...

View 7 Replies

Access A Control Using Built Up String?

Apr 2, 2009

Is it possble in VB.Net to accress a control or object using a built up string?[code]...

View 2 Replies

Activating The In Built Web Camera On A Laptop?

Oct 25, 2011

I want to activate the built-in web camera on a laptop for my application using .NET

View 3 Replies







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