?
Solved

Loading Screen

Posted on 2003-11-04
4
Medium Priority
?
160 Views
Last Modified: 2010-04-05
Hey,

How would I create a loading screen that fakes a load e.g
It shows a progress bar loading but Its not loading it just makes it look good ?

Cheers,

Computer Programer
0
Comment
Question by:computerprogramer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
4 Comments
 
LVL 22

Accepted Solution

by:
senad earned 200 total points
ID: 9683418
progress bar and a timer
0
 
LVL 22

Expert Comment

by:senad
ID: 9686040
Here is the code :
(Put a progress bar and a timer on the form)


unit prog;

interface

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

type
  TForm1 = class(TForm)
    ProgressBar1: TProgressBar;
    Timer1: TTimer;
    procedure FormCreate(Sender: TObject);
    procedure Timer1Timer(Sender: TObject);
    procedure FormDestroy(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.FormCreate(Sender: TObject);
begin
  ProgressBar1.Position:=0;
  Timer1.Enabled := True;
end;

procedure TForm1.Timer1Timer(Sender: TObject);
begin
  ProgressBar1.Visible:=True;
  Randomize;
  if Random(1) = 0 then ProgressBar1.Position:=ProgressBar1.Position+1;
  if (ProgressBar1.Position = 100) then
  begin

    Timer1.Enabled := False;
    ProgressBar1.Visible:=False;
    //MessageDlg('Progress Bar Finished',mtConfirmation,[MBOK],0);
    //Form1.Destroy;

 end;
end;

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

end.
0
 
LVL 22

Expert Comment

by:senad
ID: 9686052
so in progress barr increase the MAX if you want it to "play" longer ...
0
 
LVL 22

Expert Comment

by:senad
ID: 9686070
example : set max to 300 (progresss bar)
and in above code
if (ProgressBar1.Position = 300) then..
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses
Course of the Month12 days, 6 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question