Delphi implementation Flash Form information tips

Source: Internet
Author: User

You've all used Photoshop or Adobe Reader, and the form that is displayed first when it starts is called the Flash form. Although software such as Word has a flash form, you will notice that the former has a dynamic information hint as long as you have a little attention. When Photoshop or Adobe Reader is started, the display information prompts are constantly transformed on the flash form. such as "Loading fonts", "Loading brushes", "initializing", "Sorting fonts" ..., a lot of books talk about how to make flash forms, But there's no telling how to add an informational hint to the flash form, so how do you make it? The method is as follows:

1. Create a new form in your program, set the form's Name property to the Frm_splash,borderstyle property set to the Bsnone,bordericons property set to [], so that the flash form does not display the title bar and bounds.

2. On the Frm_splash, add an image control, set its Align property to alclient, specify the Picture property, and load a graphic.

3. You can add other descriptive information on the form as needed, such as: designers, developers, etc. With the label control, be sure to set the transparent property to true, which is transparent, otherwise affecting the background display.

4. Using the same label control, set the Name property to Lbl_text, and also set the Transparent property to true.

Add the following code to the PROJECT1.DPR:

begin
  Application.Initialize;
  frm_Splash:=Tfrm_Splash.Create(Application); //创建快闪窗体
  frm_Splash.Show; //显示快闪窗体
  frm_Splash.Update; //强制更新快闪窗体
  Application.CreateForm(TfrmMain, frmMain);
  frm_Splash.lbl_Text.Caption:='创建主窗体'; //快闪窗体提示信息
  frm_Splash.Update; //强制更新快闪窗体
  ……
  Application.CreateForm(Tfrm_MemberInfo, frm_MemberInfo);
  frm_Splash.lbl_Text.Caption:='加载会员信息窗体'; //快闪窗体提示信息
  frm_Splash.Update; //强制更新快闪窗体
  Application.CreateForm(Tfrm_MemberTimeOut, frm_MemberTimeOut);
  frm_Splash.lbl_Text.Caption:=加载过期会员窗体'; //快闪窗体提示信息
  frm_Splash.Update; //强制更新快闪窗体
  frm_Splash.Hide; //隐藏快闪窗体
  frm_Splash.Free; //释放快闪窗体所占资源
  Application.Run;
end.

The results of the operation are shown in the following illustration.

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.