¿Quieres reaccionar a este mensaje? Regístrate en el foro con unos pocos clics o inicia sesión para continuar.

Carreras de Progress bar xD

Ir abajo

Carreras de Progress bar xD Empty Carreras de Progress bar xD

Mensaje  [G]host Mar Jul 19, 2011 7:12 am

Bueno ya tenia mucho sín programar en pascal y viendo videitos en yt Suspect mire varios que decian más o menos así carrera de barras de progreso, tipos de barras de progreso y cuanto más se les ocurra xD, bueno el caso es que me puse ah hacer lo mismo en Delphi 2009 ( maldito ocio lol! ).

Bueno sin mas que agregar en esta odisea les pondre el codigo.


Código:
unit SuperProgress_MainForm;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ComCtrls, StdCtrls, ExtCtrls;

type
  TFormSuperProgress = class(TForm)
    ProgressBar1: TProgressBar;
    ProgressBar2: TProgressBar;
    ProgressBar3: TProgressBar;
    btnLoop: TButton;
    btnJump: TButton;
    btnJumpBack: TButton;
    RadioGroup1: TRadioGroup;
    procedure btnLoopClick(Sender: TObject);
    procedure btnJumpClick(Sender: TObject);
    procedure btnJumpBackClick(Sender: TObject);
    procedure RadioGroup1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FormSuperProgress: TFormSuperProgress;

implementation

{$R *.dfm}

procedure TFormSuperProgress.btnJumpBackClick(Sender: TObject);
begin
  ProgressBar2.Position := (ProgressBar2.Position - 40) mod 100;
  ProgressBar3.Position := (ProgressBar3.Position - 40) mod 100;
end;

procedure TFormSuperProgress.btnJumpClick(Sender: TObject);
begin
  ProgressBar2.Position := (ProgressBar2.Position + 20) mod 100;
  ProgressBar3.Position := (ProgressBar3.Position + 20) mod 100;
end;

procedure TFormSuperProgress.btnLoopClick(Sender: TObject);
var
  I: Integer;
begin
  for I := 0 to 99 do
  begin
    ProgressBar2.Position := I*2 mod 100;
    ProgressBar3.Position := I*2 mod 100;
    Application.ProcessMessages;
    Sleep (100);
    Caption := 'SuperProgress ' + IntToStr (I);
  end;
end;

procedure TFormSuperProgress.RadioGroup1Click(Sender: TObject);
begin
  case RadioGroup1.ItemIndex of
    0: ProgressBar2.State := pbsNormal;
    1: ProgressBar2.State := pbsError;
    2: ProgressBar2.State := pbsPaused;
  end;
end;

end.


Algunas capturas de pantalla (hmm solo 2 xD)


Carreras de Progress bar xD Creand10


Carreras de Progress bar xD Carrer10
[G]host
[G]host
Admin

Mensajes : 67
Puntos : 204
Reputación : 0
Fecha de inscripción : 24/10/2010
Edad : 33

https://ghost.activo.mx

Volver arriba Ir abajo

Volver arriba


 
Permisos de este foro:
No puedes responder a temas en este foro.