Home All Groups Group Topic Archive Search About

How to copy only the contents of a picturebox?

Author
29 Nov 2007 7:25 PM
DORI
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

Author
29 Nov 2007 7:48 PM
Rick Raisley
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

Show quote
"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
>
Author
29 Nov 2007 8:49 PM
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
> >
>
>
>
Author
29 Nov 2007 9:24 PM
Saga
How are you copying the image? Are you scrapping the screen?

Regards,
Saga
--
20, 19, 18, 17, 16, 15...


Show quote
"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
>> >
>>
>>
>>
Author
29 Nov 2007 9:32 PM
Bob Butler
"Saga" <antiSpam@somewhere.com> wrote in message
news:uuSjw3sMIHA.4712@TK2MSFTNGP04.phx.gbl...
> How are you copying the image? Are you scrapping the screen?
>

Sounds pretty extreme, and costly! <g>
Author
29 Nov 2007 9:25 PM
Rick Raisley
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?

--
Regards,

Rick Raisley

Show quote
"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
> > >
> >
> >
> >

AddThis Social Bookmark Button