I always wanted to calm down and sort out my thoughts on developing and managing information systems. Today I finally made up my mind to put my mind into action. A good start is half the success!
Delphi is an excellent development tool. I like it very much, but it has taken a lot of detours in the process of development and learning. Now, I want to help my friends who want to learn.
To put it bluntly, we usually see it when using software. Program You will see a startup screen when you start running. For example, Delphi will have a screen when it starts, so that the program will not feel too long during initialization loading, of course, it can also play the role of advertising, so that more people will remember this software. Today we will start from the first step of the program running, making a pop-up screen form.
Create an application, save the project as demo. DPR, the unit file untmain. Pas, and name the form as frmmain ).
At this time, when you press F9 to run the program, we will see the created form frmmain. Because we need to create a form as a pop-up form, click the menu, file, new, form to create a new form, name it frmsplash and save the untsplash. PAS. Click project and options in the menu. In the open project options window, move the frmsplash under Auto-create forms to available forms. Open demo. DPR and add the following Code :
Frmsplash: = tfrmsplash. Create (application );
Frmsplash. show;
Frmsplash. update;
Sleep (5000 );
Frmsplash. Free;
Application. Run;
Sleep () needs to reference the sysutils unit file in uses. The sleep () function is used to make the screen stay time function.
Press F9 and run the program again. The frmsplash form is displayed. The next step is how to design the pop-up screen. Put Panel1 on the frmsplash form to give the screen a stereoscopic effect. Set the bevelwidth attribute of Panel1 to 3, put the image1 control on Panel1, and set the picture attribute to the designed image, then run the program to view the beautiful startup screen!
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service