Klogg Posted October 31, 2003 Posted October 31, 2003 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. Quote Take a look at my programs. Go to my web site.
*Experts* mutant Posted October 31, 2003 *Experts* Posted October 31, 2003 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. Quote
Klogg Posted October 31, 2003 Author Posted October 31, 2003 I did some searches and still can't figure out how to pass instances. Could you please show me how? Quote Take a look at my programs. Go to my web site.
*Experts* mutant Posted October 31, 2003 *Experts* Posted October 31, 2003 This thread for example :): http://www.xtremedotnettalk.com/showthread.php?s=&threadid=78756&highlight=constructor Quote
Klogg Posted October 31, 2003 Author Posted October 31, 2003 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. Quote Take a look at my programs. Go to my web site.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.