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

做文献ppt模板下载网站有哪些内容百度热点排行榜

做文献ppt模板下载网站有哪些内容,百度热点排行榜,公共资源交易信息平台,做卡贴和果冻贴的网站碰到身份证阅读器项目,直接放进trimmer里面读卡,导致主页面卡顿,就打算放进子线程里试一下,就有了这个尝试。 1.创建线程文件 直接点击左上角file新建other,delphi有自带的模版 这个勾选了,就是他会给你…

碰到身份证阅读器项目,直接放进trimmer里面读卡,导致主页面卡顿,就打算放进子线程里试一下,就有了这个尝试。

1.创建线程文件

直接点击左上角file新建other,delphi有自带的模版
在这里插入图片描述
在这里插入图片描述
这个勾选了,就是他会给你的线程取个名字,在execute里面加一行。

NameThreadForDebugging('线程名字');

在这里插入图片描述

标准模版的代码就是这样,有几个注意事项:
1.文件名得和unit后的保持一致
2.在type下面的TestThread得在前面再加一个T变成TTestThread (这是一个约定,表示T=Type,其他的还有 I=Interface E=Exception)
3.在Execute前的TestThread和2同理

unit TestThread;interfaceusesSystem.Classes;typeTTestThread = class(TThread)private{ Private declarations }protectedprocedure Execute; override;end;implementation{ Important: Methods and properties of objects in visual components can only beused in a method called using Synchronize, for example,Synchronize(UpdateCaption);  and UpdateCaption could look like,procedure TestThread.UpdateCaption;beginForm1.Caption := 'Updated in a thread';end; or Synchronize(procedure beginForm1.Caption := 'Updated in thread via an anonymous method' end));where an anonymous method is passed.Similarly, the developer can call the Queue method with similar parameters as above, instead passing another TThread class as the first parameter, puttingthe calling thread in a queue with the other thread.}{ TestThread }procedure TTestThread.Execute;
begin{ Place thread code here }
end;end.

2.使用多线程

在使用上最简单的就是create,create后直接跟False就是一创建就执行里面的execute方法,这里建议是True,然后灵活的用Resume去创建。

procedure TForm1.Button1Click(Sender: TObject);
varTestThread: TTestThread;
beginTestThread := TTestThread.Create(True);TestThread.Resume;
end;//可简化为:
procedure TForm1.Button1Click(Sender: TObject);
beginwith TTestThread.Create(True) do Resume;
end;

3.CreateThread

之前直接调用了TThread.Create,其实底层还是CreateThread方法,现在先介绍下他的结构体。

function CreateThread(lpThreadAttributes: Pointer;           {安全设置}dwStackSize: DWORD;                    {堆栈大小}lpStartAddress: TFNThreadStartRoutine; {入口函数}lpParameter: Pointer;                  {函数参数}dwCreationFlags: DWORD;                {启动选项}var lpThreadId: DWORD                  {输出线程 ID }
): THandle; stdcall;                     {返回线程句柄}

4.子标题

正文

在这里插入代码片

5.子标题

正文

在这里插入代码片
http://www.hkea.cn/news/103677/

相关文章:

  • 网上商城网站建设意义在线代理浏览网页
  • 网站图片切换代码百度下载并安装最新版
  • 微信公众平台号申请注册入口杭州seo公司
  • 本周实时热点新闻事件seo文章代写一篇多少钱
  • 旺店通app手机企业版下载网站seo如何优化
  • 宝山区建设用地事务所网站网络公司有哪些
  • 用sql做简单的博客网站大连谷歌seo
  • 新手怎么学做网站就业培训机构有哪些
  • magento网站建设搭建网站步骤
  • 营销网站如何实现差异化南京seo公司
  • 服务器托管是啥搜索引擎优化排名培训
  • 山西手机网站建设网址大全123
  • b2c平台有哪些平台网址新区seo整站优化公司
  • WordPress突然全站404网站如何添加友情链接
  • 复制别人网站做第一站seo短视频网页入口引流下载
  • 基层建设论文收录在哪个网站百度统计api
  • 购买主机可以做网站吗楚雄今日头条新闻
  • 深圳专业网站建设公司哪家好宁波网络营销公司
  • ps做电商网站流程图百度图片识别搜索引擎
  • 做电影网站程序好用武汉网站建设推广公司
  • 如何做b2c网站下列关于友情链接说法正确的是
  • 网站开发中网页上传seo在线网站推广
  • 网站建设报价流程免费培训网站
  • 聊城网站建设服务好最新网域查询入口
  • 一般网站建设流程有哪些步骤官方百度app下载安装
  • 档案网站建设的步骤八大营销方式有哪几种
  • 手机网站免费制作平台semseo
  • 周口市做网站小红书seo排名
  • 网站开始怎么做的ps培训
  • 去哪个网站找题目给孩子做保定百度首页优化