|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to copy only the contents of a picturebox?Dear All,
I am copying the contents of a picturebox in bitmap format to the hard drive. It is working great but sometimes the users open other forms or toolboxes which may be on top of the picturebox and when they save the contents of the picturebox, the parts of the form or toolbox which are overlapped with the picturebox will be also saved. How can I avoid this problem or what else would you suggest? Thanks you very much for your comments in advance. DORI The easy way, I think, is to set the AutoRedraw property of the PictureBox
to True. This uses more memory, but should eliminate the problem. -- Show quoteRegards, Rick Raisley "DORI" <D***@discussions.microsoft.com> wrote in message news:C5D272F5-B50C-41D4-9572-91255219CBF6@microsoft.com... > Dear All, > I am copying the contents of a picturebox in bitmap format to the hard > drive. It is working great but sometimes the users open other forms or > toolboxes which may be on top of the picturebox and when they save the > contents of the picturebox, the parts of the form or toolbox which are > overlapped with the picturebox will be also saved. How can I avoid this > problem or what else would you suggest? > Thanks you very much for your comments in advance. > DORI > Hi Rick,
The AutoRedraw property of the picturebox is already set to True. It seems that whatever overlaps with the picturebox, will be copied. DORI Show quote "Rick Raisley" wrote: > The easy way, I think, is to set the AutoRedraw property of the PictureBox > to True. This uses more memory, but should eliminate the problem. > > -- > Regards, > > Rick Raisley > > "DORI" <D***@discussions.microsoft.com> wrote in message > news:C5D272F5-B50C-41D4-9572-91255219CBF6@microsoft.com... > > Dear All, > > I am copying the contents of a picturebox in bitmap format to the hard > > drive. It is working great but sometimes the users open other forms or > > toolboxes which may be on top of the picturebox and when they save the > > contents of the picturebox, the parts of the form or toolbox which are > > overlapped with the picturebox will be also saved. How can I avoid this > > problem or what else would you suggest? > > Thanks you very much for your comments in advance. > > DORI > > > > > How are you copying the image? Are you scrapping the screen?
Regards, Saga -- Show quote20, 19, 18, 17, 16, 15... "DORI" <D***@discussions.microsoft.com> wrote in message news:FF03A7FB-A330-4AE6-A49E-97FA0FC5984D@microsoft.com... > Hi Rick, > The AutoRedraw property of the picturebox is already set to True. It seems > that whatever overlaps with the picturebox, will be copied. > DORI > > "Rick Raisley" wrote: > >> The easy way, I think, is to set the AutoRedraw property of the PictureBox >> to True. This uses more memory, but should eliminate the problem. >> >> -- >> Regards, >> >> Rick Raisley >> >> "DORI" <D***@discussions.microsoft.com> wrote in message >> news:C5D272F5-B50C-41D4-9572-91255219CBF6@microsoft.com... >> > Dear All, >> > I am copying the contents of a picturebox in bitmap format to the hard >> > drive. It is working great but sometimes the users open other forms or >> > toolboxes which may be on top of the picturebox and when they save the >> > contents of the picturebox, the parts of the form or toolbox which are >> > overlapped with the picturebox will be also saved. How can I avoid this >> > problem or what else would you suggest? >> > Thanks you very much for your comments in advance. >> > DORI >> > >> >> >> "Saga" <antiSpam@somewhere.com> wrote in message Sounds pretty extreme, and costly! <g>news:uuSjw3sMIHA.4712@TK2MSFTNGP04.phx.gbl... > How are you copying the image? Are you scrapping the screen? > I'm not sure, then. What you describe usually occurs without AutoRedraw on.
I'm not sure it matters, but how are you putting the pictures into the PictureBox in the first place? Loaded from files? Copied from other controls or programs? Is the PictureBox visible when doing the save? -- Show quoteRegards, Rick Raisley "DORI" <D***@discussions.microsoft.com> wrote in message news:FF03A7FB-A330-4AE6-A49E-97FA0FC5984D@microsoft.com... > Hi Rick, > The AutoRedraw property of the picturebox is already set to True. It seems > that whatever overlaps with the picturebox, will be copied. > DORI > > "Rick Raisley" wrote: > > > The easy way, I think, is to set the AutoRedraw property of the PictureBox > > to True. This uses more memory, but should eliminate the problem. > > > > -- > > Regards, > > > > Rick Raisley > > > > "DORI" <D***@discussions.microsoft.com> wrote in message > > news:C5D272F5-B50C-41D4-9572-91255219CBF6@microsoft.com... > > > Dear All, > > > I am copying the contents of a picturebox in bitmap format to the hard > > > drive. It is working great but sometimes the users open other forms or > > > toolboxes which may be on top of the picturebox and when they save the > > > contents of the picturebox, the parts of the form or toolbox which are > > > overlapped with the picturebox will be also saved. How can I avoid this > > > problem or what else would you suggest? > > > Thanks you very much for your comments in advance. > > > DORI > > > > > > > > > |
|||||||||||||||||||||||