Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Начинающим";
Текущий архив: 2006.05.28;
Скачать: [xml.tar.bz2];

Вниз

Копирование   Найти похожие ветки 

 
manevil   (2006-05-12 07:04) [0]

Добрый день. Помогите, плиз.
Такая проблемка: необходимо сделать копирование выбранных пользователем в opendialog (если есть лучшая альтернатива - подскажите) файлов, причем нужно именно файлов, а не одного файла в выбранную юзером директорию, какая функция из opendialog отвечает за выбор директории? и есть ли она? помогите, плиз!


 
MBo ©   (2006-05-12 07:35) [1]

SelectDirectory


 
manevil   (2006-05-12 08:25) [2]

это функция opendialog?
можно подробнее, пожалуйста, я у opendialog ее не нашел


 
MBo ©   (2006-05-12 08:28) [3]

нет, это отдельная функция выбора директории (их даже две overload)


 
manevil   (2006-05-12 08:34) [4]

в справке ее нет :(
можно с примером или дайте ссылку, плиз


 
MBo ©   (2006-05-12 08:46) [5]

Да есть она в справке.
Brings up a dialog to allow the user to enter a directory name.

Unit

FileCtrl

Category

dialog and message routines

function SelectDirectory(const Caption: string; const Root: WideString; out Directory: string): Boolean; overload;
function SelectDirectory(var Directory: string; Options: TSelectDirOpts; HelpCtx: Longint): Boolean; overload;

Description

Call SelectDirectory to let the user enter a directory name.

Use the first syntax to display the Windows directory browser. The Caption parameter specifies a caption for the dialog. The Root parameter specifies the root directory from which to browse. The selected directory is returned as the Directory parameter. When using this syntax, SelectDirectory does not change the value of the current directory.

Warning: You can’t use the same variable for the Root parameter and the Directory parameter.

Use the second syntax to call the Select Directory dialog box. The directory passed to the function with the Directory parameter appears as the currently selected directory when the dialog box appears. The name of the directory the user selects becomes the value of Directory when the function returns.

The HelpCtx parameter is the help context ID number.

The Options parameter is a set of values. If Options is the empty set, the user can only select a directory that already exists. No edit box is provided for the user to enter a new directory name. If Options is not empty, the included values determine how the dialog responds when the user types a nonexistent directory name.

With either syntax, SelectDirectory returns True if the user selected a directory and chose OK, and False if the user chose Cancel or closed the dialog box without selecting a directory.


 
manevil   (2006-05-12 10:56) [6]

а можно примерчик небольшой?


 
Плохиш ©   (2006-05-12 11:06) [7]


> manevil   (12.05.06 10:56) [6]
> а можно примерчик небольшой?

Всё в справке.

> manevil   (12.05.06 08:34) [4]
> в справке ее нет

В справке к Д5 и к Д7 есть, значит и в справке к Д6 есть, ищется легко через индекс.


 
manevil   (2006-05-12 13:52) [8]

У меня не было этого в справке в 6 версии :(
Поставил 7 и нашел. вот так...
теперь разобрался, всем спасибо


 
manevil   (2006-05-12 14:01) [9]

Можно еще вопросик? :)
Как можно сделать в opendialog выбор нескольких файлов, а не одного?


 
Плохиш ©   (2006-05-12 14:19) [10]

topendialog.files + F1 + "Example"


 
аматор ©   (2006-05-12 14:57) [11]

Привет...
Имена файлов он хранит TString оттуда и вытягивай. св-во Files кажись.



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

Форум: "Начинающим";
Текущий архив: 2006.05.28;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.47 MB
Время: 0.019 c
2-1147406447
Elen
2006-05-12 08:00
2006.05.28
Настройки Delphi


2-1147277350
Nicky
2006-05-10 20:09
2006.05.28
Как запаролить форму


2-1147424074
max32
2006-05-12 12:54
2006.05.28
delfi------->msword


2-1147371555
Призрак
2006-05-11 22:19
2006.05.28
Как организовать FIFO-буфер?


1-1145450930
Alex_C
2006-04-19 16:48
2006.05.28
Почему прерывается выполнение Thread?





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский