BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Re: in a transperent component

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics
View previous topic :: View next topic  
Author Message
Mark Williams
Guest





PostPosted: Thu Sep 02, 2004 7:48 am    Post subject: Re: in a transperent component Reply with quote



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





PostPosted: Thu Sep 02, 2004 9:38 pm    Post subject: Re: in a transperent component Reply with quote



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





PostPosted: Fri Sep 03, 2004 9:07 am    Post subject: Re: in a transperent component Reply with quote



Quote:
ReleaseDC(0);

ReleaseDC(ScreenDC) I mean :-)

Jens



Back to top
Jens Gruschel
Guest





PostPosted: Fri Sep 03, 2004 9:08 am    Post subject: Re: in a transperent component Reply with 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
ici
Guest





PostPosted: Tue Sep 07, 2004 7:37 am    Post subject: Re: in a transperent component Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.