put drawing object inside another drawing object

put drawing object inside another drawing object

Post by Tai Huyn » Sun, 14 Apr 2002 04:25:33



Hi everyone,

this maybe a stupid question to ask but i don't know how
to search for it or where to find out.
how do you put drawing object inside another drawing
object at both design and run time? ie... i want to put
an image box inside a picture box instead of on its form.

appreicated any help,

--Tai Huynh

 
 
 

put drawing object inside another drawing object

Post by Jian-Wei Yu ( » Tue, 16 Apr 2002 11:31:45


Hello,

Thank you for using the Microsoft VB Newsgroups.

The picture can be used as a container and we can put the other controls in
it, includes the image control or the button control. Is there any problem?

Hope it helps. If you have any questions, please reply to this post.

Regards,  

Jian-Wei Yu
Microsoft Support

This posting is provided "AS IS" with no warranties, and confers no rights.

 
 
 

put drawing object inside another drawing object

Post by Gourang » Tue, 16 Apr 2002 22:29:31


design time:
Try to cut the object using the "Edit" menu.
Thereafter, CLICK parent picture box and paste.

run-time:
Try using "SetParent" api.
It's been a while, but this involves passing
PictureBox1.hwnd etc.
Thereafter, the operating system will do the work for you.

Hope this helps!
Gouranga :-)

 
 
 

put drawing object inside another drawing object

Post by Mike D Sutton » Wed, 17 Apr 2002 00:25:48


Quote:> run-time:
> Try using "SetParent" api.

Shape controls are windowless and therefore won't be able to be referenced
via the SetParent() API.
AFAIK you can't change the parent of a shape control at runtime since they
don't really exist (They just plug into the rendering routine of their
parent) however I could be wrong, who knows what VB does 'under the hood' :)

    Mike

 -- EDais --

 - Microsoft Visual Basic MVP -
WWW: Http://EDais.earlsoft.co.uk/


 
 
 

put drawing object inside another drawing object

Post by Mike D Sutton » Wed, 17 Apr 2002 00:25:48


Quote:> run-time:
> Try using "SetParent" api.

Shape controls are windowless and therefore won't be able to be referenced
via the SetParent() API.
AFAIK you can't change the parent of a shape control at runtime since they
don't really exist (They just plug into the rendering routine of their
parent) however I could be wrong, who knows what VB does 'under the hood' :)

    Mike

 -- EDais --

 - Microsoft Visual Basic MVP -
WWW: Http://EDais.earlsoft.co.uk/


 
 
 

put drawing object inside another drawing object

Post by Tai Huyn » Wed, 17 Apr 2002 07:59:26


Thanks Goruange,

i got it working.  appreciated the help.  
Mike is right regarding "setparent" api for run time,
can't relocate the object when it doesn't have a hwnd.  
Still don't know how to do that.  any help will be
appreciated it.

--Tai Huynh

Quote:>-----Original Message-----
>design time:
>Try to cut the object using the "Edit" menu.
>Thereafter, CLICK parent picture box and paste.

>run-time:
>Try using "SetParent" api.
>It's been a while, but this involves passing
>PictureBox1.hwnd etc.
>Thereafter, the operating system will do the work for
you.

>Hope this helps!
>Gouranga :-)
>.

 
 
 

put drawing object inside another drawing object

Post by Mike D Sutto » Wed, 17 Apr 2002 08:54:27


Quote:> i got it working.  appreciated the help.
> Mike is right regarding "setparent" api for run time,
> can't relocate the object when it doesn't have a hwnd.
> Still don't know how to do that.  any help will be
> appreciated it.

You wouldn't - Just draw it yourself onto the control's surface?  Subclass
if needs be and catch the WM_PAINT message (That's how the shape controls
are doing it :)
Hope this helps,

    Mike

 -- EDais --

 - Microsoft Visual Basic MVP -
WWW: Http://EDais.earlsoft.co.uk/


 
 
 

1. Parts of corel draw objects/graphic are disappears in Corel Draw 6.0

Pls. Help!

I cant see more the a complete Corel object/graphic in Corel Draw
6.0/Win 98. Same of the planes of a objects are hidden and you see
no outlines more. I had reinstall (with clean up of the registry)
Corel 6.0 and its doesnt help. The same with *.wmf files.

I can export the objects (e.g. *.jpg) and its works fine the
object/graphic are complete. I had install a old version (e.g. 3.0) and
I can work, but not in 6.0

What do I wrong? I had look in the documentation, but I found nothing.!

Many Thanks!!!!!

Reg. H. K.

Sent via Deja.com http://www.deja.com/
Before you buy.

2. Controlling buffer swap in mvShowCurrentTime()

3. Objects inside object with transmittance ! (POV)

4. I have a 3D app question

5. objects into draw - how?

6. Job: US/Boston: Optical Sensing, Recognition, and Modeling

7. Object-Oriented SunOS Drawing Programs??

8. Maybe off topic but... DirectX Media Transforms and...

9. drawing connections between objects

10. GL object: draw while create possible?

11. Drawing on an Object in Inventor

12. objects vs explicit drawing ---