Jim,
>Thanks, I have another question related to my custom control. I want to add a label to the control and I want the width to be the width of the control. I have the code for it, but it's not setting the width of the label correctly. Am I doing something wrong?
At design time, after you drop the label onthe UserControl design surface, resize the label so it's the same size as the UserControl container. Afterwards just set the label's Anchor property so it's anchored to the right side of the UserControl container. It will then automatically resize to the width of the UserControl container at both design and run time.
Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com