掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
windows 8上でドラッグドロップが動かない (ID:44729)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
何とか解決しました。 Lazarusの方の原因は、windows 8ではなく、ソースの記述方法でした;。 以下サイトを参考にして必要最小限の構成で動かしたところ、無事動きました。 らざるー TForm.AllowDropFiles https://sites.google.com/site/lazarue777/home/lazarus-lcl-help/tform/tform-allowdropfiles これで何とか先に進めそうです。 以下は動作したソースです。 ありがとうございました。 unit Unit1; {$mode objfpc}{$H+} interface uses Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs; type { TForm1 } TForm1 = class(TForm) private { private declarations } procedure FormDropFiles(Sender: TObject; const FileNames: array of String); public constructor Create(TheOwner: TComponent); override; { public declarations } end; var Form1: TForm1; implementation {$R *.lfm} { TForm1 } constructor TForm1.Create(TheOwner: TComponent); begin inherited Create(TheOwner); Self.AllowDropFiles := True; Self.OnDropFiles := @FormDropFiles; end; procedure TForm1.FormDropFiles(Sender: TObject; const FileNames: array of String); var i: Integer; file_name: String; begin for i := Low(FileNames) to High(FileNames) do begin file_name := FileNames[i]; showmessage(file_name); end; end; end.
←解決時は質問者本人がここをチェックしてください。
更新する
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.