ERLEDIGT
NEIN
NEIN
ANTWORTEN
22
22
ZUGRIFFE
1679
1679
EMPFEHLEN
-
15.11.05 21:50 #16
Hi Alex.
Haha, es gibt auch für alles einen Link, was?
Naja, auf jeden Fall habe Ich Mal rumprobiert und die Exe angehängt, Framework 1.1, speichern geht halt noch nicht. Es sit so ein Raumplaner geworden, kannst die Maße von nem quadratischen Raum eingeben und Linien zeichnen. Probiers mal!
MfG Alexander12
-
15.11.05 22:08 #17
- Registriert seit
- Aug 2001
- Ort
- Österreich, Stmk, Graz
- Beiträge
- 2.783
Mh, du hängst auch alles mögliche hier an, oder?
"Beta 1" finde ich mal wieder eine Spur übertrieben.With the first link the chain is forged. The first speech censored, the first thought forbidden, the first freedom denied, chains us all irrevocably.
Aaron Satie
Legends... are the spice of the universe, Mr. Data, because they have a way of sometimes coming true.
Captain Jean-Luc Picard, Stardate ~41294.5
Tutorials.de chattet. Hier gibts auch .net Support ^^
Klickt auf chattet und nutzt den Webchat, oder verbindet euch zu irc.tutorials.de - Channel #Tutorials.de
(moo)blog furred.net // SiteInfo für WP7 // Pastebin für WP7 // BlogEngine.net Extensions
-
15.11.05 22:13 #18
Hi Alex.
Hm.. Naja, Mal was Anhängen geht ja, oder?
Naja, Ich finde aber das Ich mich vor rund 3 Stunden erst in GDI+ eingelesen habe ists gut, oder?
MfG Alexander12
-
15.11.05 22:16 #19
- Registriert seit
- Aug 2001
- Ort
- Österreich, Stmk, Graz
- Beiträge
- 2.783
Hajo, lass ich mal gelten.
With the first link the chain is forged. The first speech censored, the first thought forbidden, the first freedom denied, chains us all irrevocably.
Aaron Satie
Legends... are the spice of the universe, Mr. Data, because they have a way of sometimes coming true.
Captain Jean-Luc Picard, Stardate ~41294.5
Tutorials.de chattet. Hier gibts auch .net Support ^^
Klickt auf chattet und nutzt den Webchat, oder verbindet euch zu irc.tutorials.de - Channel #Tutorials.de
(moo)blog furred.net // SiteInfo für WP7 // Pastebin für WP7 // BlogEngine.net Extensions
-
15.11.05 22:20 #20
Hi.
Naja, dann kann Ich heute Nacht beruhigt schlafen.
Morgen werde Ich mich Mal weiter in die GDI+ einlesen und dann noch Mal posten.
Schönen Abend noch,
Alexander12
-
16.11.05 18:20 #21
Hi.
Ich versuche gerade erfolglos hinzubekommen, wie Ich eine Linie zeichne, während der Mausbutton gedrückt ist, also wie bei Paint, wo das ergebnis schon bei jeder Mausbewegung sichtbar ist und wenn Man den Mausbutton loslässt die Linie fixiert wird.
Mein bisheriger Code, der nicht funktioniert:
Code :1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
public bool mouse = false; public int x1,y1,x2,y2; void MainFormMouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { if(mouse == false) { this.x1 = MousePosition.X; this.y1 = MousePosition.Y; this.mouse = true; } this.x2 = MousePosition.X; this.y2 = MousePosition.Y; Graphics g = this.CreateGraphics(); Pen myPen = new Pen(this.color1.Color); g.DrawLine(myPen,x1,y1-26,x2,y2-26); } void MainFormMouseUp(object sender, System.Windows.Forms.MouseEventArgs e) { Graphics g = this.CreateGraphics(); Pen myPen = new Pen(this.color1.Color); g.DrawLine(myPen,x1,y1-26,x2,y2-26); }
Hier klickt Man auf 2 Punkte in der Form und er zeichnet eine direkte Linie.
Weiß jemand wie Ich den code ändern muss, dass das oben genannte geht?
MfG Alexander12
-
16.11.05 20:50 #22
- Registriert seit
- Aug 2001
- Ort
- Österreich, Stmk, Graz
- Beiträge
- 2.783
Hallo.
Das du das Paint-Event benutzen sollst hab ich dir schon gesagt, oder?
Code :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
private Line current; private List<Line> lines = new List<Line>(); private void DrawPanel_Paint(object sender, PaintEventArgs e) { foreach (Line l in lines) { e.Graphics.DrawLine(Pens.Blue, l.Start, l.End); } if (current != null) e.Graphics.DrawLine(Pens.Red, current.Start, current.End); } private void DrawPanel_MouseDown(object sender, MouseEventArgs e) { if (current == null) current = new Line(); current.Start = new Point(e.X, e.Y); current.End = current.Start; } private void DrawPanel_MouseUp(object sender, MouseEventArgs e) { current.End = new Point(e.X, e.Y); lines.Add(current); current = null; DrawPanel.Invalidate(); } private void DrawPanel_MouseMove(object sender, MouseEventArgs e) { if (current != null) { current.End = new Point(e.X, e.Y); DrawPanel.Invalidate(); } }
Line sieht der Einfachheit wegen nur mal so aus.
Code :1 2 3 4 5
public class Line { public Point Start; public Point End; }
Für .net 1.x statt der Liste einfach halt nen ArrayList nehmen.
MfG,
AlexWith the first link the chain is forged. The first speech censored, the first thought forbidden, the first freedom denied, chains us all irrevocably.
Aaron Satie
Legends... are the spice of the universe, Mr. Data, because they have a way of sometimes coming true.
Captain Jean-Luc Picard, Stardate ~41294.5
Tutorials.de chattet. Hier gibts auch .net Support ^^
Klickt auf chattet und nutzt den Webchat, oder verbindet euch zu irc.tutorials.de - Channel #Tutorials.de
(moo)blog furred.net // SiteInfo für WP7 // Pastebin für WP7 // BlogEngine.net Extensions
-
16.11.05 21:01 #23
Hi.
Wow, Danke!
Echt super, funktioniert.
MfG Alexander12
Ähnliche Themen
-
Dynamics Frage / allg. Frage
Von dixone im Forum Cinema 4DAntworten: 7Letzter Beitrag: 01.09.10, 23:00 -
Frage-Antwort-Frage Spiel...
Von Vitus im Forum Fun-ForumAntworten: 15Letzter Beitrag: 26.08.08, 20:14 -
ma ne frage:P
Von backfisch123456 im Forum XML TechnologienAntworten: 5Letzter Beitrag: 27.06.06, 01:50 -
[Frage:] Frage zu Passgen
Von Liftboy im Forum PHPAntworten: 6Letzter Beitrag: 04.08.05, 19:03 -
MySQL Tabellen verknüpfen (Anfänger Frage) + Frage zu Get
Von benurb im Forum PHPAntworten: 5Letzter Beitrag: 01.04.05, 13:00





Zitieren

Login





