English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I need to create a program that displays 8 5 2 1 1 0 vertically when you press the command button. Please teach me how....10 pts for the winner. :)

2006-09-19 00:29:27 · 6 answers · asked by Jed Stephen 3 in Computers & Internet Programming & Design

Nonono..i mean, w/o using multiple label captions. Using only the command button, when you click it, it should display 8 5 2 1 1 0 vertically....it uses the FOR statement...thanks.

2006-09-19 01:57:11 · update #1

6 answers

Dim a As System.Double = 8.5
For i As Integer = 1 To 6
Console.WriteLine(Int(a))
a = a / 1.7
Next i

2006-09-19 11:56:25 · answer #1 · answered by cd4017 4 · 0 0

The person answered before me is correct.
But the syntax is wrong.

1. Place the required number of labels in vertical order. (there is no need to make them visible = false)
2. create a command button.
3. In the click event of the command button, initiallize what ever you want to display in those labels. The syntax is:-
label1.caption = "8"
label2.caption = "5" etc

2006-09-19 07:39:56 · answer #2 · answered by parul k 2 · 0 0

There is always 10 points for the winner, so nothing special there. There's also 2 points for answering even with nonsense, as demonstrated here. Lets not make this about the points though - lets make it about knowledge.

Rawlyn.

2006-09-19 07:43:09 · answer #3 · answered by Anonymous · 0 0

first get a label and type those number on caption .

and in load event write this command
label1.show.false

and the event of click event.
lable.show.true

2006-09-19 07:33:13 · answer #4 · answered by Anonymous · 0 0

lblCaption = "8" & VBcrlf & "5" & VBcrlf & "1" etc.....

2006-09-19 19:41:43 · answer #5 · answered by ebred 3 · 0 0

VB is crap. Learn C

2006-09-19 07:32:39 · answer #6 · answered by Dante_Ferret 2 · 0 0

fedest.com, questions and answers