home | applications | components | forms | tips and tricks | tutorials | forum | guestbook | links

 

Easy examples of a custom delphi component

 

Don't just download

do it yourself,

it is that easy!

 

The definition of the word component sounds like this : An object adhering to a component's architecture. Component technology can be a blend of object-oriented and Internet technologies. In a component based system, the components of a system may have generic interfaces through which they advertise their functionalities, enabling the dynamic loading of the components. See architecture and interoperability are important in this case. Most components can range from very small and easy to large and difficult. The thing I miss the most in my delphi help is the starting knowledge, conceptual support, just the slightest bit of code that will get you on your way. With this in the back of my mind I started creating delphi components that were easy to comprehend and decipher. Many of the so called professional components that can be bought are not at all that easy to understand however, they reference to other files, that on theirself reference to other files and so on. So I made sure that all of my delphi components used none or very few other files, which made them easier to understand and alter ofcourse

No need to first actually finish any delphi tutorial, every project includes working exe and the finished code

When I first started using delphi I was amazed at how easy I could build and or create a program myself. Ofcourse it did not do anything yet apart from that i was able to execute it, I only had to start up delphi 7, which is the only version i used for 6 years, and then the default configuration already created the project for you! Not long after that ofcourse, it started to get a bit dull, and I actually wanted to create some real programs with it.

My first project was a tiny application with which you could check the favorite bookmarks of internet explorer, a program that soon afterwards got very useless since of the many other great programs created by real programmers which did a much better job than me by the way.

My second program was a virtual hard drive manager this one is still not good enough to share me thinks, but you will find it at my delphi forum at first, t shows you in detail how to create virtual hard drives, how to delete them, create shortcuts to your program, and much more, and will be available with all source code.

Meanwhile I used some components, even before i knew what that word meant haha. But a component would be the perfect way for me to share my programming files making them portable and at the same time keep learning from it too. After I had read several so called component writing guides I manager to write my first component completely by myself and it was called helconstraints. All it did was constraining the form at runtime automatically, while still giving you the ability to deform the size, length and width in designtime. Not that much of an advanced component but it was my first one ofcourse and it was unique.

All of my delphi components can be easily installed like the little youtube video shows. It is really easy and simple, and I am already planning to make an installer that installs all of the files at once. Most of what I have tested so far works with Delphi 2010 as well, so versions in between will work as well. You should really read the easy component writing guide, you will be amazed at how easy you can create them yourself from within delphi. What follows are just examples of delphi components I have created myself, dive into the source code and see how simple you can extend the functionality of Delphi.

Automatically constrains forms at runtime, at the size used in design time!

A way to ensure your elements appear just like you want them to! Automatically constrains forms at runtime, at the size used in design time! You could say this one enables constraints at default, but WITH the ability to change it in design time any way you like. Normally, setting constraints to any max width etc, will not allow you to change your mind after that, unless you change the max width etc again. This delphi 7 component lets you change it to any size you want in design time, while keeping the constraints enabled! It is set to Active:= True by default, which, enables the component but can be set to Active:= False which disables it.

Download

 

Standard Tlabel that enables you to send e-mail or surf the net

Component which creates a standard TLabel with added property "URL" for surfing the web, you can use it to send e-mail too, the default properties were changed to bold font, green color and a hand cursor. It again shows you how easy it is to write your own components in delphi 7 or later, so this is a follow up on easy component writing guide which you can find here on my site too as many more things all for free. Usage: very simple, in the property editor you see a new option after you installed this delphi component and dropped it on any form: URL. Now if you want to surf just fill in the URL, if you want to e-mail start with = mailto:someone@mail.com. Try it it really is fun to add events yourself! This component will most likely work in delphi 5 and 6 too and it certainly works in the versions after borland delphi 7. Note that in Embarcadero Delphi 2010 this little component has no use as it already has similar functionality built into it at default, nevertheless for old time's sake.

Download

again just a default delphi component that shows you how easy it is

Component which shows easily how easy it is to write your own components. This is an example that accompanies the Easy Component Writing Guide, and it has the default property of AutoHint set to True, instead of False.

Download

.

Tbutton that has changed properties

Another component which demonstrates and samples the Easy Component Writing Guide, it is a TButton with ShowHint and Cursor changed to respectively True and Handpoint.

Download

 

This renders your Tform into an elliptic shaped form when dropped on it

Download

Small component which creates a form in the shape of the bottom half of an ellipse

Download

Component which creates a form with the shape of a top half of an ellipse

Download

.

This one subtracts the shape of an ellipse, out of the main form which also is elliptical or oval.

Download

A form with this delphi component on it will have a partially transparent Ttitlebar if dropped on a Form

Download

Delphi component derived from a regular Bitbtn, which has two new events, on mouse enter and on mouse leave, which you can easily use for creating mouse over images, active or hot images etc. A demo application is included to show how it works. You can download it here.

Download

.

With this component you can set the transparency of the form to 0 or 100 while keeping the components and buttons or any other material contained on the form visible. A cool way to let your program take up less space on the user's desktop while still enabling them to control all of its functions. You really should download this one, I am sure there will be many more uses for this form enhancement than I can think of right now. You can set the visibility in runtime and also in designtime using whichever event you want, and note that this is not the same as the standard property of a tform since that one hides the form completely, making it impossible to be controlled from its own screen. Note that if possible and available I have clearly stated who the original author was, but some of the websites do not exist anymore, so placing a link to a dead website is useless.

Download

.

Set the amount of transparency of any form in deisigntime or runtime, you can let it be triggered by any event of your choice for instance let it respond to any useraction, or just creating partially transparent forms like the windows xp and up effect. Many more uses than the very few I just named will be useful just download the demo and see how cool this is.

Download

.

 

 



Updated: September 02 2011 09:41:44.
Last Download: Feb 23 2012 00:23:50
Pageviews: 81421