![]() |
Öfnnen einer Datei
Hallo,
hab mal wieder ne Frage. Ich bin derzeit dabei ein Proramm zu absteln. Sollte klar sein =) Es ist eine art Wecker. Ich geb ne Zeit ein Drück auf start und der Weckt mich dann. Er macht dies mit einem wav File das er abspielt. Nun die Frage: Ich habe vor ein 'Datei Öffnen' Feld zu basteln. ZB wie in Word das man seine Word Datei findet und öffnen kann. Datei -> Öfnnen ... Wie mach ich das? Gibt es außerdem eine Möglichkeit mp3's in einem Delphi Programm ab zu spielen ? Thx Chucky |
Re: Öfnnen einer Datei
Hi Chucky_88,
zum ersten: ![]() zum zweiten: ![]() Greetz alcaeus |
Re: Öfnnen einer Datei
Fettes Merci
|
Re: Öfnnen einer Datei
Wobei ich dazu nichts finde :-/ TOpenDialog
|
Re: Öfnnen einer Datei
Ein kleiner Tipp:
Ziehe dir die Komponente (findest du im Reiter "Dialoge") auf das Formular, und schaue dir dann die Funktion TOpenDialog.Execute an und die Eigenschaft TOpenDialog.Filename. damit solltest du schonmal die grundlegende Funktionsweise dieser Komponente nachvollziehen können. Gruß Christian |
Re: Öfnnen einer Datei
Mit OpenDialog.Filename erhältst du z.B. schon mal den Dateinamen der gewählten Datei. Die OH hätte dir auch hier geholfen ;-)
|
Re: Öfnnen einer Datei
Hi Chucky_88,
nichts gefunden? :roll: [equote="Die Delphi-OH zum Thema 'Verwendung des TOpenDialogs'"]One of the commonly used dialog box components is TOpenDialog. This component is usually invoked by a New or Open menu item under the File option on the main menu bar of a form. The dialog box contains controls that let you select groups of files using a wildcard character and navigate through directories. The TOpenDialog component makes an Open dialog box available to your application. The purpose of this dialog box is to let a user specify a file to open. You use the Execute method to display the dialog box. When the user chooses OK in the dialog box, the user's file is stored in the TOpenDialog FileName property, which you can then process as you want. The following code can be placed in an Action and linked to the Action property of a TMainMenu subitem or be placed in the subitem's OnClick event:
Code:
This code will show the dialog box and if the user presses the OK button, it will copy the name of the file into a previously declared AnsiString variable named filename.[/equote]
if OpenDialog1.Execute then
filename := OpenDialog1.FileName; Greetz alcaeus |
Alle Zeitangaben in WEZ +1. Es ist jetzt 18:58 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz