helo with displayInfo()

Discussion in 'Programming General' started by ludasky, Apr 5, 2008.

helo with displayInfo()
  1. Unread #1 - Apr 5, 2008 at 11:21 PM
  2. ludasky
    Referrals:
    0

    ludasky Guest

    helo with displayInfo()

    hi,

    i would like to Display the outcome in a labelBox but i cant get it to work for some reason using displayInfo(), anyone got any idea?it says displayInfo is not declared

    Option Explicit On
    Option Strict On


    Public Class Form1
    ' declare Varibles

    Private aSalariedEmployee As SalariedEmployee
    Private aCommissionEmployee As CommissionEmployee
    Private anEmployee As Employee
    Private weeklyPay As Decimal = 0
    Private salary As Decimal = 0
    Private sales As Decimal = 0
    Private salaryIsConverted As Boolean = False
    Private salesIsConverted As Boolean = False





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

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    'instantiate objects

    If RadioButton1.Checked Then
    salaryIsConverted = Decimal.TryParse(MaskedTextBox1.Text, salary)
    aSalariedEmployee = New SalariedEmployee(TextBox1.Text, TextBox2.Text, salary)

    weeklyPay = aSalariedEmployee.AnnualSalary / 52

    'Cast aSalariedEmployee as Employee
    anEmployee = aSalariedEmployee
    displayInfo()
     
  3. Unread #2 - Apr 20, 2008 at 1:13 PM
  4. megajosh2
    Joined:
    Apr 18, 2008
    Posts:
    59
    Referrals:
    0
    Sythe Gold:
    0

    megajosh2 Member

    helo with displayInfo()

    If you want to display something in a label with code, you need to say:
    Code:
    NameofTheLabel.Text = WhatYouWantItToSay
    The replacements I believe are obvious.
     
< Free java and html and php Programmer | Making A Runescape Client >

Users viewing this thread
1 guest


 
 
Adblock breaks this site