Overclock.net - Overclocking.net
     
 
Home Gallery Reviews Blogs Register Today's Posts Mark Forums Read Members List


Go Back   Overclock.net - Overclocking.net > Software, Programming and Coding > Coding and Programming

Reply
 
LinkBack Thread Tools
Old 02-20-07   #1 (permalink)
Stealth Mode
 
TheLegend's Avatar
 
intel nvidia

Join Date: Jan 2006
Location: Milwaukee, WI
Posts: 5,831

FAQs Submitted: 1
Trader Rating: 21
Default VB Code Error

Just trying to finish an application for my Visual Systems Development class. I'm having a little trouble with the coding.

Our assignment is to design an application in which a user inputs a number of seconds and based upon the program it can decipher the number of seconds and turn them into minutes, hours and days.

I have attached the program. It's an exe, but its a demo project so don't worry about it being some virus.

Here is the actual code. When I try and debug the application, the following in bold come up as build errors.Thanks for the help guys.

Quote:
Option Explicit On
Option Strict On
Public Class MyForm


Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles xinputTextBox.TextChanged

End Sub

Private Sub xSecondsInputBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles xSecondsTextBox.TextChanged

End Sub

Private Sub MyForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub

Private Sub xMinutesInputBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles xMinutesTextBox.TextChanged

End Sub

Private Sub xCalcMinButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles xCalcMinButton.Click

Dim xMinutesTextBox As Integer
Dim xSecondsTextBox As Integer

'Get the user input in seconds
Integer.TryParse(xinputTextBox.Text, xSecondsTextBox)

'Convert the seconds into mintues and remaining seconds
xMinutesTextBox = CInt(xSecondsTextBox / 60)
xSecondsTextBox = xSecondsTextBox Mod 60

'Disable(xCalcMinButton)
xCalcMinButton.Enabled = False
'Enable(xCalcHourButton)
xCalcHourButton.Enabled = True

'Focus on next input box
Me.xCalcHourButton.Focus()

End Sub

Private Sub xCalcHoursButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles xCalcHourButton.Click

Dim xMinutesTextBox As Integer
Dim xHourTextBox As Integer
Dim xinputTextBox As Integer
Dim xSecondsTextBox As Integer

'Get the user input in hours
Integer.TryParse(xinputTextBox.Text, xHourTextBox)

'Convert remaining minutes into hours
xHoursTextBox = xMinutesTextBox / 60
xMinutesTextBox = CInt(xSecondsTextBox / 60)
xSecondsTextBox = xinputTextBox Mod 60

'Disable(xCalcMinButton)
xCalcMinButton.Enabled = False
'Disable(xCalcHourButton)
xCalcHourButton.Enabled = False
'Enable(xCalcDaysButton)
xCalcDaysButton.Enabled = True

'Focus on the next calc box
Me.xCalcDaysButton.Focus()
End Sub

Private Sub xCalcDaysButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles xCalcDaysButton.Click


Dim xMinutesTextBox As Integer
Dim xSecondsTextBox As Integer
Dim xHourTextBox As Integer
Dim xinputTextBox As Integer

'Get the user input in hours
Integer.TryParse(xinputTextBox.Text, xDaysTextBox)

xDaysTextBox = xHourTextBox / 24
xHoursTextBox = xMinutesTextBox / 60
xMinutesTextBox = CInt(xSecondsTextBox / 60)
xSecondsTextBox = xinputTextBox Mod 60

'Display the updated minutes and seconds
'Disable(xCalcMinButton)
xCalcMinButton.Enabled = False
'Disable(xCalcHourButton)
xCalcHourButton.Enabled = False
'Disable(xCalcDaysButton)
xCalcDaysButton.Enabled = False

'Focus on next calc box
Me.xClearButton.Focus()
End Sub

Private Sub xClearButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles xClearButton.Click

'Clear screen for the Next Order
Me.xSecondsTextBox.Text = String.Empty
Me.xHoursTextBox.Text = String.Empty
Me.xDaysTextBox.Text = String.Empty
Me.xinputTextBox.Text = String.Empty

'Send Cursor to the Customer Name Box
Me.xinputTextBox.Focus()

End Sub

Private Sub xExitButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles xExitButton.Click
'Exit the application
Me.Close()
End Sub
End Class
Attached Files
File Type: rar Project1Demo.rar (8.9 KB, 3 views)
__________________
|
PC Audio Setup:
JRiver Media Center ASIO(FLAC) > E-MU 0404 USB > LD MKIII > Grado SR225 / HD555

Fold for 37726
Folding Team "Just Be Cause" Honorary Member

System: Legendary
CPU
E6750
Motherboard
ASUS P5B Deluxe
Memory
2 x 2GB G.Skill PQ
Graphics Card
XFX 8800GT [721|1802|2050]
Hard Drive
Seagate 250GB x 2
Sound Card
X-Fi XtremeMusic
Power Supply
PC P&C Quad 750W Silencer
Case
Thermaltake Tsunami Dream
CPU cooling
Tuniq Tower 120 | Lapped
OS
Vista x64
Monitor
Samsung 225BW

Last edited by TheLegend : 02-20-07 at 01:16 AM.
TheLegend is offline Overclocked Account   Reply With Quote
Old 02-20-07   #2 (permalink)
PC Gamer
 
someone153's Avatar
 
intel nvidia

Join Date: May 2006
Posts: 1,192

Rep: 67 someone153 is acknowledged by some
Unique Rep: 55
Trader Rating: 1
Default

What is the error?
__________________
Counter Strike: Source Name: [OCN][A] Someone153
Battlfield 2 Name: kill3r153

System: Primary Rig
CPU
P4 3.0 GHz Northwood
Motherboard
Dell Dimension 4600i
Memory
2 GB Dell RAM
Graphics Card
eVga GeForce 7800 GS
Hard Drive
60 GB Internal 160 GB Ex.
Sound Card
Intergrated Sound
Power Supply
XClio 450BL ATX PSU
Case
Dell Demension 4600 Case
CPU cooling
Stock
GPU cooling
Zalman VF900
OS
Windows XP Home with SP2
Monitor
Dell 19" LCD
someone153 is offline   Reply With Quote
Old 02-20-07   #3 (permalink)
Stealth Mode
 
TheLegend's Avatar
 
intel nvidia

Join Date: Jan 2006
Location: Milwaukee, WI
Posts: 5,831

FAQs Submitted: 1
Trader Rating: 21
Default

Quote:
Originally Posted by someone153 View Post
What is the error?
The code in bold gives build errors.
__________________
|
PC Audio Setup:
JRiver Media Center ASIO(FLAC) > E-MU 0404 USB > LD MKIII > Grado SR225 / HD555

Fold for 37726
Folding Team "Just Be Cause" Honorary Member

System: Legendary
CPU
E6750
Motherboard
ASUS P5B Deluxe
Memory
2 x 2GB G.Skill PQ
Graphics Card
XFX 8800GT [721|1802|2050]
Hard Drive
Seagate 250GB x 2
Sound Card
X-Fi XtremeMusic
Power Supply
PC P&C Quad 750W Silencer
Case
Thermaltake Tsunami Dream
CPU cooling
Tuniq Tower 120 | Lapped
OS
Vista x64
Monitor
Samsung 225BW
TheLegend is offline Overclocked Account   Reply With Quote
Old 02-20-07   #4 (permalink)
Database Developer
 
Quasimojo's Avatar
 
intel nvidia

Join Date: Feb 2007
Posts: 451

Rep: 10 Quasimojo Unknown
Unique Rep: 10
Trader Rating: 0
Default

Maybe my eyesight is just going, but I don't see any bolded code.
__________________
System: Sanctuary
CPU
C2D E6300
Motherboard
Asus P5B Deluxe
Memory
2x2GB Corsair XMS2 TwinX PC2 6400 5-5-5-15
Graphics Card
eVGA 8800 GTS 640MB
Hard Drive
Raptor 74GB/8MB - OS, 2x7200.10 250MB RAID 0/1 IMR
Sound Card
AC'97 integrated
Power Supply
OCZ GameXStream 700W
Case
Antec P180
CPU cooling
[stock]
GPU cooling
[stock]
OS
Windows Vista Ultimate 64-bit
Monitor
Acer 22" AL2216WBD LCD
Quasimojo is offline   Reply With Quote
Old 02-20-07   #5 (permalink)
Security Sleuth
 
kc-tr's Avatar
 
intel nvidia

Join Date: Nov 2006
Location: root@big-brother:/$
Posts: 1,849

Rep: 119 kc-tr is acknowledged by manykc-tr is acknowledged by many
Unique Rep: 96
Hardware Reviews: 1
Trader Rating: 8
Default

Quote:
Originally Posted by Quasimojo View Post
Maybe my eyesight is just going, but I don't see any bolded code.
Same here. The exact error message and portion of code that is being pointed out as the error would be very helpful.
__________________
IRC nick - tgalyean / normally found in #fedora-admin

System: █۩█
CPU
E6400 @ 3.4GHz
Motherboard
DFI INFINITY P965-S
Memory
2GB G.Skill HZ
Graphics Card
XFX 7900GS 659MHz/2000MHz
Hard Drive
Raptor 74GB
Sound Card
X-FI
Power Supply
600Watt Modular w/120mm Fan
Case
Cooler Master Centerion
CPU cooling
Stock
GPU cooling
Zalman Fatal1ty FC-ZV9
OS
XP Pro x64
Monitor
Acer AL17
kc-tr is offline kc-tr's Gallery   Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools



All times are GMT -4. The time now is 01:01 PM.


Overclock.net is a Carbon Neutral Site Creative Commons License Internet Security By ControlScan

Terms of Service / Forum Rules | Privacy Policy | Advertising | Become an Official Vendor
Copyright © 2008 Shogun Interactive Development. Most rights reserved.
Page generated in 0.26029 seconds with 9 queries