Copy a contro from one form to another Form

Copy a contro from one form to another Form

Post by Doming » Wed, 23 Aug 2000 04:00:00



Hello Again.

I need to copy a contro from one form to another form

I find the SetParent Api. but this Api only moves a control from one form to
another form.

Is there any Api to copy controls?

Anyone can help me?

Thanks,

 
 
 

Copy a contro from one form to another Form

Post by Jim Deutc » Wed, 23 Aug 2000 04:00:00



>Hello Again.

>I need to copy a contro from one form to another form

>I find the SetParent Api. but this Api only moves a control from one form
to
>another form.

>Is there any Api to copy controls?

Nope.

What you _can_ do, is create a new control and move that one to the other
form (with Setparent).  In VB6 you can use Controls.Add.  In VB5, you must
have a control array (i.e. the Index property of the original control must
not be Null) and then use the Load command to create another control in the
array.

Jim Deutch
MS Dev MVP

 
 
 

1. One palette for one form!

I am trying to create a single palette (for 256 color mode displays) for
a whole form. I figured out by looking at the source that I needed to
override .GetPalette and respond to the WM_ palette messages.
Infortunately I did not get any result.

The form is scattered with controls that all use some 'strange' colors
due to "design", and they are ugly in 256 color modes. Is there a simple
way to have a single palette for the whole form or even the whole app.?
The colors that need to be in the palette are known in advance, not only
at run time, and do not change during the session.

Thanx,

Ritsaert Hornstra

2. RGB - tile creating with mathematical algorithm ?

3. questions on GL,Inventor,OpenGl and forms and Forms Bug

4. Problem using the Vertex Space Culling

5. Closed-Form Form-Factor

6. How to visualize my image

7. Forms in Form

8. can it be done?

9. How do I get the size of form borders and title bar on a form

10. Embedding a form in another form

11. Forms inside forms

12. Special form-to-form transitions...possible?

13. MDI Form, ZOrder of Componets vrs MDIchild forms