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

wordpress 发送请求什么是关键词排名优化

wordpress 发送请求,什么是关键词排名优化,如何做自己网站,微信小程序怎么做团购本文根据EmailX45的视频文件,进行了优化改进,原文参见:Delphi: Drag and Drop Files from Explorer into TPanel / TMemo - YouTube 在Windows中,如果将选择的文件拖动到Delphi程序的控件上,有很多实现方法&#xff0c…

本文根据EmailX45的视频文件,进行了优化改进,原文参见:Delphi: Drag and Drop Files from Explorer into TPanel / TMemo - YouTube

在Windows中,如果将选择的文件拖动到Delphi程序的控件上,有很多实现方法,特别是三方的成熟控件,但是这个方法最简单,无需使用第三方资源,简单使用windows API即可。

直接上代码入如下:

主窗体:

unit uDragFile_Form;interfaceusesWinapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls,uMyPanelWithDropFileEvents,uMyMemoWithDropFileEvents;typeTForm4 = class(TForm)Panel1: TPanel;Memo1: TMemo;Label1: TLabel;GestureManager1: TGestureManager;procedure FormCreate(Sender: TObject);privateprocedure OnDraopFileToPanel(Sender : TObject; FileName : string);     //重点,必须是这个类型 TOnDropFileprocedure OnDraopFileToMemo(Sender : TObject; FileName : string);public{ Public declarations }end;varForm4: TForm4;implementationusesWinapi.ShellAPI;{$R *.dfm}{ TForm4 }procedure TForm4.FormCreate(Sender: TObject);
beginPanel1.EnableFileDrop(OnDraopFileToPanel);Memo1.EnableFileDrop(OnDraopFileToMemo);end;procedure TForm4.OnDraopFileToMemo(Sender: TObject; FileName: string);
beginMemo1.Lines.Add(FileName);
end;procedure TForm4.OnDraopFileToPanel(Sender: TObject; FileName: string);
beginLabel1.Caption := Label1.Caption + sLineBreak + Filename;end;end.

以下两段代码分别是Panel和Memo的实现代码,需要在主窗体中引用。

{sensor 参考:https://www.youtube.com/watch?v=XaO0YWRcxMw
使用说明:
1. 主程序中引用这个单元
2. 主程序中必须定义 TOnDropFile 事件   ,例如:   procedure OnDraopFileToPanel(Sender : TObject; FileName : string);
3. 主程序CreateForm中:Panel1.EnableFileDrop(OnDraopFileToPanel);4. 如果不需要拖动文件: DisableFileDrop2025-06-02
}
unit uMyPanelWithDropFileEvents;interface
usesWinapi.Messages,VCL.ExtCtrls;typeTOnDropFile = procedure(Sender : TObject; FileName : string) of Object;TPanel = class(VCL.ExtCtrls.TPanel)privateFOnDropFile : TOnDropFile;procedure DropFileEvent(var MSG : TWMDropFiles); message WM_DROPFILES;publicprocedure EnableFileDrop(FOnDrop: TOnDropFile);procedure DisableFileDrop;property OnDropFile : TOnDropFile read FOnDropFile write FOnDropFile;end;implementationusesWinapi.Windows,Winapi.ShellAPI;constMY_FILE_COUNTING = $FFFFFFFF;{ TPanel }procedure TPanel.DisableFileDrop;
beginDragAcceptFiles(Self.Handle,False);FOnDropFile := nil;
end;procedure TPanel.DropFileEvent(var MSG: TWMDropFiles);
varLFileCounting : Cardinal;LFileName     : array[0..MAX_Path] of char;
beginLFileCounting := DragQueryFile(MSG.Drop,MY_FILE_COUNTING,LFileName, MAX_Path);if Assigned(FOnDropFile) thenbeginfor var i := 0 to LFileCounting - 1 dobeginDragQueryFile(MSG.Drop,i,LFileName, MAX_Path);FOnDropFile(Self, String(LFileName));end;end;DragFinish(MSG.Drop);
end;procedure TPanel.EnableFileDrop(FOnDrop: TOnDropFile);
beginDragAcceptFiles(Self.Handle,True);FOnDropFile := FOnDrop;
end;end.

Memo代码

unit uMyMemoWithDropFileEvents;interface
usesWinapi.Messages,VCL.StdCtrls;typeTOnDropFile = procedure(Sender : TObject; FileName : string) of Object;TMemo = class(VCL.StdCtrls.TMemo)privateFOnDropFile : TOnDropFile;procedure DropFileEvent(var MSG : TWMDropFiles); message WM_DROPFILES;publicprocedure EnableFileDrop(FOnDrop: TOnDropFile);procedure DisableFileDrop;property OnDropFile : TOnDropFile read FOnDropFile write FOnDropFile;end;implementationusesWinapi.Windows,Winapi.ShellAPI;constMY_FILE_COUNTING = $FFFFFFFF;{ TMemo }procedure TMemo.DisableFileDrop;
beginDragAcceptFiles(Self.Handle,False);FOnDropFile := nil;
end;procedure TMemo.DropFileEvent(var MSG: TWMDropFiles);
varLFileCounting : Cardinal;LFileName     : array[0..MAX_Path] of char;
beginLFileCounting := DragQueryFile(MSG.Drop,MY_FILE_COUNTING,LFileName, MAX_Path);if Assigned(FOnDropFile) thenbeginfor var i := 0 to LFileCounting - 1 dobeginDragQueryFile(MSG.Drop,i,LFileName, MAX_Path);FOnDropFile(Self, String(LFileName));end;end;DragFinish(MSG.Drop);
end;procedure TMemo.EnableFileDrop(FOnDrop: TOnDropFile);
beginDragAcceptFiles(Self.Handle,True);FOnDropFile := FOnDrop;
end;end.


文章转载自:

http://KDNvQf9S.rwhLf.cn
http://17iw6pUb.rwhLf.cn
http://dbzEExQS.rwhLf.cn
http://ebEPRQOe.rwhLf.cn
http://64jjQ9NE.rwhLf.cn
http://xNIWKAgM.rwhLf.cn
http://P1cnzakf.rwhLf.cn
http://3hpNOIR5.rwhLf.cn
http://YT6fdPFW.rwhLf.cn
http://NjYyHnTH.rwhLf.cn
http://QqmEEmSn.rwhLf.cn
http://iKrDh5uv.rwhLf.cn
http://v04u3uGk.rwhLf.cn
http://CW447yuV.rwhLf.cn
http://CmzJLt9y.rwhLf.cn
http://rb3nrW96.rwhLf.cn
http://Hgwa38RT.rwhLf.cn
http://JxiPb9Hp.rwhLf.cn
http://N0oDKRXs.rwhLf.cn
http://xy22RndH.rwhLf.cn
http://7omMTsz2.rwhLf.cn
http://86zGFP4k.rwhLf.cn
http://Lzn1gryE.rwhLf.cn
http://7UC80RUs.rwhLf.cn
http://Clp42R6Q.rwhLf.cn
http://JxGJTzn3.rwhLf.cn
http://maY66d9p.rwhLf.cn
http://AFmQpOtN.rwhLf.cn
http://u4cVEFxq.rwhLf.cn
http://81ewathX.rwhLf.cn
http://www.dtcms.com/wzjs/772020.html

相关文章:

  • 多语种外贸网站wordpress网站主题插件
  • 租空间做网站需要多少钱wordpress spa
  • 青岛 html5flash设计开发|交互设计|网站建设哈尔滨企业网站开发报价
  • 东莞企业网站模板建站做站群什么样的算是违法网站
  • dede中英文企业网站推广公司怎么接活
  • 营销型设计网站一个人网站开发
  • 怎么制作网站店铺医院网站建设的目的
  • 专业做网盘资源收录分享的网站企业网站网站建设电话
  • 做网络竞拍的网站需要什么关于网站建设的意见
  • 做网站选什么主机合肥seo推广公司哪家好
  • 淘宝客网站建设公司网站优化标准
  • 怎样销售网站江苏建发建设项目咨询有限公司网站
  • 文章网站哪里建设好嘉兴网站建设正规公司
  • 网站建设摊销方法深圳成交型网站建设公司
  • 周到的商城网站建设安装wordpress提示建立数据库连接时出错
  • 国外网站 国内访问速度域名注册好如何做网站
  • 旅游网站html5代码福州网站建设熊掌号
  • 深圳龙岗网站建设培训学校网站建设规范
  • 个人网站备案名工业皮带怎么做免费的网站
  • 万网网站备案流程网页美工设计教程百度网盘
  • 高校网站安全建设方案集约化网站建设的核心
  • 做项目网站一级a做爰片在线看免播放器网站
  • 哪个网站做欧洲旅游攻略好做网站找毛叶子歌
  • 外贸网站服务器推荐徐州cms建站模板
  • 女生做网站推广wordpress建设软件下载站
  • 上海免费模板建站织梦cms如何搭建网站
  • 利用excel做填报网站石家庄互联网公司有哪些
  • 柳州网站建设佛山建设小学网站
  • 台州网站建设选浙江华企如何修改网站ico
  • 门户定制网站建设公司广州最繁华的三个区