Autor Beitrag
Death666Metal
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 22

Win XP
Delphi 7/html/php/flash/basic/c++
BeitragVerfasst: Mo 17.10.05 12:31 
Ich wollte mal ein Programm schreiben, dass beim öffnen autom. eine bestimmte *.wpl öffnet und sich dann schließt. Wie schreibe ich das? Welche Parameter sind das und wo muss ich den Pfad eingeben?
Danke schonmal!
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 17.10.05 12:49 
Moin und :welcome: im Forum!

Such mal hier nach Suche in: Delphi-Forum, Delphi-Library SHELLEXECUTE, das sollte dir helfen.

Ansonsten solltest du mal den Code zeigen, der nicht tut, was er soll. :wink:

cu
Narses
Death666Metal Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 22

Win XP
Delphi 7/html/php/flash/basic/c++
BeitragVerfasst: Mo 17.10.05 13:24 
Titel: keinen code
ich hab ja keinen code, da ich ja keine funktion finde aber ich werde mal deinen link untersuchen *grinz*
Death666Metal Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 22

Win XP
Delphi 7/html/php/flash/basic/c++
BeitragVerfasst: Di 18.10.05 20:40 
Titel: Mein Code
Ich hab jetzt folgenden Code:
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, ShellAPI, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);

  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}







procedure TForm1.Button1Click(Sender: TObject);
begin
ShellExecute(Application.Handle, 'open', 'C:\My Musik.wpl', nil, nil, SW_SHOW);
close;
end;

end.

Und wie kann ich nun schreibn das der das was bei button.click passiert automatisch beim öffnen macht? :?!?:
Wie gesagt ich hab noch nicht viel Ahnung! :nixweiss:
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Di 18.10.05 23:08 
Moin!

Tu es in das FormCreate rein (Doppelklick auf dem Formularhintergrund).

cu
Narses
Death666Metal Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 22

Win XP
Delphi 7/html/php/flash/basic/c++
BeitragVerfasst: Mi 19.10.05 06:48 
Titel: Alles klar
Also so oder wie?
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
unit Unit1;

interface

uses
  Windows, Math, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs;

type
  TForm1 = class(TForm)
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}


procedure TForm1.FormCreate(Sender: TObject);
begin
ShellExecute(Application.Handle, 'open', 'C:\My Musik.wpl', nil, nil, SW_SHOW);
close;
end;

end.


So bringt der aber Fehlermeldungen
Was istn da noch falsch?
Death666Metal Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 22

Win XP
Delphi 7/html/php/flash/basic/c++
BeitragVerfasst: Fr 21.10.05 20:31 
Problem is gelöst, danke nochmal!