AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Windows 8-Kopier-Dialog nachbasteln?

Ein Thema von dGeek · begonnen am 27. Aug 2016 · letzter Beitrag vom 29. Aug 2016
Antwort Antwort
dGeek
(Gast)

n/a Beiträge
 
#1

AW: Windows 8-Kopier-Dialog nachbasteln?

  Alt 27. Aug 2016, 21:53
Sieht doch schonmal lustig aus (Screenshot)

Delphi-Quellcode:
var
 Form1: TForm1;
 iRandom, iCnt, iCnt2, iNegative, bmpWidth, iOldY: Integer;
 bmp: TBitmap;

const
 cPenColor = $0079C579;
 cTopColor = $00359E35;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
 Timer1.Enabled := not Timer1.Enabled;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
 Randomize;
 iRandom := 50;
 iCnt := 1;
 iCnt2 := 0;
 iNegative := 0;

 bmp := TBitmap.Create;
 bmp.Canvas.Pen.Width := 1;
 bmp.Width := PaintBox1.Width;
 bmp.Height := PaintBox1.Height;
 bmpWidth := bmp.Width;
end;

procedure TForm1.FormDestroy(Sender: TObject);
begin
 bmp.Free;
end;

procedure TForm1.PaintBox1Paint(Sender: TObject);
var
 xPos: Integer;
begin
 if iNegative < 0 then
  begin
   xPos := iNegative;
   bmp.Width := bmp.Width + (xPos * -1);
   bmpWidth := bmp.Width + (iNegative * -1);
  end
 else
  begin
   xPos := 0;
   bmpWidth := bmp.Width;
  end;

 BitBlt(PaintBox1.Canvas.Handle, xPos, 0, bmpWidth, bmp.Height, bmp.Canvas.Handle, 0, 0, SrcCopy);
end;

procedure TForm1.Timer1Timer(Sender: TObject);
var
 tmpRand: Integer;
begin
 if iCnt > 0 then
  begin
   repeat
    tmpRand := RandomRange(iRandom - 10, iRandom + 10);

   until tmpRand > 20;
  end;

 iRandom := tmpRand;
 iNegative := PaintBox1.Width - iCnt;

 Caption := IntToStr(iRandom) + ' ' + IntToStr(iNegative) + ' ' + IntToStr(bmpWidth) + ' ' +
  IntToStr(iOldY);

 bmp.Canvas.Pen.Color := cPenColor;
 bmp.Canvas.MoveTo(iCnt, PaintBox1.Height);
 bmp.Canvas.LineTo(iCnt, iRandom);

 bmp.Canvas.Pen.Color := cTopColor;
 bmp.Canvas.MoveTo(iCnt, iRandom);
 bmp.Canvas.LineTo(iCnt, iRandom - 2);

 // bmp.Canvas.Pixels[iCnt, iOldY] := clRed;

 PaintBox1.Repaint;

 inc(iCnt);
 iOldY := iRandom;
end;
Angehängte Grafiken
Dateityp: png Unbenannt.png (22,4 KB, 64x aufgerufen)
  Mit Zitat antworten Zitat
HolgerX

Registriert seit: 10. Apr 2006
Ort: Leverkusen
978 Beiträge
 
Delphi 6 Professional
 
#2

AW: Windows 8-Kopier-Dialog nachbasteln?

  Alt 28. Aug 2016, 10:25
Hmm..

Ich habe den unter #1 angehängten Kopierdialog im JDownloader2 gesehen, somit sollte dieser auch in anderen Applikation eingebunden werden können..
Und JDownloader2 ist wenn ich es richtig verstanden habe Java..
  Mit Zitat antworten Zitat
Benutzerbild von himitsu
himitsu

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
44.326 Beiträge
 
Delphi 12 Athens
 
#3

AW: Windows 8-Kopier-Dialog nachbasteln?

  Alt 29. Aug 2016, 13:42
Sieht doch schonmal lustig aus (Screenshot)
Windows zeigt nicht die Realdaten an, sondern glättet die Ausgabe.
Quasi jeweils ein "Mittelwert" über die letzten Paar Pixel/Sekunden/Minuten,
drum sieht es dort nicht so eckig aus.
Ein Therapeut entspricht 1024 Gigapeut.
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 06:20 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz