|
-
Sep 14th, 2005, 12:56 PM
#1
Thread Starter
Fanatic Member
[RESOLVED] Passing controls to a class
I need help with passing a control to a class.
I'm trying to create a control to handle properties and stuff for an image on a user control (I'm essentially turning the image into the button and storing data in the class).
Well I want to pass the actual image control to the class so I can set the properties of the class.
This works fine.. I can do like imgBox.visible from within the class just fine.
The problem is I cannot handle the events of the image anywhere... If I delcare the imgBox variable withevents in the class then it tells me the object isn't declared when I try to pass the image control to it. If I don't use events in the class the control itself dosn't catch it's own events.
It's actually a control array on the usercontrol and all the indexes that I don't pass to the class still handle properly, but the ones that I pass to the class control do not fire their MouseMove Down and Up events that I need...
Any ideas?
EDIT:
Oh I did try another way to, I thought about trying to scratch passing the image and just create one from within the class.. but that didn't work either. I couldn't find anyway to create a dynamic image control on the usercontrol from within the class.
Last edited by StevenHickerson; Sep 14th, 2005 at 01:01 PM.
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
|