>Hi All,
>
>Question #1:
>
>I'm writing an application that has some custom classes that can be dynamically added to a form via a button. I assume I'll use the addobject method of the form to add custom class to the form but I'd like button's click code to act the same as when I add the class from the controls menu... ie when the class is dragged to the form from the it's menu it dynamically creates the class and assigns the class name automatically.
>
You'll have to choose the object name since you'll be using thisform.AddObject()
>
>Question #2:
>
>The custom class has a container with several objects ( shape, label etc. ) contained within. I've set the oledragmode to 1 for the container so I can drag/drop it around the form. What I've noticed is that unless I click and drag the container the drag/drop doesn't work. How do I set it so if I click and drag anywhere on the object it works ?
>
Since when you click on an object that's in the container and try to start the drag, the short answer is you can't, you're not on the container, you're on the object in the container. You'll have to put some sort of transparent shape over the object to trap the click, and pass the information down to the container itself. I've never tried doing that through the shape on top for drag/drop, but I guess it could be done. Maybe you can do it in each of the objects in the container to pass the click down to the container.