Autor Beitrag
Éde1987
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 24



BeitragVerfasst: So 07.01.07 16:42 
Hallo,
kann man es mit einen Befehl erreichen sein Programm neu zu Starten? Also so als ob man es manuell schließt und wieder neu beginnt?
Ihr könnt mir doch 100% helfen!
DANKE SCHONMAL!!!
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: So 07.01.07 16:47 
Du könntest eine neue Instanz deines Programms mit ShellExecute löschen.
Aber such doch einfach mal, die Frage kommt hier im letzter Zeit alle 2 Wocehn.

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
Éde1987 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 24



BeitragVerfasst: So 07.01.07 16:53 
hab schon geguckt aber es gibt nix hilfreiches.
kannst du deinen ansatz nochmal genauer erklären?
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: So 07.01.07 17:08 
Erst eine neue Instanz des eigenen Programms öffnen (Stichworte: Suche in: Delphi-Forum, Delphi-Library SHELLEXECUTE, Suche in: Delphi-Forum, Delphi-Library APPLICATION.EXENAME) und dann dein Formular mit Close schließen (wer hätte diesen Zusammenhang vermutet?^^).

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
Éde1987 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 24



BeitragVerfasst: So 07.01.07 17:14 
HÖ?? HÄ?? OK?? KEIN PLAN?? GIBT ES NICHT EIN BEFEHL WIE ZB:
ausblenden Delphi-Quelltext
1:
bitte programm neu starten;					


??
DarkLord05
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 449

WinXP Pro SP2
Opera; Delphi 3 Pro; Delphi 2005, Turbo Delphi, dev-c++, Eclipse, MS Visual Studio .NET 2003, MS Visual C++
BeitragVerfasst: So 07.01.07 17:15 
nein *g*

Aber ich frag auch mal wie im anderen Thread jemand anderes gefragt hat: Warum willst du dein Programm neu starten?

_________________
QBasic | Delphi | c++ | PHP | C# .NET | Java
Éde1987 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 24



BeitragVerfasst: So 07.01.07 17:18 
Weil ich einen Messagedlg machen wollte wo drin steht ob man das Programm neu starten will...
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: So 07.01.07 17:20 
:rofl:

Und wieso willst du den MessageDialog machen?

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
Éde1987 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 24



BeitragVerfasst: So 07.01.07 17:21 
Weil ... Weiss nicht wollte halt mal sehen ob das geht!!!
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: So 07.01.07 17:23 
Meistens wirds auch besser sein, wenn du einfach geänderte Variablen, ... zurücksetzt.

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
Andreas L.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1703
Erhaltene Danke: 25

Windows Vista / Windows 10
Delphi 2009 Pro (JVCL, DragDrop, rmKlever, ICS, EmbeddedWB, DEC, Indy)
BeitragVerfasst: So 07.01.07 17:26 
@Ede:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
uses .., ..., ShellApi;

...

procedure TForm1.Button1Click(Sender: TObject);
begin

 shellExecute(Handle,PChar('open'),PChar(application.exename),nil,nil,SW_NORMAL);

 Application.terminate;

end;


@Jakob:
user profile iconjakobwenzel hat folgendes geschrieben:
:rofl:

Und wieso willst du den MessageDialog machen?


Jemanden wegen seinen Programm auszulachen, egal wie sinnlos es ist, ist wirklich das Letzte...
Éde1987 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 24



BeitragVerfasst: So 07.01.07 17:27 
Ja nee ... kann ja sein aber ich wollte wissen ob man ein Programm neu straten kann ohne viel Aufwand mit einen Befehl oder so...
Geht das???!!!

Ja, so und so ...
Nein!!

Das reicht als antwort!!!
Leuchtturm
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1087

Win Vista, Knoppix, Ubuntu
Delphi 7 Pe, Turbo Delphi, C#(VS 2005 Express), (X)HTML + CSS, bald Assembler
BeitragVerfasst: So 07.01.07 17:30 
user profile iconAndreas L. hat folgendes geschrieben:
@Ede:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
uses .., ..., ShellApi;

...

procedure TForm1.Button1Click(Sender: TObject);
begin

 shellExecute(Handle,PChar('open'),PChar(application.exename),nil,nil,SW_NORMAL);

 Application.terminate;

end;

...

Das funktioniert doch und es sind auch bloß zwei befehle :roll:

_________________
Ich bin dafür verantwortlich was ich sage - nicht dafür was du verstehst.
Andreas L.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1703
Erhaltene Danke: 25

Windows Vista / Windows 10
Delphi 2009 Pro (JVCL, DragDrop, rmKlever, ICS, EmbeddedWB, DEC, Indy)
BeitragVerfasst: So 07.01.07 17:31 
user profile iconÉde1987 hat folgendes geschrieben:
Ja nee ... kann ja sein aber ich wollte wissen ob man ein Programm neu straten kann ohne viel Aufwand mit einen Befehl oder so...
Geht das???!!!

Ja, so und so ...
Nein!!

Das reicht als antwort!!!


In meinen Code-Schnipsel sind 2 Befehle die du zum neustarten deines Programms brauchst. Eventuell musst du noch mit dem Application.Terminate warten bis die Anwendung gestartet wurde. Aber das findest du über die Suche. Einfach mal bisschen probieren.
Éde1987 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 24



BeitragVerfasst: So 07.01.07 17:35 
Ok Ich danke euch es geht *Grinsebacke*
COOL^^ Danke!!!