Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2003.06.30;
Скачать: CL | DM;

Вниз

Открытие файла перетаскиванием   Найти похожие ветки 

 
DiXi123 ©   (2003-06-18 11:56) [0]

Как открыть файл перетаскиванием(как в блокноте)?


 
clickmaker ©   (2003-06-18 12:49) [1]

type
TForm1 = class(TForm)
Memo1: TMemo;
private
{ Private declarations }
procedure WMDropFiles(var Message: TMessage); message WM_DROPFILES;
protected
procedure CreateParams(var Params: TCreateParams); override;
public
{ Public declarations }
end;

implementation

{$R *.DFM}

procedure TForm1.CreateParams(var Params: TCreateParams);
begin
inherited;
Params.ExStyle := WS_EX_ACCEPTFILES;
end;

procedure TForm1.WMDropFiles(var Message: TMessage);
var
FileCount, i: integer;
FileName: array[0..MAX_PATH] of char;
begin
FileCount := DragQueryFile(Message.WParam, $FFFFFFFF, nil, 0);
for i := 0 to FileCount-1 do begin
DragQueryFile(Message.WParam, i, FileName, sizeof(FileName));
Memo1.Lines.LoadFromFile(FileName);
end;
end;



Страницы: 1 вся ветка

Текущий архив: 2003.06.30;
Скачать: CL | DM;

Наверх




Память: 0.46 MB
Время: 0.021 c
11-97575
Sacred
2002-10-14 12:04
2003.06.30
ActiveX


7-97914
Женя
2003-04-21 11:05
2003.06.30
Звук с помощью системного динамика


14-97860
Caponid
2003-06-12 11:32
2003.06.30
Язык SQL самые основы - дайте ссылки


1-97744
EgorKA
2003-06-18 18:51
2003.06.30
TEdit с выдилениями и TRxRichEdit c полями...


14-97829
Alex_x
2003-06-11 15:51
2003.06.30
неменяется значение RadioButton