Can anyone help a VB student?

Biggie210

Member
Joined
Oct 18, 2004
Messages
5
Programming Experience
Beginner
I am new to the program, and am having trouble learning VB.net. I have a project due soon, and I hardly know where to begin. Attached is the link to the assignment. http://www.lasalle.edu/~lopinto/MIS400/downloads/Assn3.pdf
The link does not contain any spyware/malware or anything. Any help at all regarding this assignment is greatly appreciated. Thank you in advance.
Andrew Mehrer, rookie
 
I would suggest beginning with creating the interface. That should be simple enough.

Then start woking on the different pieces, perhaps the help menu, or the messageBox that should pop up when the form loads, or perhaps the sub procedure that determines the winner (simple comparing) and the margin of victory (simple subtraction). Then try putting those pieces together. That's the basics of programming (and especially Object Oriented Programming), creating small pieces and then using them together.

If you have more specific questions, please feel free to post them but please don't expect anyone to do your homeWork, you wouldn't learn as much that way! :)
 
Thanks for your help thus far. Haha no I don't want you to do my homework for me (unless you want to). I will do as you said and start with the interface, then move onto the actual code. Once I get into that, I will post any specific questions, which I'm sure I will have.

Drew
 
look on the bright side, once you get more used to the environment and how to code vb, you'll be able to write programs like that in a matter on minutes. i remember when i took up vb programming 2 years ago, i had the hardest time with (what now seems) to be the simplist stuff. learning programming does pay off in the end. :) let me know how ya do on this assignment!
 
One thing that helps me is to make sure that I name my objects for what they will be handling.

so for your two team text boxes I would do something like:

txtTeam1 and txtTeam2

for the score text boxes, I would name them:

txtScore1 and txtScore2

This just helps me keep things organized. When my objects are organized it helps me reason my way through the project.
 
here is what i have so far:

Public Class gameScoreCalculatorForm

Inherits System.Windows.Forms.Form

#
Region " Windows Form Designer generated code "

Public Sub New()

MyBase.New()

'This call is required by the Windows Form Designer.

InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.

Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)

If disposing Then

If Not (components Is Nothing) Then

components.Dispose()

End If

End If

MyBase.Dispose(disposing)

End Sub

'Required by the Windows Form Designer

Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer

'It can be modified using the Windows Form Designer.

'Do not modify it using the code editor.

Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu

Friend WithEvents MenuItem1 As System.Windows.Forms.MenuItem

Friend WithEvents team1TextBox As System.Windows.Forms.TextBox

Friend WithEvents team1ScoreTextBox As System.Windows.Forms.TextBox

Friend WithEvents team2TextBox As System.Windows.Forms.TextBox

Friend WithEvents team2ScoreTextBox As System.Windows.Forms.TextBox

Friend WithEvents titleLabel As System.Windows.Forms.Label

Friend WithEvents teamLabel As System.Windows.Forms.Label

Friend WithEvents pointsLabel As System.Windows.Forms.Label

Friend WithEvents calculateButton As System.Windows.Forms.Button

Friend WithEvents winnerLabel As System.Windows.Forms.Label

<System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent()

Me.MainMenu1 = New System.Windows.Forms.MainMenu

Me.MenuItem1 = New System.Windows.Forms.MenuItem

Me.team1TextBox = New System.Windows.Forms.TextBox

Me.team1ScoreTextBox = New System.Windows.Forms.TextBox

Me.team2TextBox = New System.Windows.Forms.TextBox

Me.team2ScoreTextBox = New System.Windows.Forms.TextBox

Me.titleLabel = New System.Windows.Forms.Label

Me.teamLabel = New System.Windows.Forms.Label

Me.pointsLabel = New System.Windows.Forms.Label

Me.calculateButton = New System.Windows.Forms.Button

Me.winnerLabel = New System.Windows.Forms.Label

Me.SuspendLayout()

'

'MainMenu1

'

Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem1})

'

'MenuItem1

'

Me.MenuItem1.Index = 0

Me.MenuItem1.Text = "&Help"

'

'team1TextBox

'

Me.team1TextBox.Location = New System.Drawing.Point(32, 88)

Me.team1TextBox.Name = "team1TextBox"

Me.team1TextBox.Size = New System.Drawing.Size(128, 20)

Me.team1TextBox.TabIndex = 0

Me.team1TextBox.Text = ""

'

'team1ScoreTextBox

'

Me.team1ScoreTextBox.Location = New System.Drawing.Point(192, 88)

Me.team1ScoreTextBox.Name = "team1ScoreTextBox"

Me.team1ScoreTextBox.Size = New System.Drawing.Size(56, 20)

Me.team1ScoreTextBox.TabIndex = 1

Me.team1ScoreTextBox.Text = ""

'

'team2TextBox

'

Me.team2TextBox.Location = New System.Drawing.Point(32, 120)

Me.team2TextBox.Name = "team2TextBox"

Me.team2TextBox.Size = New System.Drawing.Size(128, 20)

Me.team2TextBox.TabIndex = 2

Me.team2TextBox.Text = ""

'

'team2ScoreTextBox

'

Me.team2ScoreTextBox.Location = New System.Drawing.Point(192, 120)

Me.team2ScoreTextBox.Name = "team2ScoreTextBox"

Me.team2ScoreTextBox.Size = New System.Drawing.Size(56, 20)

Me.team2ScoreTextBox.TabIndex = 3

Me.team2ScoreTextBox.Text = ""

'

'titleLabel

'

Me.titleLabel.Font = New System.Drawing.Font("Modern No. 20", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.titleLabel.Location = New System.Drawing.Point(40, 8)

Me.titleLabel.Name = "titleLabel"

Me.titleLabel.Size = New System.Drawing.Size(208, 32)

Me.titleLabel.TabIndex = 4

Me.titleLabel.Text = "Andrew Mehrer's Game Score Calculator"

Me.titleLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter

'

'teamLabel

'

Me.teamLabel.Font = New System.Drawing.Font("Modern No. 20", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.teamLabel.Location = New System.Drawing.Point(32, 56)

Me.teamLabel.Name = "teamLabel"

Me.teamLabel.TabIndex = 5

Me.teamLabel.Text = "Team:"

Me.teamLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft

'

'pointsLabel

'

Me.pointsLabel.Font = New System.Drawing.Font("Modern No. 20", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.pointsLabel.Location = New System.Drawing.Point(168, 56)

Me.pointsLabel.Name = "pointsLabel"

Me.pointsLabel.TabIndex = 6

Me.pointsLabel.Text = "Points:"

'

'calculateButton

'

Me.calculateButton.Location = New System.Drawing.Point(80, 168)

Me.calculateButton.Name = "calculateButton"

Me.calculateButton.Size = New System.Drawing.Size(128, 23)

Me.calculateButton.TabIndex = 7

Me.calculateButton.Text = "And The &Winner Is..."

'

'winnerLabel

'

Me.winnerLabel.Location = New System.Drawing.Point(32, 224)

Me.winnerLabel.Name = "winnerLabel"

Me.winnerLabel.Size = New System.Drawing.Size(232, 23)

Me.winnerLabel.TabIndex = 8

'

'gameScoreCalculatorForm

'

Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)

Me.ClientSize = New System.Drawing.Size(292, 273)

Me.Controls.Add(Me.winnerLabel)

Me.Controls.Add(Me.calculateButton)

Me.Controls.Add(Me.pointsLabel)

Me.Controls.Add(Me.teamLabel)

Me.Controls.Add(Me.titleLabel)

Me.Controls.Add(Me.team2ScoreTextBox)

Me.Controls.Add(Me.team2TextBox)

Me.Controls.Add(Me.team1ScoreTextBox)

Me.Controls.Add(Me.team1TextBox)

Me.Menu = Me.MainMenu1

Me.Name = "gameScoreCalculatorForm"

Me.Text = "Game Score Calculator"

Me.ResumeLayout(False)

End Sub

#End Region

Private Sub titleLabel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles titleLabel.Click

End Sub

Private Sub team1TextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles team1TextBox.TextChanged

If team1TextBox.Text = "" Then winnerLabel.Text=



End If

End Sub

Private Sub calculateButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles calculateButton.Click

If team1TextBox.Text = "" Or team2TextBox.Text = "" Then

winnerLabel.Text = "You have not yet entered a team."

ElseIf team1ScoreTextBox.Text = "" Or team2ScoreTextBox.Text = "" Then

winnerLabel.Text = "You have not yet enetered a score."

ElseIf team1TextBox.Text = "" Or team2TextBox.Text = "" Or

team1ScoreTextBox.Text = ""
Or team2ScoreTextBox.Text = "" Then

winnerLabel.Text = "You have not yet entered a team or a score."

End If

End Sub

Private Sub winnerLabel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles winnerLabel.Click

End Sub

End
Class

 
Back
Top