I figured out what's wrong: I need to "wrap" the form in a component derived from TComponent. Then, I added a Execute function to the form to set all the properties I needed.
Main Topics
Browse All TopicsHello,
I'm trying to make a component that is basically just a form with a label and a timer. I'm trying to make it into a component that I can drop onto other forms. My problem is this:
When I drop the component onto a form, it shows the whole form that the component's based on. I need it to just show a standard-size bmp (like most components do) that I can click on and set properties, etc.
Any ideas on what I'm doing wrong? (This is my first foray into writing components).
Thanks!
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: geobulPosted on 2006-08-16 at 11:50:58ID: 17328655
Hi,
Use another ancestor to derive your component from, depending on:
- if your component should receive focus - TCustomControl, TWinControl (TCustomPanel migth be also appropriate in your case - create the label and the timer in the constructor). You may also prepare corresponding published properties and events for them on a component level - like Caption, Interval and OnTimer.
- you may use TGraphicControl for components that don't need to have a handle and don't need to receive input focus.
Regards, Geo