Solved

Flash file does not "send to back" in Delphi

Posted on 2011-09-02
5
493 Views
Last Modified: 2012-05-12
Hi,

I have various Flash files in my Delphi app but I am unable to place any labels "above" or "on top of" the flash file.

Whenever I insert a label it falls behind the flash file and cannot be seen.

Any help will be much appreciated.

Thank you.
0
Comment
Question by:kylestimpson013
  • 2
  • 2
5 Comments
 
LVL 37

Expert Comment

by:Geert Gruwez
ID: 36472790
TLabel is not a "windowed" control (descendant of TWinControl)
It can only be placed at the lowest level on the container (on the form, or on a panel, or ...)

It also has no Z-order, so can not be stacked on top of other controls


Use a TPanel to place a text on top of the flash
0
 
LVL 25

Accepted Solution

by:
epasquier earned 500 total points
ID: 36472808
or use TStaticText, which is an exact TLabel alternative BUT windowed
You can find it on your 'Additional' components palette tab

more info :
http://delphi.about.com/od/tlabeltstatictext/TLabel_TStaticText_Delphi_Label_Control_Usage_Tips_and_Tricks.htm
0
 

Author Comment

by:kylestimpson013
ID: 36472835
Thank you, but how do i make the background of TStaticText transparent? i need to put text over the flash file to show labels for certain items but the TStaticText transparency is set to true but not working?

I appreciate all the help.
0
 
LVL 25

Assisted Solution

by:epasquier
epasquier earned 500 total points
ID: 36473207
yeah, I know, even with Delphi XE TStaticText transparency does not seem to work that great : it makes the background of its parent visible, not the object that is between them.

that is because what you want is a very complex issue to do perfectly.
Look there, the comments are interesting (last ones mostly)
http://stackoverflow.com/questions/4478649/draw-over-controls-in-dephi-form

in short, your best option would be to create a completely transparent windowed control that you put over all others. I might have something in store like that. I used it to display 'tactical moves' above a DirectX viewport in a strategic game I made.
The thing is, that you won't be able to interact with the controls beneath using the mouse, as your transparent windowed control will get all mouse events. So if you need it you'll have to reroute all messages in that transparent control mouse events to their rightful owners
0
 

Author Comment

by:kylestimpson013
ID: 37623207
After some further testing and research, i figured out a way to set the Flash file as the background in an application.

This is accomplished by setting the flash file for EVERYTHING that you wish to be viewed on top of it.

This takes time but its worth it in the end if you really require a flash file background.

I hope this helps someone else in the future too.

Thank you for all the help on this.
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

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…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…

832 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