Autor Beitrag
StefanH
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1144

Win XP
D5 Standard, D7 Pers, D2005 Pers
BeitragVerfasst: Sa 08.11.03 18:18 
Hallo!

Der Code funzt irgendwie nicht so ganz:

ausblenden Delphi-Quelltext
1:
2:
3:
for i:=1 to 5 do 
  if ParamStr(i)<>'' then 
    (FindComponent('Edit' + IntToStr(i)) as TEdit).Text:= ParamStr(i);


Bloß walum?????

_________________
"Als es noch keine Computer gab, war das Programmieren noch relativ einfach."(Edsger W. Dijkstra)
"Ich bin nicht von Sinnen, sondern ich rede wahre und vernünftige Worte." (Paulus)
AndyB
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1173
Erhaltene Danke: 14


RAD Studio XE2
BeitragVerfasst: Sa 08.11.03 19:21 
Und wir sollen jetzt erraten, was da nicht funktioniert?

_________________
Ist Zeit wirklich Geld?
Raphael O.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1596


VS 2013
BeitragVerfasst: Sa 08.11.03 20:12 
wahrscheinlich schon...
IMO müsste der (eigentlich)
funktinieren...
Wolff68
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 302
Erhaltene Danke: 1

WinXP home
D6 Prof
BeitragVerfasst: So 09.11.03 12:09 
Vielleicht gibst Du dem Rate-Team hier noch einen Tip WAS nicht funktioniert!?

Hab das eben mal getestet. Hab es in die FormCreate gepackt, weil ich da ein Problem mit der Erstellungs-Reihenfolge vermutete, aber selbst das funktioniert. (Auch wenn ich sowas eher ins FormActivate setzen würde)

_________________
"Der Mensch ist nicht was er sich vorstellt oder wünscht zu sein, sondern das was andere in ihm sehen."
BungeeBug
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 901



BeitragVerfasst: So 09.11.03 12:36 
Hi,

im Form Activate gehs bestimmt in die Hose ... Form Aktivate wird jedesmal ausgelößt wenn das Fenster den Fokus erhällt und ich glaub nicht das das der Sinn der Sache war.
StefanH Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1144

Win XP
D5 Standard, D7 Pers, D2005 Pers
BeitragVerfasst: So 09.11.03 16:07 
hmm... sorry :oops:

vielleicht check ich die ParamStr()s auch net... wenn ich eine Datei auf meine Exe zieh, ist es doch ParamStr(1), gell? und wo ist dann die 2te Datei? anscheinend nicht ParamStr(2). das ist nämlich das Problem, Edit2-4 sind leer :(

verstanden?

Stefan

_________________
"Als es noch keine Computer gab, war das Programmieren noch relativ einfach."(Edsger W. Dijkstra)
"Ich bin nicht von Sinnen, sondern ich rede wahre und vernünftige Worte." (Paulus)
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: So 09.11.03 16:59 
lass dir einfach mal die paramstrs per messagebox ausgeben !! dann wirste schon sehen, was in den paramstr drin ist wenn du nen date oder 2 draufziehst !

_________________
In the beginning was the word.
And the word was content-type: text/plain.
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Mo 10.11.03 10:31 
Also bei mir funktioniert der folgende Code:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure TForm1.FormCreate(Sender: TObject);
Var
  Loop: Integer;
begin
  Memo1.Lines.Clear;
  For Loop := 1 To ParamCount Do
    Memo1.Lines.Add (ParamStr (Loop));
end;

Gruß
Tino
StefanH Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1144

Win XP
D5 Standard, D7 Pers, D2005 Pers
BeitragVerfasst: Mo 10.11.03 17:11 
ich krieg irgenwie nur die erste File... :(

_________________
"Als es noch keine Computer gab, war das Programmieren noch relativ einfach."(Edsger W. Dijkstra)
"Ich bin nicht von Sinnen, sondern ich rede wahre und vernünftige Worte." (Paulus)
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Di 11.11.03 10:48 
Hast du meinen Sourcecode schau ausprobiert? Einfach ein neues Projekt erstellen und im OnCreate Event den Sourcecode einfügen. Wenn du dann im Explorer zwei Dateien markierst und diese auf das Exe-File ziehst werden beide Dateien in das Memo eingefügt.

Gruß
Tino
StefanH Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1144

Win XP
D5 Standard, D7 Pers, D2005 Pers
BeitragVerfasst: Sa 15.11.03 16:01 
funzt nicht :( ich krieg immer nur die 1te....

_________________
"Als es noch keine Computer gab, war das Programmieren noch relativ einfach."(Edsger W. Dijkstra)
"Ich bin nicht von Sinnen, sondern ich rede wahre und vernünftige Worte." (Paulus)
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 15.11.03 16:11 
Und wie viel mal wird dein Programm gestartet?

Normal ist es so, dass wenn man es nicht unterbindet, dass für jede Datei eine eigene Instanz gestartet wird. Oder eben nur die erste genommen wird. Habe es gerade mit dem ResHacker probiert. Zwei Dateien über "Senden an" an ihn geschickt, nur eien wurde geöffnet. Aber im Gegensatz dazu, drei Dateien auf Notepad.exe gezogen: Fehlermeldung, dass der Dateiname ungültig sein und Notepad war leer.

Was ich sagen will, du machst nichts falsch, dein Programm zeigt nur das normale Verhalten unter Windows.
StefanH Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1144

Win XP
D5 Standard, D7 Pers, D2005 Pers
BeitragVerfasst: Sa 15.11.03 16:20 
ein mal... es liegt also an Windows, wie schööööööööööööööön :D

_________________
"Als es noch keine Computer gab, war das Programmieren noch relativ einfach."(Edsger W. Dijkstra)
"Ich bin nicht von Sinnen, sondern ich rede wahre und vernünftige Worte." (Paulus)