locked
Expression Does Not Produce A Value Or A Bug?? RRS feed

  • Question

  • I Try To Code A OS But I Cannot Use The Command 'show' It Just Comes Up With An Error Saying 'Expression Does Not Produce A Value' Is It A Bug? Code:

    Public

    ClassLogIn


       

    PrivateSubButton1_Click(sender AsObject, e AsEventArgs) HandlesButton1.Click

            Show.AdminDesktop()

       

    EndSub

    End

    Class

    Sunday, February 9, 2014 5:04 PM

Answers

  • Hi,

     If AdminDesktop is the name of a Form that your trying to show then you need to do this

    AdminDesktop.Show



    EDIT : However, i would recommend creating a new instance of the form if that is what it is. Like this

    Dim MyForm as new AdminDesktop 'Create the new instance of the Form
    MyForm.Show 'Show the new instance of the form


    • Edited by IronRazerz Sunday, February 9, 2014 5:12 PM
    • Proposed as answer by .paul. _ Sunday, February 9, 2014 10:33 PM
    • Marked as answer by Leo (Apple) Yang Monday, February 17, 2014 8:39 AM
    Sunday, February 9, 2014 5:08 PM

All replies

  • Hi,

     If AdminDesktop is the name of a Form that your trying to show then you need to do this

    AdminDesktop.Show



    EDIT : However, i would recommend creating a new instance of the form if that is what it is. Like this

    Dim MyForm as new AdminDesktop 'Create the new instance of the Form
    MyForm.Show 'Show the new instance of the form


    • Edited by IronRazerz Sunday, February 9, 2014 5:12 PM
    • Proposed as answer by .paul. _ Sunday, February 9, 2014 10:33 PM
    • Marked as answer by Leo (Apple) Yang Monday, February 17, 2014 8:39 AM
    Sunday, February 9, 2014 5:08 PM
  • I Try To Code A OS But I Cannot Use The Command 'show' It Just Comes Up With An Error Saying 'Expression Does Not Produce A Value' Is It A Bug? Code:

    Public

    ClassLogIn


       

    PrivateSubButton1_Click(sender AsObject, e AsEventArgs) HandlesButton1.Click

            Show.AdminDesktop()

       

    EndSub

    End

    Class


    that looks like pre vb.net code, if it was vb ever

    thanks for any help

    Sunday, February 9, 2014 10:34 PM