Home Delphi Php 3ds Max About Stats Contact
 Last Download: March 10 2010 14:33:23.

Delphi Components, Tutorials and Examples......................................................1 2 3 4 5 6 7 8 9 10

One-Click File Hosting

I have some experience in Delphi programming. It is one of my main interests. I usually create reusable components, programs, tutorials and samples, so there should be something useful in here for you I think. Most is built for Delphi 7 but may very well work for Delphi 8 and up too. Everything is and always will be for free, I am always willing to help out should you need any help.

There are many more things possible with Delphi than one can make up from the poor help files that accompany it. There is virtually no conceptual help available from the standard help file when it comes to the matters discussed here, and that is just what can be so helpful for programming! Most of my delphi files are general vcl enhancements. I always try to not use any 3rd party component, so I can publish my stuff where and how I like it. Do not rely on 3rd party components if you do not have to, apart from the fact that doing it yourself gives much more satisfaction!

Currently I am creating and uploading online versions of most of the tutorials here, so you can read them at my site too, but they will never replace the downloads, since the downloads include demo files, and full delphi project files and more

Easy Component Writing Guide
Easy Progressbar Writing Guide
Easy Splashscreen Writing Guide
Easy Email

#1 How to write your own components in less than 3 minutes

Name: Easy Component Writing Guide Platform: Borland Delphi 7
Added: 26-8-2006 16:53:08 Author: Nullified
Type: Tutorial Level: Beginner
Downloads: 2241 Size: 131 kb

Create your own components

Writing your own components Tired of repeatedly changing the same values of the same properties of the same components? Here is a way to change all of the components you work with, so they provide you exactly with what you want, saving you time!

When you create a component, you add to the component library by deriving a new class from one of the existing class types in the hierarchy. Every component is a descendant, and the class you are deriving from is the ancestor. Note that there are two libraries which you can use, one for Windows [VCL] and one for Cross Platform [CLX], you can tell the difference by the following example. If you are gonna derive from the class TButton, then for Windows, the ancestor is StdCtrls, while for Crossplatform this is QStdCtrls, notice the Q.

This tutorial was kept as short as possible, since Delphi can be rather overwhelming, and since this is aimed at the beginner and the standard Delphi help does not really provide any conceptual support, this tutorial will give you a quick and easy start into writing [modifying] delphi components.

It was created after I found out that it was rather easy to write [modify] your own components. It is a very basic tutorial, which I hope will help many people, into making the Delphi programming somewhat more efficient. It is however not the only way, but it is the way I use to limit my efforts for repeatetive tasks, if you are into programming, then you know you can always use your time for different tasks than those you know how to and have to perform again and again.

Download the whole project, it provides detailed help, with a very user friendly manual, consisting of 8 steps, in less than 3 minutes!

To give you an idea how easy it can be I have created two examples explaining the basics, they are included in the project, a mirror is provided in case one of the servers is out of order.

Click here for a brief version of this tutorial to see it online.

Link to this posted article

#2 How to write your own progress bar in less than a minute

Name: Easy Progressbar Writing Guide Platform: Borland Delphi 7
Added: 26-8-2006 16:53:08 Author: Nullified
Type: Tutorial Level: Beginner
Downloads: 1667 Size: 433 kb

Create your own delphi progress bar

This very short tutorial shows you how to add a progress bar to any web browser programs you make in less than a minute. It is very basic, and kept as short as possible, you can figure out most of the code just by looking at it. Aimed at beginners, this gives you an easy and quick way to have a working progress bar which informs the user of the progress the web browser is making! You can then focus on the other tasks like for instance the graphical representation to make it the way you want it. Included is the completed example. I hope this little bit of conceptual knowledge will help you. Because the Delphi Help Api does not provide these things. I like to hear your opinion, comments, problems you may have while using this helpfile, this goes for all of my published stuff, please email me.

Screenshot

easy progress bar writing guide example

Click here for a reduced version of the tutorial to see it online.

Here is the article online

#3 How to create your own splash screen in less than 3 minutes

Name: Easy SplashScreen Writing Guide Platform: Borland Delphi 7
Added: 26-8-2006 16:53:08 Author: Nullified
Type: Tutorial Level: Beginner
Downloads: 1537 Size: 248 kb

Build your own splash screen in a few minutes

This is a basic and very short tutorial for creating your own splash screen. The best way to learn Delphi is to have an example, and study the code. Do not rely on 3rd party components when you do not have to! Create your own splash screen in less than 3 minutes. Following this tutorial, you will learn to create a splash screen, that can be disabled by unchecking a checkbox on the mainform, it makes use of an Inifile to store the value and enable and disable the appearance of the Splashscreen. About the included example, to test the splash screen a simple restartbutton was added to it, in order to make that work Shellapi was added to the uses clausule of Form1.

A quick and easy way to spice up your program!

Of course a splash screen that has the default color and is empty, is not really cool so add an image to it, or anything you want to appear there, see the included example for a simple basic idea, but technically speaking you are finished and have just created your own Splash Screen, and you no longer have to rely on 3rd party components! Here is an some example I used:

custom splashscreen

Naming conventions

Note that variables can be called anything you wish [except for keywords etc], it is good practice to name them to something useful, so the name of it already tells you at least a bit what is it about. Then if you are finished with your project you can always do a search and place to make the variables shorter [saving a bit of space] and making them more difficult to guess, should you wanna'. Also, it is a good thing to name the components, and the forms, and units to something meaningful. The advantage of properly named forms, are so you can tell them apart from the standard forms with names given to them by delphi itself, and they wont be written over accidentally easy, plus it is easier to work with them in a single project that has more forms. However, for ease of use of this tutorial, I used the standard names. Also, for your own sake [readability] it is best to name your forms like something more clear. In this tutorial however, I used the standard names Delphi gives them, to not make it more complex and lengthy. My own splash screen would be named something like: SplashForm, while Form1 would be named: MainForm. Same goes for components, Checkbox1 does not say anything what it is used for or what it is about, I myself would name it something like: chkSplash. Note that variables can be called anything you wish [except for keywords etc], it is good practise to name them to sumthing useful, so the name of it already tells you at least a bit what is it about. Then if you are finished with your project you can always do a search and place to make the variables shorter [saving a bit of space] and making them more difficult to guess, should you wanna'. Also, it is a good thing to name the components, and the forms, and units to something meaningfull. The advantage of properly named forms, are so you can tell them apart from the standard forms with names given to them by delphi itself, and they wont be written over accidentally easy, plus it is easier to work with them in a single project that has more forms. However, for ease of use of this tutorial, I used the standard names.

The position can and maybe should be altered too, but this is purely personal, so I did not discuss that. In the included example, position of Form1 was set to poDesktopCenter, and position of Form2 was set to poMainformCenter, so the splashscreen appears centered in where the Form1 will appear. Also, for your own sake [readability] it is best to name your forms like something more clear. In this tutorial however, I used the standard names Delphi gives them, to not make it more complex and lengthy. My own splashscreen would be named sumthing like: SplashForm, while Form1 would be named: MainForm. Same goes for components, Checkbox1 does not say anything what it is used for or what it is about, I myself would name it sumthing like: chkSplash. Click here for the tutorial to see it online, but that is again the limited version.

Demo Delphi Application included in the download link here.

Link to the posted article on delphi3000.com

#4 How to create a form in a form

Name: Form-in-a-form Platform: Borland Delphi 7
Added: 26-8-2006 16:53:08 Author: Nullified
Type: Tutorial Level: Beginner
Downloads: 1831 Size: 665 kb

How to create a form in a form?

Three easy examples of how to create a Form in a form, so that the second [and third, fourth etc] is inside the first form. It has an example of a form without a titlebar [bsNone], one with a form that is resizeable and moveable, plus one that is not resizeable and moveable. It also includes a template for a starting point should you wanna create a form-in-a-form.


Borderstyles

Note that borderstyle bsDialog presents you with only a close icon normally but if you use that in the Form-in-a-form, it has no effect in the Not_Moveable_Resizeable version, it will show up but will not be clickable. Same counts for bsResizeable, the icons will show up but will not be clickable You will have to experiment what normal settings do with a form-in-a-form


Moveable and Resizeable Form-in-a-form

While the code in Unit2.pas makes sure you can move and resize the form you should also note that the BorderStyle of the form2 is set to bsSingle. Since setting this to bsSizeable does not result in the form2 being moveable and or resizeable, it only gives you the resize cursor when you hover over each of the 4 sides of the form itself, which serves no purpose to me. Also, the Captionbuttons [border icons] were removed, and the position was set to poDefaultPosOnly, plus the scrollbars were removed, these were the settings that differ from the defaults, change it the way you wish.

form in a form example



Not Moveable and Resizeable Form-in-a-form

While the code in Unit2.pas makes sure you cannot move and resize the form you should also note that the BorderStyle of the form2 is set to bsSingle. Since setting this to bsSizeable does not result in the form2 being moveable and or resizeable, it only gives you the resize cursor when you hover over each of the 4 sides of the form itself, which serves no purpose to me. Also, the Captionbuttons [border icons] were removed, and the position was set to poDefaultPosOnly, plus the scrollbars were removed, these were the settings that differ from the defaults, change it the way you wish.

form in a form example



No Titlebar Form-in-a-form

The borderstyle of Form2 was set to bsNone, and the position was set to poDefaultPosOnly. A bevel was added to the form2 but this was to make it appear and also it looks nice to me.

Example of a form in a form



Template_Mainform

Just a quick and easy starting point should you wanna create a Form-in-a-form

Link to the article online

#5 A way to ensure your elements appear just like you want them to

Name: THellConstraints Platform: Borland Delphi 7
Added: 26-8-2006 16:53:08 Author: Nullified
Type: Component Level: Beginner
Downloads: 984 Size: 2.4 kb

Constrain your form's size and position at runtime automatically

A way to ensure your elements appear just like you want them to! Automatically constrains forms at runtime, at the size used in designtime! You could say this one enables constraints at default, but WITH the ability to change it in designtime any way you like. Normally, setting constraints to any maxwidth etc, will not allow you to change your mind after that, unless you change the maxwidth etc again. This one lets you change it to any size you want in designtime, 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.

Link to the article online

#6 Save and Restore Size and Position of your form

Name: Save and Restore Form Size and Position Platform: Borland Delphi 7
Added: 22-10-2007 19:00:08 Author: Nullified
Type: Example Level: Beginner
Downloads: 830 Size: 634 kb

Save and Restore Size and Position of your form using Registry or Inifile.

Fixed a bug!

For ease of testing I have enclosed a way to easily restart the application by clicking on the form anywhere, to make this happen I had to add Shellapi to the uses clausule. And also, to make the Registry version of this example, I added Registry to the uses clausule and for the Inifile version, I added, you guessed it, Inifiles. Again see most of the part of this tutorial at Delphi3000.com, though I myself would download it here, since the files here contain formatting and are well easier and more complete Happy programming!

And here is the other version posted online

#7 Form Roll Up and Down

Name: Form Roll Up and Down Platform: Borland Delphi 7
Added: 04-01-2008 19:20:08 Author: Nullified
Type: Example Level: Beginner
Downloads: 789 Size: 794 kb

Form that folds down and up

This form, when clicked on the titlebar rolls itself up and when clicked again rolls itself down. Just example code on how to create this yourself. It shows how easy it can be to spice up your program yourself, adding effects, another way to describe this effect is to fold and unfold, by clicking on the title bar. Again, do not rely on third party components if you don't have to! Should this link be dead, which I doubt go here please to see a reduced version of it

#8 Scrolling Title and Taskbar

Name: Scrolling Title and Taskbar Platform: Borland Delphi 7
Added: 04-01-2008 19:20:08 Author: Nullified
Type: Example Level: Beginner
Downloads: 781 Size: 679 kb

Scrolling Title and Taskbar

This form shows you how easy it can be to spice up your application. The example code easily shows you how to have the title and/or taskbar button of your project, with moving lines or words! Again, why not do it yourself, if it is that easy?

#9 Moving Window Without Titlebar

Name: Moving Window Without Titlebar Platform: Borland Delphi 7
Added: 04-01-2008 19:20:08 Author: Nullified
Type: Example Level: Beginner
Downloads: 817 Size: 493 kb

Moving Window Without Titlebar

This application shows you how to build a form without a titlebar, while still being able to move the window with your mouse. Click the following link to Delphi3000.com to read it online, though that is a limited version, you can download all the files in one at the downloads link

#10 Easy Email Button and Label

Name: Easy Email Platform: Borland Delphi 7
Added: 11-12-2008 16:20:34 Author: Nullified
Type: Example Level: Beginner
Downloads: 460 Size: 217 kb

Easy Email Button and Label

This application shows you how to build an email label and button in delphi, in 3 or 4 lines, so you do not have to rely on third party components anymore, saving you copyright infringements and thank you's. However easy and short this example may be, finding it in the borland delphi help files, seems almost impossible!

Click here for the tutorial to see it online but note that the full download includes a more userfriendly help file etc.
Total Hits Over 200.000 since October 2006!!! This site © 2010 created, built, maintained and powered by Nullified ™
Home Delphi Php 3ds Max About Stats Contact
Visitors: 27231 Updated: 12-22-2009 14:58:20 Created: 09-10-2006 01:23:47 Valid HTML 4.01 Transitional Valid WC3 CSS 2.1