Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have two forms: one is the main form called CalculatorForm, and the other is a form to set the opacity, called OpacityForm. I want the current opacity of CalculatorForm to be shown in the NumericUpDown in OpacityForm. I have tried putting in something like:

 

Me.OpacityNumericUpDown.Text = CalculatorForm.Opacity * 100

But it says, "Reference to a non-shared member requires an object reference." This is where I need help. I have no idea how to do an object reference.

Take a look at my programs. Go to my web site.
  • *Experts*
Posted

You need the instance of that form. Not just the class name.

If you need an example on how to pass form instances between forms search the forums for something like "passing instances" or something similar.

Posted
Got it! Thanks a lot. I tried searching the forums for my problem before posting this thread, but I couldn't quite figure out which solution applied to the problem that I had.
Take a look at my programs. Go to my web site.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...