| View previous topic :: View next topic |
| Author |
Message |
Mark Williams Guest
|
Posted: Thu Sep 02, 2004 7:48 am Post subject: Re: in a transperent component |
|
|
Assuming the components on a form, why don't you use the form's canvas?
"ici" <ici (AT) go (DOT) com.jo> wrote
| Quote: | how I can reach the screen canvas
I need to get the background of some component
to make it transperent, thanks on advance.
yours Omer h.
|
|
|
| Back to top |
|
 |
Jens Gruschel Guest
|
Posted: Thu Sep 02, 2004 9:38 pm Post subject: Re: in a transperent component |
|
|
| Quote: | how I can reach the screen canvas
|
ScreenCanvas := TCanvas.Create;
try
ScreenDC := GetDC(0);
try
ScreenCanvas.Handle := GetDC(0);
[...]
finally
ReleaseDC(0);
end;
finally
ScreenCanvas.Free;
end;
| Quote: | I need to get the background of some component
to make it transperent, thanks on advance.
|
You cannot do it this way. As soon as your control is there, it becomes part
of the screen canvas. So you can only get the background this way before
showing your form. If you tell us more, maybe we can help you.
Jens
|
|
| Back to top |
|
 |
Jens Gruschel Guest
|
Posted: Fri Sep 03, 2004 9:07 am Post subject: Re: in a transperent component |
|
|
ReleaseDC(ScreenDC) I mean :-)
Jens
|
|
| Back to top |
|
 |
Jens Gruschel Guest
|
Posted: Fri Sep 03, 2004 9:08 am Post subject: Re: in a transperent component |
|
|
I must have been in a hurry. The code was completely wrong, sorry about
that.
ScreenCanvas := TCanvas.Create;
try
ScreenDC := GetDC(0);
try
ScreenCanvas.Handle := ScreenDC;
[...]
finally
ReleaseDC(ScreenDC);
end;
finally
ScreenCanvas.Free;
end;
Jens
|
|
| Back to top |
|
 |
ici Guest
|
Posted: Tue Sep 07, 2004 7:37 am Post subject: Re: in a transperent component |
|
|
thanx for repaly :)
well Jens am doing a transparent text scroll
I got some one else code and change it to fit
so I added shadow to the fonts
and I added transparency depending on some image
// but it is better to make my scroll unvisble then capture the screen to
paint it better is choice
:))
am doing now adding scrolled images inside the scroll
omr
"Jens Gruschel" <nospam (AT) pegtop (DOT) net> wrote
| Quote: | I must have been in a hurry. The code was completely wrong, sorry about
that.
ScreenCanvas := TCanvas.Create;
try
ScreenDC := GetDC(0);
try
ScreenCanvas.Handle := ScreenDC;
[...]
finally
ReleaseDC(ScreenDC);
end;
finally
ScreenCanvas.Free;
end;
Jens
|
|
|
| Back to top |
|
 |
|