Please remove
www.mevaprod.co.za 083 398 7918 011-659-0798 Designer Databases Project Management Database Hosting Regards John Disclaimer Any unauthorised use or interception of this e-mail is strictly prohibited. If this e-mail is not intended for you, you may not copy, distribute or disclose the contents to anyone. If you are not the intended recipient please delete this e-mail immediately. MevaProd cannot accept responsibility or liability for any damages whatsoever arising from or as a result of the use of or reliance on the content of this message. MevaProd cannot give any warranty or guarantee concerning the confidentiality or security of the e-mail system. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of CV Sent: 29 September 2006 03:11 PM To: Getting Started Subject: Re: How to use DrawInto method On Sep 28, 2006, at 11:53 PM, Peter Bozek wrote: > On 9/29/06, CV <[EMAIL PROTECTED]> wrote: > >> > dim aContainer a MyContainer >> > >> > aContainer = New MyContainer >> > aContainer.Initialize >> > aContainer.Show // this line does not seem to have any effect on >> > aContainer.DrawInto (g,0,0) >> > >> > but nothing is drawn. It seems that Paint method of objects in >> > Container is not called at all. >> >> Do you want to embed a ContainerControl on a canvas or window during >> runtime? If so, check out the EmbedWithin command. That would be the >> runtime equivalent of "put it into window" as you mention above. >> >> Or is your objective something else? >> > > Yes, I would like to draw the container to window many times. I could > create many containers and embed them in a window, but it seemed to me > that using one container and drawing it into the Window would be > easier. As Container is a child of Window and support DrawInto, this > should work - I wanted to know if I am doing something wrong or there > is some problem with Drawinto. So you are just drawing; you want images of controls, not functioning controls? OK... If that is the case then just draw your ContainerControl into a Picture object and DrawPict the picture where you want it. From a pushbutton your code would look more like this: dim p as picture = NewPicture (ContainerControl11.width,ContainerControl11.height,32) dim g as Graphics = p.Graphics ContainerControl11.DrawInto p.Graphics, 0, 0 self.Canvas1.Graphics.DrawPicture p, 0, 0 DrawInto is not perfect, so you may see some issues there depending on what controls you have in your ContainerControl. Also, as with any type of drawing, you will have the usual issues of maintaining your image. To handle that, create a window property to hold your picture, then DrawPicture that property in Canvas_Paint as well. Best, Jack _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html> -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.407 / Virus Database: 268.12.9/458 - Release Date: 27/Sep/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.407 / Virus Database: 268.12.9/458 - Release Date: 27/Sep/2006 _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>