You will need
- To do this you need the knowledge of the basics of programming.
Decide which will be devoted to the program that you're going to write, what problems it will solve. It depends entirely on your imagination and taste preferences. And perhaps you are faced with the fact that to solve your problem you can not find the Internet easy to use program, and so I decided to write my own. The main thing at this stage to accurately represent what audience it will be calculated.
Decide what operating system it will work. Among our countrymen, the most popular is the Windows operating system. So if you will write your program for our audience, then it is best to stop the choice on it.
Select tools programming. To create applications under Windows the most widely used programming languages: MS Visual Basic, Borland Delphi, Borland C++ Builder. These languages allow you to compile the program on the principle of children's designer – of the finished pieces you assemble a single unit.
Find your flavor, what will be different is your program from other programs of this direction.
Develop a program interface. If this is your first application will focus on the standard Windows interface. Use the form designer and object inspector. They will help you not only understand what the interface of your program at the stage of programming and set properties of objects, which greatly simplify the whole process.
Arrange your ideas in the algorithm. If your program is sufficiently serious and has its own file type – register it for the program. Registration can be performed by a special file-the installer must have the ability to call the full file name.
Write to the help file. You can use the special compiler. The compiler comes with any visual programming environment (Delphi, Visual Basic, Visual C++) hc.exe.
Create the software distribution. The distribution is a zipped copy of your program with additional features. During the unzipping, the user specifies the folder where the program will be installed may installation type etc. For distribution traditionally attached file readme.txt where there is information about the name and version of the program, its date of issue, brief description. The program is written
After error correction and in that case, if your program supports the interface in English you can put it to test on the website beta testers www.betanews.com.
The first version of the program usually called “alpha”. Most often it contains a lot of mistakes – it makes sense to test it with your friends
Advice 2: As in Delphi to write a program
The programming language Delphi has many millions of fans. Among its advantages include simplicity and clarity, to learn the basics of programming it can even novice. To write the program on Delphi, you must be able to work with the programming environment Borland Delphi and know the basic rules of creating apps.
Search the Internet and download the programming environment Borland Delphi. Install it on your computer, run. In the opened window you will see the blank of the interface – a window with a name Fоrm1. Change the name you need by clicking the title bar and typing the desired text in the left column, in the Caption field.
At the top of the program window is a palette of components. It has all the necessary elements for creating almost any program. You can just drag them with the mouse onto the form. For example, drag a button and place it in the right place. Change its name just as you have changed the name of the form.
If you create a text editor, analogous to Notepad, you will need a field for text input. Locate the components palette item Memo or RichEdit and drag it onto the form. Post in the right place, drag it to the desired size. Add on the shape of the desired button. The menu you create using the MainMenu component.
To open files and save them you'll need a OpenDialog and SaveDialog components. The shortcut menu you can invoke by using the PopupMenu. The component Component will allow you to choose a font. Badges of five of the last components place in any part of the form, in the finished program, they will not be visible.
You have a blank future text editor, but its components need to be adjusted. In particular, it is necessary to enter menu items and to register to their event handlers. You need to enter and lines of code that handle the buttons. Click any button on the form, double-arm, will open the code window.
Now you start to really learn programming. You need to write the necessary lines of code. Look at this example: http://drug.xan.su/?p=61. Using it, you can create a simple text editor.
The finished program must be compiled to obtain an executable file. How Delphi compiles, you can see here: http://www.kurslab.ru/lesson1.html. In the compilation there are subtleties, in particular, that the program worked not only on your computer, but on the other, you must perform some configuration.
Open the menu Project – Options. Do not check the Use dynamic RTL in the Linker properties and the Build with runtime packages in the Packages properties.
While self-writing a program is very important to make the correct algorithm of its operation. Do not spare time for this, because the more you prescribe the algorithm, the easier it will be to translate it into code will be and the better your program. In your code, be sure to make comments. Without them, you have a couple of months will hardly be able to understand your own code. Comments are removed during compilation, so it does not affect the size of the program.
Ready to thoroughly test the program for possible errors. Itsite it in all possible ways: perform unintended operations, resize window, etc. Properly configured it does not allow you to resize the window, if provided, will not generate an error in response to inappropriate action. In the latter case, trigger error handlers.
Always consider the code in an emergency situation, to know how to do it. If the program in response to some action fails with the message invalid error, this is a clear sign of the error of the programmer.