Click here to Skip to main content
15,897,704 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How do I set permissions for delete or move a file from external drive in Vista Pin
x38class10-Apr-09 23:02
x38class10-Apr-09 23:02 
GeneralRe: How do I set permissions for delete or move a file from external drive in Vista Pin
Anubhava Dimri10-Apr-09 23:15
Anubhava Dimri10-Apr-09 23:15 
GeneralRe: How do I set permissions for delete or move a file from external drive in Vista Pin
x38class11-Apr-09 20:37
x38class11-Apr-09 20:37 
GeneralRe: How do I set permissions for delete or move a file from external drive in Vista Pin
Anubhava Dimri12-Apr-09 18:06
Anubhava Dimri12-Apr-09 18:06 
GeneralRe: How do I set permissions for delete or move a file from external drive in Vista Pin
x38class13-Apr-09 21:01
x38class13-Apr-09 21:01 
GeneralRe: How do I set permissions for delete or move a file from external drive in Vista Pin
Anubhava Dimri13-Apr-09 21:12
Anubhava Dimri13-Apr-09 21:12 
GeneralRe: How do I set permissions for delete or move a file from external drive in Vista Pin
x38class18-Apr-09 19:10
x38class18-Apr-09 19:10 
QuestionCan you help me code a function procedure in Visual Basic 2008? Pin
Boblc12310-Apr-09 18:36
Boblc12310-Apr-09 18:36 
Hey guys if anyone could help me this would be extremely appreciated. My homework assignment is to take a checking account program that we've already written and add function procedures to it. The exact instructions are: Write function procedures for processing deposits, checks, and service charges. Deposit function adds the deposit to the balance; the check subtracts the transaction amount from the balance; the service charge function subtracts the amount from the balance. each of the functions must return the updated balance.

Again, this program currently works as it is right now but we have to tweak the code to include function procedures as per the above mentioned directions.

<pre>
Private Sub CalculateToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CalculateToolStripMenuItem.Click
Try
If Decimal.Parse(AmountTextBox.Text) > 0 Then
'assigns the variable
amountDecimal = Decimal.Parse(AmountTextBox.Text)


'checks to see which Radio button is checked and performs calculations
If DepositRadioButton.Checked Then
newbalanceDecimal += amountDecimal
totalamountdepositsDecimal += amountDecimal
totaldepositsInteger += 1

ElseIf CheckRadioButton.Checked Then
'checks to see if balance is greater than the amount entered
If newbalanceDecimal >= amountDecimal Then
newbalanceDecimal -= amountDecimal
totalchecksInteger += 1
totalamountchecksDecimal += amountDecimal

'If amount entered is more than the balance then give an error and deduct 10 bux from balance
Else
MessageBox.Show("Insufficient Funds")
newbalanceDecimal -= 10
totalamountchecksDecimal += 10
totalservicechargesInteger += 1

End If

ElseIf ServiceChargeRadioButton.Checked Then
newbalanceDecimal -= amountDecimal
totalamountservicechargesDecimal += amountDecimal
totalservicechargesInteger += 1

'If no radio button is selected then give an error
Else
MessageBox.Show("You must select either Deposit, Checking, or Service Charge" _
, "Selection Required", MessageBoxButtons.OK, MessageBoxIcon.Error)
End If

'displays the final total in textbox
NewBalanceTextBox.Text = newbalanceDecimal.ToString("C")




'enable the summary menu
SummaryToolStripMenuItem.Enabled = True

'if numeric values are not entered then give an error

Else
MessageBox.Show("You CANNOT enter negative numbers into the Amount of Transaction textbox" _
, "Invalid Input", MessageBoxButtons.OK, MessageBoxIcon.Error)
End If

Catch
MessageBox.Show("You must enter numbers into the Amount textbox", "Invalid Input" _
, MessageBoxButtons.OK, MessageBoxIcon.Error)

End Try
End Sub
AnswerRe: Can you help me code a function procedure in Visual Basic 2008? Pin
Dave Kreskowiak10-Apr-09 18:49
mveDave Kreskowiak10-Apr-09 18:49 
GeneralRe: Can you help me code a function procedure in Visual Basic 2008? Pin
Boblc12310-Apr-09 18:56
Boblc12310-Apr-09 18:56 
GeneralRe: Can you help me code a function procedure in Visual Basic 2008? Pin
Wes Aday10-Apr-09 19:13
professionalWes Aday10-Apr-09 19:13 
GeneralRe: Can you help me code a function procedure in Visual Basic 2008? Pin
Dalek Dave10-Apr-09 19:34
professionalDalek Dave10-Apr-09 19:34 
GeneralRe: Can you help me code a function procedure in Visual Basic 2008? Pin
Wes Aday10-Apr-09 19:44
professionalWes Aday10-Apr-09 19:44 
GeneralRe: Can you help me code a function procedure in Visual Basic 2008? Pin
Eddy Vluggen10-Apr-09 23:40
professionalEddy Vluggen10-Apr-09 23:40 
GeneralRe: Can you help me code a function procedure in Visual Basic 2008? Pin
Dave Kreskowiak11-Apr-09 6:44
mveDave Kreskowiak11-Apr-09 6:44 
GeneralRe: Can you help me code a function procedure in Visual Basic 2008? Pin
Boblc12311-Apr-09 7:07
Boblc12311-Apr-09 7:07 
GeneralRe: Can you help me code a function procedure in Visual Basic 2008? Pin
Dave Kreskowiak11-Apr-09 14:33
mveDave Kreskowiak11-Apr-09 14:33 
GeneralRe: Can you help me code a function procedure in Visual Basic 2008? Pin
Mycroft Holmes11-Apr-09 15:27
professionalMycroft Holmes11-Apr-09 15:27 
GeneralRe: Can you help me code a function procedure in Visual Basic 2008? Pin
0x3c012-Apr-09 7:21
0x3c012-Apr-09 7:21 
QuestionVb.net windows application to web application Pin
nishkarsh_k10-Apr-09 18:17
nishkarsh_k10-Apr-09 18:17 
AnswerRe: Vb.net windows application to web application Pin
Dave Kreskowiak10-Apr-09 18:48
mveDave Kreskowiak10-Apr-09 18:48 
GeneralRe: Vb.net windows application to web application Pin
nishkarsh_k10-Apr-09 20:47
nishkarsh_k10-Apr-09 20:47 
GeneralRe: Vb.net windows application to web application Pin
Dave Kreskowiak11-Apr-09 6:45
mveDave Kreskowiak11-Apr-09 6:45 
GeneralRe: Vb.net windows application to web application Pin
Mycroft Holmes10-Apr-09 22:41
professionalMycroft Holmes10-Apr-09 22:41 
GeneralRe: Vb.net windows application to web application Pin
0x3c011-Apr-09 5:05
0x3c011-Apr-09 5:05 

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.