I've gotten to this tutorial in less than 2 days! It's so easy to learn when you know other programming languages like C++ or Java.
@narutopcwiz
13 жыл бұрын
hey I did this, but when I click the button, no item will be added at the listbox but the scroll pops up and the program doesn't respond. but when i changed the "while true" to "while variable > 50" it seems to work fine, but when "while true" program doesn't seem to run as i wanted..
@XenoContact
11 жыл бұрын
Basically, count(number) is going to execute all of the code inside the private sub called "count" but instead of using the variable called "num" it will be replaced by the variable called "number". you can think of it as a function so for example we consider the function f(x)= x+1 now whatever value you give to x, the function will return that value plus one. Hope this helped.
@narutopcwiz
13 жыл бұрын
UPDATE: i did "while 0 < 1" and same problem as "while true" but when i did "for variable = 0 to 1 step 0" seems to work fine with if, but without if same prob.
@Hairlikecottoncandyy
12 жыл бұрын
I was going to answer, but if you haven't figured this out in 5 months, you probably won't now.
@zhengrongyan8194
4 жыл бұрын
can we use "Exit While" ?
@jurobezmena
8 жыл бұрын
just go ahead
@idrishussain5744
10 жыл бұрын
Hey I did this but it does not work. The error list goes 'System . Number' is not accessible in this content because its 'friend'. Also, the word number after count is underlined in green. Whats the solution to solve this problem.
@YORI-TV
9 жыл бұрын
+Idris Hussain you probably typed Dim Number As Integer = 10" instead of "Dim number As Integer = 10" Public Class Form1 Private Sub btnExitSub_Click(sender As Object, e As EventArgs) Handles btnExitSub.Click Dim number As Integer = 10 count(number) End Sub Private Sub count(ByVal num As Integer) While True num += 1 ListBox1.Items.Add(num) If num > 54 Then Exit Sub End If End While End Sub End Class
@alphaahtube
12 жыл бұрын
Didn't we use Do While Loop before? What is While now?!
@MohamedArafath077
13 жыл бұрын
I cant do this on vb 2005??
@libertariantiger
9 жыл бұрын
What is the difference between Do while and While?
@ZodiacZubeda21
9 жыл бұрын
+Hugo While by itself executes everything accounting for the condition from the start. Do while does the code first, then accounts for the condition. So, if you tell write code to Do while False, then it'll still run it once. If you just use While, it'll never run.
Пікірлер: 14