CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
山寨机中的战斗机! 程序优化工程师到底对IT界有没有贡献
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  Delphi >  VCL组件开发及应用

像DELPHI启动时的画面是如何作的,愿听其祥

楼主a_ying(阿瑛)2002-01-31 20:51:39 在 Delphi / VCL组件开发及应用 提问

像DELPHI启动时的画面是如何作的,愿听其祥? 问题点数:20、回复次数:9Top

1 楼tolimit(没有把握就永远没有幸运)回复于 2002-01-31 20:53:50 得分 0

我也很关注啊,希望高手回答Top

2 楼wgjsoft(wgjsoft)回复于 2002-01-31 21:01:56 得分 5

  在frmmain   的onshow   中  
    frmsplash:=TfrmSplash.create(Self);  
    show;  
    做些事情(比如打开数据库)  
    frmsplash.update;  
    Frmsplash.free;    
  当然要放imagebox在frmsplash中Top

3 楼zhyichen(Paradise Bird)回复于 2002-01-31 21:11:15 得分 10

先建立一个新的form,将其borderstyle设为bsnone,在form上放一个timage控件,装载图片,将timage控件的align属性设为alclient。  
  在主程序的project中添加如下代码:  
      uses  
          unit2   in   'unit2.pas'  
      {$R   *.res}  
      begin  
          form2:=Tform2.create(form2);   //创建启动画面窗口  
          form2.show;     //显示  
          form2.update;  
          sleep(1000);     //启动画面显示时间  
          form2.hide;     //隐藏  
          form2.free;     //释放  
  运行Top

4 楼a_ying(阿瑛)回复于 2002-01-31 21:15:15 得分 0

不用时间控件也行吗?如果打开的数据库小,启动时的画面可能一闪而过?Top

5 楼cobi(我是小新)回复于 2002-01-31 21:22:32 得分 5

在frmmain   的onshow   中  
  frmsplash:=TfrmSplash.create(Self);  
  show;  
  做些事情(比如打开数据库)  
  frmsplash.update;  
  Frmsplash.free;    
  当然要放imagebox在frmsplash中    
   
  上面可实现DELPHI启动时的画面的大部分,但是要注意的是TfrmSplash的borderstyle应该是bsnone,否则会有标题栏和系统菜单Top

6 楼zhyichen(Paradise Bird)回复于 2002-01-31 21:26:46 得分 0

如果你需要的时间长,可以在主程序的oncreate事件中加一段消耗时间的代码。如:  
  for   i:=1   to   10000   do   ……Top

7 楼a_ying(阿瑛)回复于 2002-01-31 21:28:20 得分 0

谢谢小新,可我的分不多了,你是一个很热心的人!再次感谢!Top

8 楼lance09(Alex.Best)回复于 2002-01-31 21:28:22 得分 0

同意各位大哥的意见   
  QQ:55363978  
  欢迎探讨Top

9 楼brucely()回复于 2002-01-31 22:07:14 得分 0

program   Splash;  
   
  uses  
      Forms,  
      Main   in   'Main.pas'   {MainForm},  
      WnSplashForm   in   'WnSplashForm.pas'   {SplashForm};//启动画面  
   
  {$R   *.res}  
   
  begin  
      Application.Initialize;  
      SplashForm   :=   TSplashForm.Create(Application);  
      SplashForm.Show;  
      SplashForm.Update;  
      while   SplashForm.tmmainTimer.Enabled   do//延迟作用  
      Application.ProcessMessages;  
      Application.CreateForm(TMainForm,   MainForm);  
  //这里加载其他的子窗体  
      SplashForm.Hide;  
      SplashForm.Free;  
      Application.Run;  
  end.  
   
  在Delphi启动快捷方式里加入   ‘-ns’‘-np’会是什么效果呢  
  ‘-ns’是不显示启动画面‘-np’是不建立一个new的form  
   
   
  ‘-ns’是不显示启动画面代码如下  
  program   Splash;  
   
  uses  
      Forms,  
      dialogs,sysutils,  
      Main   in   'Main.pas'   {MainForm},  
      WnSplashForm   in   'WnSplashForm.pas'   {SplashForm};  
   
  {$R   *.res}  
   
  begin  
      Application.Initialize;  
      if   uppercase(paramstr(1))   <>   uppercase('-ns')   then  
      begin  
          SplashForm   :=   TSplashForm.Create(Application);  
          SplashForm.Show;     //显示   封面  
          SplashForm.Update;//强制更新封面  
          while   SplashForm.tmmainTimer.Enabled   do  
          Application.ProcessMessages;  
      end;  
      Application.CreateForm(TMainForm,   MainForm);  
      if   SplashForm   <>   nil   then  
      begin  
          SplashForm.Hide;  
      SplashForm.Free;  
      end;  
      Application.Run;  
  end.  
   
  Top

相关问题

  • 启动画面。
  • delphi开发MIS启动画面顺序问题
  • WIN2000没了启动画面...?
  • 启动画面的制作?
  • WindowsXP 启动画面变了
  • 启动画面问题
  • 如何替换win98的启动画面?
  • 关于windows启动画面的问题!
  • 在PB中如何作启动画面?
  • 怎样实现启动画面??

关键词

  • 控件
  • delphi
  • 代码
  • 数据库
  • application
  • splashform
  • frmsplash
  • 启动
  • 画面
  • wnsplashform

得分解答快速导航

  • 帖主:a_ying
  • wgjsoft
  • zhyichen
  • cobi

相关链接

  • Delphi类图书
  • Delphi类源码下载
  • Delphi控件下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
北京创新乐知广告有限公司 版权所有, 京 ICP 证 070598 号
世纪乐知(北京)网络技术有限公司 提供技术支持
Copyright © 2000-2008, CSDN.NET, All Rights Reserved
GongshangLogo