I am taking an Intro to VB class in college and for on of our assignments we need to make several shapes with *'s. The user is prompted by an input box where they decide how large to make the shapes. The only one that I am struggling with is the inverted triangle. Here is what it should look like if the user would select to have 5 rows.
* * * * *
* * * *
* * *
* *
*
Here is the code that I have written for the REGULAR triangle.
Private Sub btnTriangle_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTriangle.Click
Dim numstars As Integer
I have a menu strip on a form and to assist the users and to make it more aesthetically pleasing I want to add an inverted triangle at the end of each menu title to make it more obvious there are other options available if you click on it.I am currently using Times New Roman as a font but that can be changed if necessary.
This explains a lot why I was having much trouble determining the color of pixels. They are inverted! Dim cursorpos As Point = Cursor.Position() Dim hWnd As IntPtr = GetDesktopWindow() Dim hDC As IntPtr = GetWindowDC(hWnd) Dim i As Integer = GetPixel(hDC, cursorpos.x, cursorpos.Y) Dim c As Color = Color.FromArgb(i) ReleaseDC(hWnd, hDC) Label6.Text = c.ToString Label8.ForeColor = c
i am working on pdf to xhtml conversion pdf clown library(C#).I am extracting the pdf content,the images which i extracted is inverted image.I want the real images,The code is pasted below,
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data;[code]......
I'm creating a movable scenary with, like 100 different flights. I want to create for every type of flight a triangle...so it's moves around and you have an idea how the airspace looksq like at what moment.Now my question is, what's the best way to draw these rectangles? I created a class 'Flight' and it has a Graphicspath in it. Now I want to update the triangle, which represents the aircraft, with the speed and heading...so it moves around well.
Dim blackPen As New Pen(Color.Black, 3) Dim ptsArray As PointF() = {New PointF(100.0F, 120.0F), New PointF(70.0F, 60.0F), _ New PointF(40.0F, 120.0F), New PointF(100.0F, 120.0F)} e.Graphics.DrawLines(blackPen, ptsArray)
I have the outline of a triangle right where I want it. I need to fill it so it's a solid color. Can anyone give me a start on filling it? (Using VB.NET 2008)
Currently working on a 2D engine, not for gaming but for design software / visualisation for machines. So far it is comming along quite fine. I started to wonder if it were possible to draw a triangle and fill it with some form of a a texture, or even better a polygon and fill that with a texture.
I know that DX can do that for me :P but I am realy focussing on GDI+ at the moment.
This is more of a mathematical problem than programming problem.I have created a very basic 3D engine using Visual Basic .Net. It displays lines on the screen with an additional z axis. The engine works, however when part of the line goes below 0 it messes up and starts drawing the line inverted again.
This is how it calculates the points:
y = (point.y / z) + offset.y + camera.y x = (point.x / z) + offset.x + camera.x
Can anyone work out a way to only draw part of the line when it intersects the z=0 axis?
i was asked to do a program which can find if a 2d point is inside a triangle or not, only the 3 points of the triangle were given. i planned to do this using the slopes of the 3 sides, then with y-y1=m(x-x1) using the other vertex and the point being checked see if the slope was the same sign and on the same side of the line. if this was true for all 3 then the point is inside the triangle the problem is i cant think of a logical expression for the if/then/else structure to show this anyone know what i should use or should i just go down a completely different route?
I'm working on a Pythagorean Theorem program that calculates the sides and angles of a right triangle. I have the side measurements and all that down, but I can't find the Visual Basic function that will allow me to calculate the angles from the side measurements. I've tried asin and sinh, but both give me the wrong measure.
Here is the code: Public Structure Triangle Shared a As Double = 1 Shared b As Double = 1 Shared c As Double = Triangle.FindC Public angleABC As Double [Code] .....
I am receiving an error in the function. "Triangle.angleABC" is generating :"Reference to a non-shared member requires an object reference". I need to find the hypotenuse for this Triangle. I have tried setting the variable as an object, this does nothing for the error. Also I've tried to use Public in the function and I receive an error stating it needs to be shared. I would like to work the the Structure with out running any functions on it first.
I need to create an application that creates Pascal's triangle the user would enter the number of rows, and using the formula (which i do not know... :/) would create the triangle. For example: the user enters 5 rows triangle:
1 1 1 1 2 1 1 3 3 1 1 4 6 4 1
as you can see the numbers are created by adding the 2 numbers above it starting with 1 at the top
I have a Form with a StatusStrip Component docked at the bottom.The form has fixed width and is not resizable.However the StatusStrip has a little 'resize triangle' at the right. (6 little dots)This gives the impression that the window is resizable.
This morning we started doing a pythagorean theorem which basicly will convert a set of numbers into the answer. The theorem is a� + b� = c Basicly I wan't it to find the C in a triangle. Some thing I were told that we should use are :
I've done many attempts but still didn't succeed in making a logic for pascal's triangle, I want you guys to get me start this task and I'll code it myself. url....
I need class for triangle button (Up and Down). I need to be able to adjust the base like the picture on the right. I need it to show in the toolbox after I build it. To needy :D
I just need to know how to find the length of one side of a triangle and one angle aswell. I will always know the other two sides in length and one angle. I have enclosed a diagram.
I need to know length of C and the angle as shown.