Jump to content


Photo

Como se crea un degradado para un form?


  • Please log in to reply
3 replies to this topic

#1 FGarcia

FGarcia

    Advanced Member

  • Miembro Platino
  • PipPipPip
  • 687 posts
  • LocationMéxico

Posted 03 June 2009 - 03:08 PM

Pues solo eso ¿Como se crea un degradado para un form?

Saludos!
  • 0

#2 Faust

Faust

    Advanced Member

  • Miembro Platino
  • PipPipPip
  • 213 posts
  • LocationDistrito Federal

Posted 03 June 2009 - 04:02 PM

De volada hice esto:



delphi
  1. procedure TfrmMain.FormPaint(Sender: TObject);
  2. var i, Rows: Integer;
  3. begin
  4.   Rows:= frmMain.ClientHeight div 24;
  5.   for i:= 0 to 24 do
  6.   begin
  7.     frmMain.Canvas.Brush.Color:= RGB(255 - (i*2), 255 - i, 255);
  8.     frmMain.Canvas.FillRect(Rect(0, Rows * i, frmMain.ClientWidth, Rows * i * 2))
  9.   end;
  10. end;
  11.  
  12. procedure TfrmMain.FormResize(Sender: TObject);
  13. begin
  14.   Repaint
  15. end;



Estoy seguro que hay mejores formas de hacerlo.
  • 0

#3 enecumene

enecumene

    Webmaster

  • Administrador
  • 7419 posts
  • LocationRepública Dominicana

Posted 03 June 2009 - 05:53 PM

Tal vez te sirva esto:

http://delphi.about....adient_fill.htm

Saludos.
  • 0

#4 FGarcia

FGarcia

    Advanced Member

  • Miembro Platino
  • PipPipPip
  • 687 posts
  • LocationMéxico

Posted 04 June 2009 - 09:57 AM

Vale!
Generalmente busco respuestas ahi en About, se me olvido hacerlo esta vez.

Gracias.
  • 0




IP.Board spam blocked by CleanTalk.