当前位置: 首页 > news >正文

dede模板网站如何搭建企业摄影网站模板

dede模板网站如何搭建,企业摄影网站模板,福建省建设厅网站 保证金,只做特卖的网站lazarus开发界面程序用线程显示进度条#xff0c;效果更好#xff0c;以前没有另外显示线程#xff0c;遇到上传文件或其他较长时间操作#xff0c;界面就卡在那里#xff0c;体验不好#xff0c;现在另外启动线程操作#xff0c;主界面就不至于卡在那里。 首先在主界面…lazarus开发界面程序用线程显示进度条效果更好以前没有另外显示线程遇到上传文件或其他较长时间操作界面就卡在那里体验不好现在另外启动线程操作主界面就不至于卡在那里。 首先在主界面上定义线程  type{ TMyBackupThread }TMyBackupThread class(TThread)privatefStatusText: string;procedure ShowStatus;protectedprocedure Execute; override;publicconstructor Create(CreateSuspended: boolean);end;{ TForm1 }TForm1 class(TForm) 然后在实现线程内容 {TBackupThread}procedure TMyBackupThread.ShowStatus; // this method is only called by Synchronize(ShowStatus) and therefore // executed by the main thread // The main thread can access GUI elements, for example Form1.Caption. beginwriteln( fStatusText);form1.Memo1.Append(fStatusText); end;procedure TMyBackupThread.Execute; varRespo: TStringStream;S: string; beginfStatusText : Backup Starting ...;Synchronize(Showstatus); //If I remark this, it causes access violation errorwith TFPHttpClient.Create(nil) dotryRespo : TStringStream.Create();WriteLn(form1.Memo1.Lines.Strings[0]);WriteLn(Formatdatetime(yyyy-mm-dd hh:nn:ss.zzz,now)); FileFormPost(requrl downFile, file, form1.Memo1.Lines.Strings[0], Respo);S : Respo.DataString;WriteLn(s);WriteLn(Formatdatetime(yyyy-mm-dd hh:nn:ss.zzz,now));form1.Memo1.Append(S);Respo.Destroy; finallyFree;end;fStatusText : Backup Completed;Synchronize(Showstatus);MyShowThread.active:false;Form3.hide; end;constructor TMyBackupThread.Create(CreateSuspended: boolean); beginFreeOnTerminate : True;inherited Create(CreateSuspended); end; 然后就可以在主界面里需要的地方调用了 procedure TForm1.btnUpClick(Sender: TObject); varMyBackupThread : TMyBackupThread; beginMyBackupThread : TMyBackupThread.Create(True); // With the True parameter it doesnt start automaticallyif Assigned(MyBackupThread.FatalException) thenraise MyBackupThread.FatalException;// Here the code initialises anything required before the threads starts executingif Form3nil thenbeginForm3:TForm3.Create(application);WriteLn(TForm3.Create);end;Form3.Show;//Test_DummyMyBackupThread.Start;Form3.FormProgress; end; from3是做了一个动画进度条也可不要至少主界面不会卡在那里不动了 lazarus要展示gif动画图片需要安装gifanim组件只需要把文件名赋值即可
http://www.hkea.cn/news/14562403/

相关文章:

  • 创建一个网站要多少钱重庆市建设工程节能中心网站
  • 网站在空间费用徐州建设工程交易网站
  • 菜鸟建站网wordpress如何超过2M
  • tp做网站签到功能网站开发者模式怎么保存
  • 购物网站用html怎么做wordpress timer
  • 手工做皮具国外的网站wordpress 修改文章作者
  • 网站的营销推广方案及预算北京网站改版费用
  • 怎样在百度上免费建网站石家庄营销网站建设多少钱
  • 龙南网站建设为什么sem的工资都不高
  • 建设部网站四库一平台高考志愿网站开发
  • 做asp.net网站参考文献标志设计说明案例
  • 网站建设vr网站开发需要编程吗
  • 网站自适应布局 html5永州市建设网站
  • 龙象建设集团有限公司网站学做网站论坛会员账号
  • 重庆电商网站建设费用宣城网站优化
  • 网站服务器配置单用什么编辑wordpress
  • 视频网站建设公司网站运营设计
  • 阿里云怎么做淘客网站闲鱼怎么推广自己的产品
  • 溧阳网站建设公司婚庆5个坑
  • 台州做网站软件南阳专业做网站公司哪家好
  • 自己做章网站沧州专业网站建设公司
  • 南京 网站制作公司小型培训机构管理系统
  • 网站如何生成静态郑州市哪里有网站建设
  • 基础微网站开发口碑好百度微信网站
  • 广州站服装外包加工网
  • 公司网站开发联系方式县区网站服务器机房建设
  • 广州响应网站建设网站换名称域名
  • 优美网站源码湘潭网站
  • 所有做运动的网站做公司网站的公司有哪些
  • 安阳网站公司临沂住房和城乡建设局网站