Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Triangle Asterisks Of For Loop In VB


Every time I press for button, it will display triable asterisk according to four patterns:
Pattern A
*
**
***
****
*****
******
*******
********
*********
**********
Pattern B
**********
*********
********
*******
******
*****
****
***
**
*
Pattern C
**********
*********
********
*******
******
*****
****
***
**
*
Pattern D
*
**
***
****
*****
******
*******
********
*********
**********
I need four command button, How can I solve them>? Loop sequential in that!




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Passwords To Asterisks...
Hi,

I have password protected an action on a form that prompts for a password before the change the user wants to make is allowed (user clicks a box, the password prompt shows up, if the correct password is entered, the box is checked, if not, the box remains unchecked.)

Private Sub TSCRApproval_Enter()
Dim strMsg As String, strInput As String
If fEditTSCRApproval = False Then
If MsgBox("Do you want to change approval?", vbYesNo + vbQuestion + vbDefaultButton2, "Confirmation") = vbYes Then
strMsg = "Password is incorrect. Contact TSCR admin for support."
strInput = InputBox("Enter Password")
If strInput <> "" Then
Do While strInput <> "1111"
If MsgBox(strMsg, vbOKCancel, "error") = vbOK Then
strInput = InputBox("Enter Password")
Else
Exit Sub
End If
Loop
Me!TSCRApproval.Locked = False
fEditTSCRApproval = True
Else
Exit Sub
End If
End If
End If
End Sub


How do I get the password to show up as asterisks as the user is typing it in?

Thanks.

Asterisks In A Input Box
How do you make an input box have asterisks when you type in a password?

InputBox To Display Asterisks
Hi,

Is there anyway to make the characters in an InputBox to display asterisks?

Thanks

Changing Text To Asterisks
I have created a spreadsheet in excel with lots of different sheets. I have basically added a login screen where you have to log in to the spreedsheet to be able to view the other sheets.

So you click the login button and a popup box ask for a password (Which is all coded in VB) but when i type the password you can see what i am typing, i want to be able to change that to asterisks, for example if my password was chris is should look like this ***** so the password is hidden.

Does anyone know how to do this

Chris.Jowett@sovereignhealthcare.co.uk

How To Decrypt Password Asterisks
Hello, I need help. I am developing a piece of software which, among other things, should contain a function which allows you to decrypt the asterisks used to hide passwords. It should be able to unmask all the passwords visible on the screen.

In order to get this, I placed the following code in a module:

'---START OF VB CODE---
Option Explicit

Public Declare Function EnumChildWindows Lib "User32" (ByVal hWndParent As Long, ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long
Public Declare Function EnumWindows Lib "User32" (ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long
Public Declare Function SendMessage Lib "User32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Integer, ByVal lParam As Long) As Long
Public Declare Function ShowWindow Lib "User32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long

Public Const EM_GETPASSWORDCHAR = &HD2
Public Const EM_SETPASSWORDCHAR = &HCC
Public Const EM_SETMODIFY = &HB9
Public Const SW_HIDE = 0
Public Const SW_SHOW = 5

Public Function EnumWindowsProc(ByVal hwnd As Long, ByVal lParam As Long) As Long
EnumChildWindows hwnd, AddressOf EnumWindowsProc2, 1
EnumWindowsProc = True
End Function

Public Function EnumWindowsProc2(ByVal hwnd As Long, ByVal lParam As Long) As Long
If SendMessage(hwnd, EM_GETPASSWORDCHAR, 0, 1) Then
UpdateWindow hwnd
End If
EnumWindowsProc2 = True
End Function

Public Sub UpdateWindow(hwnd As Long)
SendMessage hwnd, EM_SETPASSWORDCHAR, 0, 1
SendMessage hwnd, EM_SETMODIFY, True, 1
ShowWindow hwnd, SW_HIDE
ShowWindow hwnd, SW_SHOW
End Sub

Public Function UnmaskPasswords()
EnumWindows AddressOf EnumWindowsProc, 1
End Function
'---END OF VB CODE---

This function seems to work perfectly when used under Windows 95, 98 and Me. To unmask all the asterisks on the screen, just call UnmaskPasswords.

The problem arises when you run the software containing the function above under Windows XP, where the characters used to conceal the passwords are not asterisks but round-shaped bullets. In that case, calling the UnmaskPasswords function produces no results.

Does anybody know how to make the code work with both the asterisks and the bullets?

Thanks in advance.

Pasquale Esposito
Perugia, Italy
http://www.toprete.com/software

Help!! Asterisks In Shape Of A Diamond
Hello, if someone out there can help me I'd really appreciate it. My homework was to create a diamond shape (not filled in) with asterisks using a For...Next loop. The diamond will be displayed in the immediate window.
The code below is what I have finally figured out, but I can't seem to figure out how to "draw" the right side of the diamond. I'm soooo frustrated because I feel this is way above my level and my teacher, who is a real professional teaches us as if we know tons but we just started learning computers for the first time this year. Please Help if you can. Thanks to all who try to help!!!

Dim I As Long

For I = 5 To 1 Step -1
     Debug.Print Space(I - 1) + "*"
Next I

For I = 0 To 4
    Debug.Print Space(I) + "*"
Next I
    
    
End Sub


This is what shows up so far in the immediate window

     *
   *
  *
 *
*
*
 *
  *
   *
    *

Hiding Passwords With Asterisks
Hi,

I have been searching through previous posts on passwords for a few hours now but have been unable to find the information I am after. As you can see I am fairly new to VB. Please accept my apologies if you have read a similar post before (if you have please tell me where I can find it).

What I am trying to do is hide the password text on a login screen with asterisks. I am not sure if this has a proper name? I have gone into the password input textbox_change code and have a sort of loop that sets the text value of the text box to * but I've realised I don't really want to do that as this changes the password to *. Anyone got any ideas?

Many Thanks,

ZZZed

How Do I Draw Shapes With Asterisks?
Hello everyone,

I was wondering how I would draw the shape of an (X) or a right right angled triangle using asterisks(*). It is in an if/else statement. I just need to know how 2 draw those shapes.

Thanks in advance.

Input Box For Password - Show Asterisks
I have two simple VB input boxes in Excel to capture username and password. I want the box for the password to display asterisks ***** instead of the text typed in to preserve security.

I have had no luck finding how to do this. Can anyone help?

Thanks!

Need Code To Manipulate A String To Asterisks
Dear All,


I made a password input box by my self in Citect with a rectangle as border and a text viewing area.
In the rectangle I can input a string which is viewing in text veiwing area.
I want that I can only see asterisks, because it is a password field.

I need the code which is used by the normaly password inputboxes of the most developer programs, in this case VBA.

Can someone help me, thanks


Greetings Shinoby

Masking Input Text With Asterisks (*****) +SOLVED+
The login dialog does this but is there a way that I can mask text input on a inputdialog?

Or how can I do that if I make my own form?

Triangle
Hi!

Here's a beautiful effect made in VB.
No APIs. No DX. Just VB.

Do you like it?

Artemi

Edit: Removed .exe from attachment

Triangle
how can i create the effect of making a triangle shape by only using the print statement like so...

b
bbb
bbbbb
but having all the b's centered in the middle of the form by being spaced over with a simple Print " "

Triangle
Can you tell me what component i shuld use in order to add some triangle to my form ?

A Triangle As A Button??
All I want to do is simply find a way to make a clickable triangle.
Squares, circles, and their variations are clickable and can be used as buttons.
I want to do the same with a triangle.
It doesn't matter right or isoceles or whatever, just as long as it's a triangle.

Fill In A Triangle. Can An API Be Used To Do This?
Hi, some of you know that I am making a 3D Engine.
That 3D Engine uses triangles(The most common and basic object used in most 3D Engines) well know I have made the wireframe rendering, but I need to fill in the triangles with a color.
Is there any API to do this or what?
Please show me an example of how to do it in a picture box.

Thanks alot in advance.

Julian.

Triangle Strips
my triangles are being drawn backwards, any ideas?

Cube(0) = CreateTLVertex(-1, -1, 1, 0, RED, 0, 0, 0)
Cube(1) = CreateTLVertex(-1, 1, 1, 0, RED, 0, 0, 0)
Cube(2) = CreateTLVertex(1, -1, 1, 0, WHITE, 0, 0, 0)
Cube(3) = CreateTLVertex(1, 1, 1, 0, WHITE, 0, 0, 0)
Cube(4) = CreateTLVertex(2, -1, 1, 0, BLUE, 0, 0, 0)
Cube(5) = CreateTLVertex(2, 1, 1, 0, BLUE, 0, 0, 0)


it seems to fade from red to blue from right to left instead of left to right

sorry posted in wrong thread, cant move post ;]

Getting A Normal From A Triangle
Is there a function in DirectX that i can get a normal-vector for a triangle from ?

Triangle Problem!!!
Hi there,,,
My program is "Triangle Problem" in Visual Basic Windows Appliacation

The User enter 3 sides lengths of triangle in 3 TextBox ,An appropriate error message should appear in the form, in case of the three numbers not valid sides of a triangle.
Exampe: side a plus side b has to be greater than side c in a triangle, where side c is the largest side in length.

I have one TextBox Readonly that tell me type of Triangle based on angles:

"Right triangle" ----if c2/(a2 + b2) = 1
"Acute triangle"---- if c2/(a2 + b2) < 0.9999
"Obtuse triangle"----if c2/(a2 + b2) > 1.0001

The Program should read 3 decimal numbers ,The user should be able to move from one textbox to another by either using the “tab” control key or the “enter” key. The user should not be able to make any mistake in the textboxes. That is, the user should not be able to enter a non-numeric character.If User Finish enter deciaml number in TextBox3 and Press Enter or Tab the Program automaticaly Appear the type of Triange Based on angles in ReadOnly TextBox.

I should Create at a functions that determines the type of a triangle based on angles.

Thanx

Drawing A Triangle
Hi im trying to draw a triangle in vb i know i need to use the line method to do this and the distance formula nut im still a bit lost as to what to do if any one could help that could be great

Thanks

Triangle Shapes
Does anyone have any code for triangle shapes, that include fillcolor? I need something that allows me to specify x,y for one point of the triangle, the angle of that point, the angle of the centerline of the traingle, length of the sides.

I'm trying to make it so that I can rotate a triangle around a point. It's for a sector management program for microwave communications. I'm attempting to make a program that can automatically adjust or create a whole plan of cell array radio channels by itself.

"None of us is as smart as all of us"

Triangle Shape
Hi, got a problem here that might be very easy to solve, but I can't find out how to do it:

I need to make a shape that is not a predefined one but a triangle. I can draw one consisting of 3 lines of course but I need to be able edit certain properties like fillcolor and visibility.

Lines will be treated as seperate objects and I need my shape to be the (single) object.

Also using the "Line" option won't help me coz I can't make an object out of this. I'm feeling I'm missing a certain tool/property here. (I'd rather not download some activex control btw, but if I have to I will)

Any suggestions ?
Thanks in advance

Wout

Draw Triangle
I need to make this program which asks the user to enter a height between 2 and 9, and it makes the height of the triangle as big as that number like if it was 4 it would look like

*
**
***
****
( except it centered)

But It cant go above 9 or below 3.
Here is my code... it doesnt work though


Code:
Dim intheight As Integer
Dim intNumLines As String
Dim intAccum As Integer
Dim strstar As String

intheight = txtNumber.Text
intNumLines = txtNumber.Text
strstar = "*"

Do
intAccum = intAccum + 1

lblHeight.Caption = strstar & vbCrLf

Loop Until intAccum = intNumLines
End Sub

How Can I Know If Point Is On Triangle ?
Hi,

i have triangle and point on simple form.

how can i know if the point is on the trinagle area ?

i search for a math way.

thanks, to all

Triangle Patterns
I have made the following triangle pattern using the code below.......(I am trying to figure out the correct code for two other triangles listed below the following code)

1234
234
34
4

Dim r, c As Integer
Dim field As String
Dim sw As IO.StreamWriter


sw = IO.File.CreateText("Triangle.txt")
For r = 1 To 4
For c = r To 4
field = c.ToString
field = field.PadLeft(4)
sw.Write(field)
Next c
sw.WriteLine()
Next r
sw.Close()


Two patters I am trying to make:
1 2 3 4
2 3 4
3 4
4

And
4
3 4
2 3 4
1 2 3 4

Thank you so much if you can help me!
Mary

Shading A Triangle
I have a code below to draw a triangle network





VB Code:
m = 1                While Not EOF(2)                        Input #2, TIN.Node1, TIN.Node2, TIN.Node3                        picDraw.Line (XY(TIN.Node1, 0), XY(TIN.Node1, 1))-(XY(TIN.Node2, 0), _                          XY(TIN.Node2, 1)), vbBlue                                      picDraw.Line (XY(TIN.Node2, 0), XY(TIN.Node2, 1))-(XY(TIN.Node3, 0), _                          XY(TIN.Node3, 1)), vbBlue                                      picDraw.Line (XY(TIN.Node3, 0), XY(TIN.Node3, 1))-(XY(TIN.Node1, 0), _                          XY(TIN.Node1, 1)), vbBlue                        m = m + 1                Wend




How can I fill a color let say green into the triangle so it will look like solid triangle rather than just a line network. Please can anybody help..

Triangle ASCII Art Help
I'm new to VB and have a problem of printing an ascii art triangle using loops. I have to have a user enter a number between 5 and 8. That number is the largest horizontal point of the triangle. So if a user input 5, the output should be:

*
**
***
****
*****
****
***
**
*

This is the logic i'm using as of now:
Private Sub Make(tSize As Integer)
Dim LineCount As Integer, AsterikCount As Integer
For LineCount = 1 To tSize
For AsterikCount = 1 To tSize
picBox.Print "*"
Next AsterikCount
picBox.Print
Next LineCount
End Sub

and when i put in 5 as the input, the output is:

*
*
*
*
*

*
*
*
*
*

and so on...

ANY help would be appreciated.

Drawing A Triangle
hi there...
can anyone kindly show how to draw a triangle? I don't really understand how to do it. Hopefully some explanation would be great.

*back to reading da VB book*

Triangle Button
Anybody know where I can get a triangle shaped button?

already made and free would be best,

However, I'm open to API suggestions.

CIRCLE - Triangle ANYTHING
I have a queation how do you make the form be in any other shape then a square or a rectangle like a circle or a triangle or a polygon. Someone told me something about masking which i have no idea what it is. I am getting bored of the stupid same rectangular form

Sierpinski Triangle
Hi, I was just wondering how is it possible to program the Sierpinski Triangle on visual basic. Also I know it is possible because I have seen the program working before.

Triangle In A Circle
I don't know why, but I've programmed the code below so that the three corners of the triangle will always be touching the perimeter of the circle. But this isn't happening.

I fixed the code below so you can copy and paste it into a form, but you'll notice sometimes a corner is way out of the circle. What should I do to my code to make it work?

Thanks.




Dim Theta As Single
Dim adj As Integer, r As Integer
Dim theta2 As Integer, thetaRad2 As Double
Dim opp As Integer, area As Integer
Dim hypot As Double, thetaRad As Double
Dim chooseSide As Integer, randRoot As Integer
Dim areaTri As Integer
Dim variableAngle As Single, variableAngleRad As Double



Private Sub command1_click()

Form1.Cls
Call Randomize
randRoot = 2 + Int(5 * Rnd) 'the integer inside the square root sign
Call Randomize
chooseSide = 1 + Int(2 * Rnd) 'choose base or perp height
Call getAngle3(330, 60) 'grt random angle between 330 and 390 deg
r = 8
theta2 = 270 'perpendicular diameter
thetaRad = degToRad(Theta) 'to radians
thetaRad2 = degToRad(theta2 - 180) 'to radians


'calculate the lengths of the lines
opp = linelength(r * Cos(-thetaRad2), r * Cos(thetaRad), r * Sin(-thetaRad2), r * Sin(thetaRad))
adj = linelength(r * Cos(thetaRad2), r * Cos(thetaRad), r * Sin(thetaRad2), r * Sin(thetaRad))


areaTri = getArea(opp, adj) 'find the triangles area using the side lengths calculated above

'draws the diagram for this question

Form1.DrawWidth = 3
Form1.DrawMode = 13
Form1.Show
'determines the size of the form - needed to ensure that all lines touch the circle

Form1.Height = 6300

Form1.Width = 7200

Call Randomize
variableAngle = 10 + Int(30 * Rnd()) 'rotate diameter
variableAngleRad = degToRad(variableAngle) 'to radiand
Form1.Scale (-14, 11.9)-(14, -11.9) 'origin to the center of the form

Form1.Circle (0, 0), r 'draw circle, radius r

'the following 4 lines draw the lines inside the circle of the diagram.
'the lines are based on the origin, r, and the SIN or COS of the randomly generated angle
Form1.Line (0, 0)-(r * Cos(thetaRad2 + variableAngleRad), r * Sin(thetaRad2 + variableAngleRad))
Form1.Line (0, 0)-(r * Cos(-thetaRad2 + variableAngleRad), r * Sin(-thetaRad2 + variableAngleRad))
Form1.Line (r * Cos(thetaRad2 + variableAngleRad), r * Sin(thetaRad2 + variableAngleRad))- _
(r * Cos(thetaRad), r * Sin(thetaRad + variableAngleRad))
Form1.Line (r * Cos(-thetaRad2 + variableAngleRad), r * Sin(-thetaRad2 + variableAngleRad))- _
(r * Cos(thetaRad), r * Sin(thetaRad + variableAngleRad))


'prints the angle given in the question near the center
'currentX and currentY determine the immediate position to where the
'text will be positioned
Form1.CurrentX = r * Cos(-thetaRad2 + variableAngleRad) + 1
Form1.CurrentY = r * Sin(-thetaRad2 + variableAngleRad) + 1
Form1.Print "b"

Form1.CurrentX = r * Cos(thetaRad2 + variableAngleRad) + 1
Form1.CurrentY = r * Sin(thetaRad2 + variableAngleRad) + 1
Form1.Print "a"

Form1.CurrentX = (r * Cos(thetaRad + variableAngleRad) + 1)
Form1.CurrentY = r * Sin(thetaRad + variableAngleRad) + 1
Form1.Print "h"

End Sub

Public Sub getAngle3(x As Integer, y As Integer)

Call Randomize
Theta = x + Int(y * Rnd())
End Sub

Public Function degToRad(deg As Single) As Double
degToRad = (deg * 3.1416) / 180
End Function

Private Function linelength(x1 As Integer, x2 As Integer, y1 As Integer, y2 As Integer) As Integer
linelength = (Sqr(((x2 - x1) ^ 2) + ((y2 - y1) ^ 2)))
End Function
Private Function getArea(base As Integer, perp As Integer) As Integer
getArea = (base / 2) * perp
End Function

Rotating A Triangle
In order to make a triangle you would have to use 3 lines. I have tried tons and tons of code to see if i could get the whole triangle to rotate on a center point. Well i Have failed miserably. Then I tried to get a line to rotate on its center and I did alright but didn't come to anything that was completely working. Does anyone have any idea how to get a triangel to rotate on a center point? Thanks!!!

Drawing Triangle
Put this Code in a standard module.


Code:
Option Explicit

Private Type POINTAPI
x As Long
y As Long
End Type

Private Const POLYFILL_LAST = 2

Private Declare Function CreatePolygonRgn Lib "gdi32" (lpPoint As POINTAPI, ByVal nCount As Long, ByVal nPolyFillMode As Long) As Long
Private Declare Function FillRgn Lib "gdi32" (ByVal hdc As Long, ByVal hRgn As Long, ByVal hBrush As Long) As Long
Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
Private Declare Function CreateSolidBrush Lib "gdi32" (ByVal crColor As Long) As Long


Public Function FillTriangle(hdc As Long, X1 As Long, Y1 As Long, X2 As Long, Y2 As Long, X3 As Long, Y3 As Long, Colour As ColorConstants)

Dim apiPoints(0 To 2) As POINTAPI
Dim hRgn As Long
Dim hBrush As Long

apiPoints(0).x = X1
apiPoints(1).x = X2
apiPoints(2).x = X3

apiPoints(0).y = Y1
apiPoints(1).y = Y2
apiPoints(2).y = Y3

hRgn = CreatePolygonRgn(apiPoints(0), 3, POLYFILL_LAST)

hBrush = CreateSolidBrush(Colour)

FillRgn hdc, hRgn, hBrush

DeleteObject hRgn
deleteobjet hBrush

End Function


then you can use this to draw your triangle. to draw a blue triangle in Picture1 with corners at 50,0 0,100 and 100,100 just type


Code:

FillTriangle Picture1.hdc, 50, 0, 0, 100, 100, 100, vbBlue



N.B. the measurements must be in pixels, use the ScaleY and ScaleY functions to help convert.


Hope this helps

Properties Of Triangle
Hi, I'm writing a prog that computes various
properties of a triangle. I want to output properties
such as area, centroid, perimeter & whether triangle
is isosceles or right-angled. this is what i've come
up with so far, but for isosceles & right-angled the
prog keeps returning false & true for every set of
data. Any help would be great.
Thanks



Public Class frmAssignment03
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New()

'This call is required by the Windows Form
Designer.
InitializeComponent()

'Add any initialization after the
InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component
list.
Protected Overloads Overrides Sub Dispose(ByVal
disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer
Private components As
System.ComponentModel.IContainer

'NOTE: The following procedure is required by the
Windows Form Designer
'It can be modified using the Windows Form
Designer.
'Do not modify it using the code editor.
Friend WithEvents lblCaption As
System.Windows.Forms.Label
Friend WithEvents fraInput As
System.Windows.Forms.GroupBox
Friend WithEvents lblVertex1 As
System.Windows.Forms.Label
Friend WithEvents fraSolution As
System.Windows.Forms.GroupBox
Friend WithEvents cmdCalculate As
System.Windows.Forms.Button
Friend WithEvents cmdClear As
System.Windows.Forms.Button
Friend WithEvents lblVertex3 As
System.Windows.Forms.Label
Friend WithEvents lblVertex2 As
System.Windows.Forms.Label
Friend WithEvents txtVertex1x As
System.Windows.Forms.TextBox
Friend WithEvents txtVertex2x As
System.Windows.Forms.TextBox
Friend WithEvents txtVertex3x As
System.Windows.Forms.TextBox
Friend WithEvents txtVertex1y As
System.Windows.Forms.TextBox
Friend WithEvents txtVertex2y As
System.Windows.Forms.TextBox
Friend WithEvents txtVertex3y As
System.Windows.Forms.TextBox
Friend WithEvents Label1 As
System.Windows.Forms.Label
Friend WithEvents Label2 As
System.Windows.Forms.Label
Friend WithEvents Label5 As
System.Windows.Forms.Label
Friend WithEvents Label6 As
System.Windows.Forms.Label
Friend WithEvents Label7 As
System.Windows.Forms.Label
Friend WithEvents lblPerim As
System.Windows.Forms.Label
Friend WithEvents Label10 As
System.Windows.Forms.Label
Friend WithEvents lblArea As
System.Windows.Forms.Label
Friend WithEvents lblIso As
System.Windows.Forms.Label
Friend WithEvents lblRA As
System.Windows.Forms.Label
Friend WithEvents txtCentroidx As
System.Windows.Forms.TextBox
Friend WithEvents txtCentroidy As
System.Windows.Forms.TextBox
Friend WithEvents lblCentroid As
System.Windows.Forms.Label
Friend WithEvents lblPerimeter As
System.Windows.Forms.Label
<System.Diagnostics.DebuggerStepThrough()> Private
Sub InitializeComponent()
Me.lblCaption = New
System.Windows.Forms.Label()
Me.fraInput = New
System.Windows.Forms.GroupBox()
Me.Label2 = New System.Windows.Forms.Label()
Me.Label1 = New System.Windows.Forms.Label()
Me.txtVertex3y = New
System.Windows.Forms.TextBox()
Me.txtVertex2y = New
System.Windows.Forms.TextBox()
Me.txtVertex1y = New
System.Windows.Forms.TextBox()
Me.txtVertex3x = New
System.Windows.Forms.TextBox()
Me.txtVertex2x = New
System.Windows.Forms.TextBox()
Me.txtVertex1x = New
System.Windows.Forms.TextBox()
Me.lblVertex3 = New
System.Windows.Forms.Label()
Me.lblVertex2 = New
System.Windows.Forms.Label()
Me.lblVertex1 = New
System.Windows.Forms.Label()
Me.fraSolution = New
System.Windows.Forms.GroupBox()
Me.txtCentroidy = New
System.Windows.For

How To Fill A Triangle
how can we fill a triangle without using api ,instead please suggest a similar code like filling of block on the form(not on picture box).it is very sad that i couldnot get a simple code for this .

Draw Triangle
how can I draw triangle without using lines.
I think I can use API functions??????

thanks

How To Draw A Triangle
Hello,

I need to draw a triangle for my Lab. I have three lenghts and three angles, and they are all knows, how can I draw a triangle. Please don't assume that any angle in the triangle is right angle.
I would appreciate any help,
Zorica Majdov

 

Inner Triangle Size
Hi All

I have a Triangle where i have all the sizes the problem is i am trying to work out the sizes of a triangle that is inside the existing triangle i can code how to work out the outer triangle but im stuck how to work ot the inner triangle

i have inclosed a pic of my problem

Thanks in advance if anyone can help

Draw Triangle
hai,
     I am new to vb. I want to draw a triangle using vb. But the problem here i facing is my professor said that you have to have only 3points for your triangle. (i.e) p1 as top point,p2 as lower left,p3 as lower right. I don't have any idea? Can any one give me the idea or code for this? Thanks.

How Fill In Color In Triangle???
guys
i wanna drawing a triangle with black color and fill the inside parth with white...so far i only know how to fill up rectangular and circle, how to fill up other shapes?thx a lot

Clicking Inside A Triangle
hello i have a huge problem that i have spent hours trying to figure out and i so far i have got no where

so heres the story

i have created a class module that draws a triangle with its size determined by user input. Once the triangle has been drawn i need the user to click anywhere on the screen if the user clicks inside the triangle a message should appear telling the user that they have clicked in the triangle. I have worked out the gradient of the triangle but as far as determining wheather the user has clicked inside the triangle or not i have no idea's does anyone have any clues


Thanks

Clipping Cursor Within A Triangle In VB
Hello,

I want to know if there is any way of clipping a cursor within a triangle.
ClipCursor takes a rectangle as an input but not a triangle.

Thanks in advance,
Anuj

Drawing A Triangle Using 3rd Party OCx, VBx
I have 2 queries, I am hoping any of u guys can be of assistance.

1. How can one make a listview subitems have different back colors on each row.

2. Is there any known OCX or controls one can use to draw a tringle shape on a form, that will have a click and dragdrop events or window handle

Triangle Strips Won't Work!!
I'm pretty new to using DirectX, so this problem is most likely because I'm missing something obvious. But since I can't find the answer anywhere else on the web, I'm asking here.

I have defined 6 vertices, and then loaded them into a Vertex Buffer. With this code, I get a perfect looking rectangle:

d3dDevice.SetStreamSource 0, PolygonVertexBuffer, Len(Polygon1.v(0))
d3dDevice.DrawPrimitive D3DPT_TRIANGLELIST, 0, 2

Note: Polygon1.v is an array with all of the vertices

When I change Polygon1 to only 4 vertices (for a triangle strip), and then change to this code:

d3dDevice.SetStreamSource 0, PolygonVertexBuffer, Len(Polygon1.v(0))
d3dDevice.DrawPrimitive D3DPT_TRIANGLESTRIP, 0, 2


I only get the first triangle to appear! How do I get it to be a rectangle?
Thanks in advance!

How To Spin A Triangle In A Circle?
I've seen examples of triangles spinnin in circles and have had a look at the code but dont fully understand..
this is what i know

You have a main point with 3 other points equally distance from the middle and each other

then u move the 3 points around the middle point while still being eually distance from the middle and each other

if someone has done this before could you show some example code

Calculating Distance From A Triangle
I was wondering if there is a way to find the distance between a point and the closest point on a triangle. I Googled it but didn’t find much.

More Xmas Fun, Pascal's Triangle VB/C++
This one won't ruin any windows or cause you to reboot :P

Merry Christmas!

Showing A Triangle List
Hi there,

I'm wondering if there's a way to make my Triangle Strip visible. I don't mean a texture put onto the strip or it showing a colour,

I mean the lines connecting each vertex. I guess it would be the skeleton of the Triangle Strip.

Is there some sort of flag I can pass when rendering or declaring the strip that could accomplish this?

Thanks for any insight

Copyright © 2005-08 www.BigResource.com, All rights reserved