Results 1 to 3 of 3

Thread: Reference

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2007
    Posts
    192

    Reference

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    Main.Hide()
    Prenos.Show()

    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
    Main.Hide()
    Sistem.Show()
    End Sub

    I have those forms sistem,prenos a their design but project show me two errors:

    Where is problem

    Main.Hide()-Expression does not produce a value.

    Prenos.Show() -Reference to a non-shared member requires an object reference.
    How to resolve that ,is there problem with reference ,which to use?

  2. #2
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: Reference

    Hi,
    to show a form do similar to
    Dim frmSistem as new Sistem
    frmSistem.show
    or
    frmSistem.ShowDialog


    You could also do frmSistem.Hide if you do this.

    Pete
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Oct 2007
    Posts
    192

    Re: Reference

    I found that and works!

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