PDA

View Full Version : Focused Directory


bruder_s
11th December 2002, 08:30
Hello,

I'm writing a plugin that uses a 'Save As'-Dialog.
Everytime I save something, Winamp focuses on the directory used in the save-dialog (with focus I mean the directory which is selected, when you click on Add|Dir in the Playlist).
I'm searching for a way to prevent this or a method to manually change this directory.

thanks in advance


I'm using this code:

with TSaveDialog.Create(nil) do begin
try
if Execute then begin
//do sth
end;
finally
free();
end;
end;

Hill-Groover
23rd May 2003, 01:21
Hi bruder_s,

You could use the InitialDir property for the savedialog;

with TSaveDialog.Create(nil) do
begin
InitialDir := 'C:\'; // savedialog will use this dir when executed
try
if execute then
begin
//do sth
end;
finally
free();
end;
end;

I've just used this in a standard application so not 100% sure if it'l work in a winamp plug but it should do. If not, try creating the dialog using the plugin as the parent,

with TSaveDialog.Create(Self) do
...

If you need any more just give us a shout!

PS. It's good to see someone else using Delphi for a change.

Quarc
23rd May 2003, 19:51
nice for me too to see Delphi brothers here :)

bye,
Marc