M
Massimo
Hi to all.
I need to create a custom control which does the following:
- It should contain a first, fixed image.
- It should manage a second image, which will change programmatically.
- It should display the second image on top of the first one, updating it in
response to user events; the second image will of course have a transparent
background.
- The second image should be accessible outside the control, and wil be used
for printing on some paper forms which are, as you probably guessed, the
same as the first image; this is the reason for having two separate images.
I'm trying to develop this, but I'm quite confused about the various
System.Drawing classes and which Windows Forms control is the best to use as
my control's base class. I don't thoroughly understand the process of
painting a control, and the relationships between an Image, a Drawing object
and the control.
My initial guess was to use a PictureBox, set its BackGroundImage property
to the fixed image and use the Image property for my drawing... but I don't
know how to do manual drawing this way.
Is this a good approach, or there is a better one?
Also, I know very little about printing with Windows Forms. What do I need
for printing? An Image? A Graphics object? What else?
Can someone please help?
Thanks
Massimo
I need to create a custom control which does the following:
- It should contain a first, fixed image.
- It should manage a second image, which will change programmatically.
- It should display the second image on top of the first one, updating it in
response to user events; the second image will of course have a transparent
background.
- The second image should be accessible outside the control, and wil be used
for printing on some paper forms which are, as you probably guessed, the
same as the first image; this is the reason for having two separate images.
I'm trying to develop this, but I'm quite confused about the various
System.Drawing classes and which Windows Forms control is the best to use as
my control's base class. I don't thoroughly understand the process of
painting a control, and the relationships between an Image, a Drawing object
and the control.
My initial guess was to use a PictureBox, set its BackGroundImage property
to the fixed image and use the Image property for my drawing... but I don't
know how to do manual drawing this way.
Is this a good approach, or there is a better one?
Also, I know very little about printing with Windows Forms. What do I need
for printing? An Image? A Graphics object? What else?
Can someone please help?
Thanks
Massimo