Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Intro to visual basic question

ok im trying to come up for the code for an app that allows you to do the following:

the over all goal of the program takes the names of cities that were inputted through an input box, and displays the one with the msot letters in a label, it also has a counter for eveyr city inputted

plz help
[312 byte] By [kevintw99] at [2007-11-11 9:53:14]
# 1 Re: Intro to visual basic question
We'll gladly help you with your homework, but we won't do it for you. ;-) What have you come up with so far?
Phil Weber at 2007-11-11 17:23:32 >
# 2 Re: Intro to visual basic question
each time the user input a city name increase the counter by one and compare with the last entred city to know the max and save it in a variable; simple for loop finishs this.

simple example:
dim counter as integer
dim maxLen,tmp as string

maxLen=0
while(exitEvent){
tmp = inputbox("Enter the city name:")
if len(tmp) > maxLen then maxLen = tmp
counter = counter + 1
}
Amahdy at 2007-11-11 17:24:32 >