Click here to Skip to main content
15,899,474 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Upgrade VB6 Database to VB10 Pin
Abhinav S20-Jun-11 21:41
Abhinav S20-Jun-11 21:41 
GeneralUpgrade VB6 Database to VB10 Pin
Garner T20-Jun-11 22:35
Garner T20-Jun-11 22:35 
GeneralRe: Upgrade VB6 Database to VB10 Pin
AnnieMacD21-Jun-11 6:08
AnnieMacD21-Jun-11 6:08 
GeneralUpgrade VB6 Database to VB10 Pin
Garner T22-Jun-11 14:09
Garner T22-Jun-11 14:09 
QuestionADF Scanning Pin
ivo7517-Jun-11 7:19
ivo7517-Jun-11 7:19 
AnswerRe: ADF Scanning Pin
Dave Kreskowiak17-Jun-11 10:16
mveDave Kreskowiak17-Jun-11 10:16 
QuestionListBox Question Pin
waner michaud16-Jun-11 10:04
waner michaud16-Jun-11 10:04 
AnswerRe: ListBox Question Pin
Christopher Mars16-Jun-11 18:41
Christopher Mars16-Jun-11 18:41 
I think this is what you are asking for

VB.Net
Dim answers() As String = { "Bleu", "Red", "Black" }

For I As Integer = 0 To answers.Length - 1
 ListBox1.Items.Add((I + 1).ToString() + ". " + answers(I))
Next


VB6
Dim I As Integer
Dim answers(2) As String
    
answers(0) = "Bleu"
answers(1) = "Red"
answers(2) = "Black"
    
For I = 0 To UBound(answers)
 List1.AddItem CStr(I + 1) + ". " + answers(I)
Next I


To add more answers to the listbox, just add more elements to the array.
GeneralRe: ListBox Question Pin
waner michaud17-Jun-11 3:31
waner michaud17-Jun-11 3:31 
AnswerRe: ListBox Question [modified] Pin
Alan N17-Jun-11 4:05
Alan N17-Jun-11 4:05 
GeneralRe: ListBox Question Pin
Simon_Whale17-Jun-11 4:17
Simon_Whale17-Jun-11 4:17 
GeneralRe: ListBox Question Pin
Alan N17-Jun-11 4:37
Alan N17-Jun-11 4:37 
GeneralRe: ListBox Question Pin
Simon_Whale17-Jun-11 4:54
Simon_Whale17-Jun-11 4:54 
QuestionWebService Deployment [modified] Pin
KenBonny16-Jun-11 4:20
KenBonny16-Jun-11 4:20 
Questionvb6 app crash on exit Pin
Member 320044015-Jun-11 10:21
Member 320044015-Jun-11 10:21 
AnswerRe: vb6 app crash on exit Pin
Dave Kreskowiak15-Jun-11 12:46
mveDave Kreskowiak15-Jun-11 12:46 
QuestionUse binnary file instead MS Access Pin
ivo7515-Jun-11 7:05
ivo7515-Jun-11 7:05 
AnswerRe: Use binnary file instead MS Access Pin
David Mujica15-Jun-11 7:44
David Mujica15-Jun-11 7:44 
GeneralRe: Use binnary file instead MS Access Pin
ivo7515-Jun-11 8:29
ivo7515-Jun-11 8:29 
GeneralRe: Use binnary file instead MS Access Pin
DaveAuld15-Jun-11 8:45
professionalDaveAuld15-Jun-11 8:45 
GeneralRe: Use binnary file instead MS Access Pin
ivo7515-Jun-11 9:20
ivo7515-Jun-11 9:20 
GeneralRe: Use binnary file instead MS Access Pin
DaveAuld15-Jun-11 9:23
professionalDaveAuld15-Jun-11 9:23 
GeneralRe: Use binnary file instead MS Access Pin
David Mujica16-Jun-11 7:57
David Mujica16-Jun-11 7:57 
GeneralRe: Use binnary file instead MS Access Pin
Аslam Iqbal16-Jun-11 8:48
professionalАslam Iqbal16-Jun-11 8:48 
GeneralRe: Use binnary file instead MS Access Pin
Thomas Krojer20-Jun-11 2:55
Thomas Krojer20-Jun-11 2:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.