Click here to Skip to main content
15,507,526 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a game that I am integrating into my project and I need to know who to reference it on my form. Here is the code:

Private Sub Label27_Click(sender As System.Object, e As System.EventArgs) Handles lblWasteEm.Click
FormWasteEm.Show()
End Sub

Error Reference to a non-shared member requires an object reference.
Posted
Comments
Richard MacCutchan 11-Jul-14 11:29am    
You need to provide more information, what you have in your question does not match the title, and tells us very little about what you are trying to do.
Keith O. Williams 11-Jul-14 12:29pm    
Basically when someone click on the link WastedEm in my game form, I want the user to be able to go to the FormWasteEm.xaml file.

1 solution

You are calling Show on the class, but it is not a shared function. So you first need to instantiate a FormWasteEm object and then call Show on this instance.

HTH,
Gaston
 
Share this answer
 
Comments
Keith O. Williams 11-Jul-14 15:43pm    
How I do that? I am very new to this.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900