Click here to Skip to main content
16,006,474 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionBuilding a DNS server Pin
TomPanjer197420-Apr-07 10:41
TomPanjer197420-Apr-07 10:41 
AnswerRe: Building a DNS server Pin
Dave Kreskowiak20-Apr-07 13:23
mveDave Kreskowiak20-Apr-07 13:23 
GeneralRe: Building a DNS server Pin
TomPanjer197421-Apr-07 2:01
TomPanjer197421-Apr-07 2:01 
GeneralRe: Building a DNS server Pin
Dave Kreskowiak21-Apr-07 6:54
mveDave Kreskowiak21-Apr-07 6:54 
GeneralRe: Building a DNS server Pin
TomPanjer197421-Apr-07 22:21
TomPanjer197421-Apr-07 22:21 
GeneralRe: Building a DNS server Pin
Dave Kreskowiak22-Apr-07 4:52
mveDave Kreskowiak22-Apr-07 4:52 
GeneralRe: Building a DNS server Pin
TomPanjer197422-Apr-07 21:56
TomPanjer197422-Apr-07 21:56 
QuestionPlease help - Parallel Arrays VB.NET Pin
laura h20-Apr-07 7:06
laura h20-Apr-07 7:06 
Please respond only if you can complete this assignment immediately! I need to create a name list program using parallel arrays. The first array lists names and the second array holds the gender of each person. There is an M for male names and an F for female names. I have created a list box (lstNames) and command buttons (cmdBoys, cmdGirls), but I need the code set so that the user will get a list of male names or female names in the list box. I've created the arrays, and put some code in but it's not working.

This is the code I wrote... well... the mess i've created
PLEASE any help greatly appreciated, but I'm just learning... please keep it simple!



' Declare and initialize the name array
Dim strNames() As String = {"John", "Paul", "Mary", "Jane", "Peter", "Sam", "Andrew", _
"Laura", "Juan", "Rachel", "Clifford", "Thomas", "Rebecca", "Susan", "Roberto", _
"Stefano", "Sara", "Jean", "Fred", "Roseann", "Alan", "Sally", "Dean", "Karen", "Carol"}

' Declare gender
Dim strGender() As String = {"M", "M", "F", "F", "M", "M", "M", "F", "M", "F", "M", "M", _
"F", "F", "M", "M", "F", "F", "M", "F", "M", "F", "M", "F", "F"}

Private Sub cmdBoys_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdBoys.Click

lstNames.Items.Clear()

'Declare an index variable
Dim intIndex As Integer
Dim intGender As Integer

'Set the index to the lower bound
intIndex = strNames.GetLowerBound(0)

'While the index is in range compare an element in the array with the search text
While ((intIndex < strNames.GetUpperBound(0)) And (strGender(intGender) = "M"))
intIndex += 1
End While

If strGender(intGender) = "M" Then
lstNames.Items.Add(strNames)
End If
End Sub
End Class


Laura
AnswerRe: Please help - Parallel Arrays VB.NET Pin
Dave Kreskowiak20-Apr-07 7:28
mveDave Kreskowiak20-Apr-07 7:28 
GeneralRe: Please help - Parallel Arrays VB.NET Pin
Merinda Bratton17-Mar-10 11:25
Merinda Bratton17-Mar-10 11:25 
GeneralRe: Please help - Parallel Arrays VB.NET - Figured it out Pin
Merinda Bratton17-Mar-10 11:56
Merinda Bratton17-Mar-10 11:56 
AnswerRe: Please help - Parallel Arrays VB.NET Pin
Christian Graus20-Apr-07 20:18
protectorChristian Graus20-Apr-07 20:18 
QuestionDisplaying tables in vb.net using sqlDMO Pin
gavthegenius20-Apr-07 5:30
gavthegenius20-Apr-07 5:30 
QuestionQuestion regarding the keyword &quot;Using&quot; Pin
Marcus J. Smith20-Apr-07 5:03
professionalMarcus J. Smith20-Apr-07 5:03 
AnswerRe: Question regarding the keyword &quot;Using&quot; Pin
Dave Kreskowiak20-Apr-07 6:10
mveDave Kreskowiak20-Apr-07 6:10 
GeneralRe: Question regarding the keyword "Using" [modified] Pin
Marcus J. Smith20-Apr-07 6:11
professionalMarcus J. Smith20-Apr-07 6:11 
GeneralRe: Question regarding the keyword "Using" Pin
Dave Kreskowiak20-Apr-07 6:32
mveDave Kreskowiak20-Apr-07 6:32 
QuestionMax(rows) of msflexgrid Pin
Navneet Hegde20-Apr-07 1:45
Navneet Hegde20-Apr-07 1:45 
AnswerRe: Max(rows) of msflexgrid Pin
Tim Carmichael20-Apr-07 3:25
Tim Carmichael20-Apr-07 3:25 
AnswerRe: Max(rows) of msflexgrid Pin
Dave Kreskowiak20-Apr-07 4:30
mveDave Kreskowiak20-Apr-07 4:30 
QuestionGetting DOS output Pin
johnjsm20-Apr-07 1:43
johnjsm20-Apr-07 1:43 
AnswerRe: Getting DOS output Pin
kubben20-Apr-07 2:25
kubben20-Apr-07 2:25 
AnswerRe: Getting DOS output Pin
sthotakura20-Apr-07 7:58
sthotakura20-Apr-07 7:58 
GeneralRe: Getting DOS output Pin
johnjsm20-Apr-07 11:10
johnjsm20-Apr-07 11:10 
QuestionHow do you add code snippets Pin
directred20-Apr-07 1:25
directred20-Apr-07 1:25 

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.