掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
windows 8上でドラッグドロップが動かない (ID:44728)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
あ さん、ありがとうございます。 必要最小限で試してみました。 Delphi3では、問題なく動き、 TurboDelphiでは、 「管理者として実行」をOFFにし、 「互換性の設定」を「windows 7」に変えたところ、 無事動作しました。 しかし、Lazarusの方は、何をやっても動作しません。 ソースはほぼDelphiの場合と同じですが、念の為載せます。 unit Unit1; {$mode objfpc}{$H+} interface uses windows, messages, shellapi, Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs; type { TForm1 } TForm1 = class(TForm) procedure FormCreate(Sender: TObject); private { private declarations } procedure WMDropFiles(var Msg: TWMDropFiles); message WM_DROPFILES; public { public declarations } end; var Form1: TForm1; implementation {$R *.lfm} { TForm1 } procedure TForm1.FormCreate(Sender: TObject); begin DragAcceptFiles(Handle, True); end; procedure TForm1.WMDropFiles(var Msg:TWMDropFiles); var FileName: array [0..255] of Char; begin DragQueryFile(Msg.Drop, 0, FileName, SizeOf(FileName)); ShowMessage(FileName); DragFinish(Msg.Drop); end; end.
←解決時は質問者本人がここをチェックしてください。
更新する
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.