|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Im trying to write code that will take a number entered into text box an display 1 to that number in picture box when command button is pressed. example when 4 is entered 1234 appears in picture box. Please help
|
|
#2
|
|||
|
|||
|
Code:
myInt = 4
for i = 0 to myInt
MsgBox(i) 'display a stupid msgbox each time!
next
sorry for not being more specific but i haven't used VB in many years now (real VB) as ASP took over my life. |
|
#3
|
|||
|
|||
|
when any number is entered into text box i need the picture box to display 1 to that number. How do i do this?
|
|
#4
|
|||
|
|||
|
ok!
Code:
for i = 0 to CInt(myTextBox.Text)
' i = 0...value entered in text box so do whatever with it
next
so if you enter 5 in the text box it'll count from 0 to 5, change the 0 to a 1 if you want 1 to 5 and replace the comment with whatever code you need to print the value and the value can always be accessed by the variable "i" |
|
#5
|
|||
|
|||
|
txtOutput.text =""
for i = 0 to CInt(myTextBox.Text) txtOutput.text = txtOutput.text & i next i |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > Need help with counter |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|