Autor Beitrag
mav016
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 30

Win XP SP2

BeitragVerfasst: Do 30.03.06 14:13 
Hallo!

ICh schaffe es das von zwei Ecken Linien gezeichnet werden! Und zwar von oben rechts und unten links nun schaffe ich es nicht das es von den anderen Seiten geht!

Ich werde dann mal den Code reinstellen!
Kroko
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1284

W98 W2k WXP
Turbo D
BeitragVerfasst: Do 30.03.06 14:17 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
MoveTo (X1,Y1);
LineTo (X2,Y2);
MoveTo (X3,Y3);
lineTo (X4,Y4);

_________________
Die F1-Taste steht nicht unter Naturschutz und darf somit regelmäßig und oft benutzt werden! oder Wer lesen kann, ist klar im Vorteil!
Fabian W.
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1766

Win 7
D7 PE
BeitragVerfasst: Do 30.03.06 14:18 
Wo ist dein Problem?
ausblenden Delphi-Quelltext
1:
kompo.canvas.moveto(0,0); kompo.canvas.lineto(kompo.width,kompo.heigt);					
mav016 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 30

Win XP SP2

BeitragVerfasst: Do 30.03.06 14:35 
Es soll mit 4Timer funktionieren!

Nun weis ich nicht wie!

Ich hoffe ich stelle das Richtige drauf?--> wenn nicht dann sagt es

DANKE
Einloggen, um Attachments anzusehen!


Zuletzt bearbeitet von mav016 am Do 30.03.06 16:11, insgesamt 1-mal bearbeitet
freak4fun
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 604
Erhaltene Danke: 4

Win 7 Pro
VS 2013 Express, Delphi, C#, PHP, Java
BeitragVerfasst: Do 30.03.06 14:57 
Es fehlt die *.pas. :(

Wenn du eine Linie von Unten rechts zeichnen willst geht das so (ungetestet):
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
for i := Form1.Heigth downto 0 do
  begin
    MoveTo(Form1.Width, Form1.Heigth);
    LineTo(0, i * 5);
  end;

for i := 0 to Form1.Width do
  begin
    MoveTo(Form1.Width, Form1.Heigth);
    LineTo(i * 5, 0);
  end;




MfG
freak

_________________
"Ich werde auf GAR KEINEN Fall…!" - "Keks?" - "Okay, ich tu's."
i++; // zaehler i um 1 erhoehen
mav016 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 30

Win XP SP2

BeitragVerfasst: Do 30.03.06 16:11 
Die pas ist jetzt drinnen!

Danke

HAt sich schon jemand mein Programm angeschaut?
Kroko
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1284

W98 W2k WXP
Turbo D
BeitragVerfasst: Fr 31.03.06 03:56 
ja,
allerdings sehe ich nicht, wozu Du 4 Timer brauchst, eine Variable
ausblenden Delphi-Quelltext
1:
FMode: Word					

tut es auch, ich habe mal ein bischen probiert, soll es so aussehen?:
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:
41:
42:
43:
44:
45:
46:
47:
48:
49:
procedure TForm1.Timer1Timer(Sender: TObject);
begin
  case FMode of
    0: begin
         Canvas.Pen.Color := clYellow;
         Canvas.MoveTo (0,0);
         Canvas.LineTo (ClientWidth,FPos);
         Inc (FPos,5);
         if FPos>ClientHeight then
           begin
             Inc (FMode);
             FPos := ClientHeight;
           end;
       end;
    1: begin
         Canvas.Pen.Color := clBlue;
         Canvas.MoveTo (0,ClientHeight);
         Canvas.LineTo  (ClientWidth,FPos);
         Dec (FPos,5);
         if FPos<0 then
           begin
             Inc (FMode);
             FPos := 0;
           end;
       end;
    2: begin
         Canvas.Pen.Color := clRed;
         Canvas.MoveTo (ClientWidth,0);
         Canvas.LineTo (0,FPos);
         Inc (FPos,5);
         if Fpos>ClientHEight then
           begin
             Inc (FMode);
             FPos := ClientHeight;
           end;
       end;
    3: begin
         Canvas.Pen.Color := clLime;
         Canvas.MoveTo (ClientWidth,ClientHeight);
         Canvas.LineTo (0,FPos);
         Dec (FPos,5);
         if FPos<0 then
           begin
             Inc (FMode);
             Timer1.Enabled := False;
           end;
       end;
  end;
end;

_________________
Die F1-Taste steht nicht unter Naturschutz und darf somit regelmäßig und oft benutzt werden! oder Wer lesen kann, ist klar im Vorteil!