Results 1 to 11 of 11

Thread: [RESOLVED] Problem with checkbox & radio buttons...

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2010
    Location
    Ireland
    Posts
    85

    Resolved [RESOLVED] Problem with checkbox & radio buttons...

    Half the problem solved, but now I need,

    If GlassRadioButton.Checked = True Then
    , well here's where im stuck, I need Glass to get added to a string or something, so it can be called in myAddNew

    ?

    vb.net Code:
    1. "VALUES"
    2. Dim myValue As Integer ' Base value of frames        
    3. Dim myValue1 As Integer ' Glass or plastic value        
    4. Dim myValue2 As Integer ' Scratch Coating value        
    5. Dim myValue3 As Integer ' UV value        
    6. Dim totalCost As Integer ' Total value        
    7. Dim deposit As Integer ' Deposit value, 20% of total        
    8. myValue = 50 'Base value of frames, always 50        
    9. If GlassRadioButton.Checked = True Then            
    10.     myValue1 = 30        
    11. ElseIf
    12.     PlasticRadioButton.Checked = True Then            
    13.     myValue1 = 15        
    14. End If        
    15. If CheckBox1.Checked = True Then            
    16.     myValue2 = 10        
    17. Else            
    18.     myValue2 = 0        
    19. End If        
    20. If CheckBox2.Checked = True Then            
    21.     myValue3 = 15        
    22. Else            
    23.     myValue3 = 0        
    24. End If        
    25. totalCost = myValue + myValue1 + myValue2 + myValue3 'Gets total by adding all values        
    26. deposit = totalCost * 0.2 'Divides total by 0.2 to find the 20% deposit        
    27. TextBox1.Text = totalCost 'Displays total        
    28. TextBox2.Text = deposit 'Displays deposit        
    29. TextBox3.Text = totalCost - deposit 'Subtracts the deposit from total, to find balance        
    30. PrintButton.Enabled = True        
    31. ViewButton.Enabled = True        
    32. myAddNew(8) 'CALLS ADDNEW METHOD WHEN ADD BUTTON IS CLICKED
    Last edited by Kielo; Mar 24th, 2010 at 11:03 AM. Reason: Fixed Highlight Tags

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width