?
Solved

How to do TStaticText transparent?

Posted on 1999-01-25
5
Medium Priority
?
765 Views
Last Modified: 2012-06-27
Hello All!

Help me please. I have problem. I needed to create moving on the timer, textual component. I can not use TLabel, because it blinks during drawing. TStaticText does not blink, but it not transparent. Adjust StaticText.ComponentStyle in not csOpaque does not help.
Prompt me pls, how do I decide this problem?

Thank, Nick G.
0
Comment
Question by:inkom
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 13

Accepted Solution

by:
Epsylon earned 150 total points
ID: 1363207
Double buffer it! Create 2 TLabels on the the same positon. When an update has to be done update the invisible one with new text, then make it visible and make the old one invisible. So at every update you switch between the 2 TLabels.

Give it your best shot and let me know if it works!
0
 
LVL 12

Expert Comment

by:rwilson032697
ID: 1363208
Or try this (cleaner than having two of them...

SetWindowLong(StaticText1.Handle, GWL_EXSTYLE,
                        GetWindowLong(StaticText1.Handle, GWL_EXSTYLE)                                                OR WS_EX_TRANSPARENT);

Cheers,

Raymond.

0
 
LVL 13

Expert Comment

by:Epsylon
ID: 1363209
Maybe you should use this too:

SendMessage(form1.handle, WM_SETREDRAW, 0, 0); to lock redraw
SendMessage(form1.handle, WM_SETREDRAW, 1, 0); to unlock redraw

Or try to write directly with form1.canvas.textout and change form1.canvas.textflags to your needs.
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1363210
I think there is a transparetn property for the TStaticText,..
0
 

Author Comment

by:inkom
ID: 1363211
Adjusted points to 150
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month10 days, 20 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question