|
-
Aug 24th, 2010, 04:26 PM
#28
Re: Control Array in VS 2010
The first error is because you didn't make an event called "ButtonPressed" in your UserControl. My example shows how to add one but it's only an example. You need to make your own events according to what you want your control to do. MouseClick works because ALL controls have a default MouseClick event. It fires when you click anywhere on the control.
You named your usercontrol "UserControl1". So when you put one on your form, it made a control named "UserControl11". This is just like all other controls. A TextBox is just called a "TextBox", but when you move it to your form, it makes the first one "TextBox1"
What the second error means, is you're referring to the GENERIC name of the control, and not the SPECIFIC control that is sitting on your form.
If you change the line to read: points = UserControl11.Points_Send
Then everything will be fine. Better yet, rename your UserControl to something better than "UserControl1".
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|