Board index » delphi » Oh, "SPLASH.DFM"

Oh, "SPLASH.DFM"

Hi.
I'm a novice of Delphi.
I got some components from Internet sites, but when I install them,
an error message saying "SPLASH.DFM not found" displayed and I failed
in installing them.
If you have the file "SPLASH.DFM", please send me that.
I wait for it.
Thanks in advance.
Have a Happy New Year!!!
from Incheon, Korea.
 

Re:Oh, "SPLASH.DFM"


Baek Chang Heum <lt...@dhisys1.dwt.co.kr> wrote:

Quote
>If you have the file "SPLASH.DFM", please send me that.
>I wait for it.

Me as well!!!

Re:Oh, "SPLASH.DFM"


Quote
Stone (dyu...@terminus.com) wrote:

: Baek Chang Heum <lt...@dhisys1.dwt.co.kr> wrote:

: >If you have the file "SPLASH.DFM", please send me that.
: >I wait for it.
: Me as well!!!

Oh come on you guys! make a freakin dialog box and attach a timer to it!
sheez! Use yer heads! I am the official delphi drill seargent!

--

                               \\\\
                                0 0
                                \=/
                          tek...@charm.net
                      http://charm.net/~tekhed
                  ftp://charm.net/pub/home2/tekhed

Re:Oh, "SPLASH.DFM"


Quote
tek...@charm.net (Randy Goldstein) wrote:
>: >If you have the file "SPLASH.DFM", please send me that.
>: >I wait for it.
>: Me as well!!!

>Oh come on you guys! make a freakin dialog box and attach a timer to it!
>sheez! Use yer heads! I am the official delphi drill seargent!

SIR! <g>

Out of curiosity (I'm pretty new to Delphi, and doing some of this stuff
still seems almost easier to me with C++), if that splash screen is to be
modal with no button paraphernalia, where exactly does the timer code go;
not to mention [ModalResult := mrOk;]*. All the non-user interactive
events seem to be for form setup, and not for form running.

Actually a better example would be a modal dialog that shows a progress
bar for some executing process. Where does the code that is to be executed
in the modal system go?

I tried using the form activate event with a first line of
Application.ProcessMessages; to get the form displayed, and then calling
the code I want to execute. It *seems* to work ok, but I can't get
ModalResult to close the dialog. Nor can I get Close to close it, or any
combination of the duo. Is there a better place for the code, or should I
be doing it entirely differently. Non-Modal is not the answer I am looking
for.

??? Any help appreciated.

* Ok, so I mentioned it. Sue me.

Alan

Re:Oh, "SPLASH.DFM"


Quote
In article <30e89584.21223...@news.io.org> alpo...@io.org "Alan Popow" writes:
> tek...@charm.net (Randy Goldstein) wrote:

> >: >If you have the file "SPLASH.DFM", please send me that.
> >: >I wait for it.
> >: Me as well!!!

> >Oh come on you guys! make a freakin dialog box and attach a timer to it!
> >sheez! Use yer heads! I am the official delphi drill seargent!

> Out of curiosity (I'm pretty new to Delphi, and doing some of this stuff
> still seems almost easier to me with C++), if that splash screen is to be
> modal with no button paraphernalia, where exactly does the timer code go;
> not to mention [ModalResult := mrOk;]*. All the non-user interactive
> events seem to be for form setup, and not for form running.

This works for me:

1. create a pretty Bitmap for your splash screen  

2. Make a unit like this:
===========================================================
unit Splash;

interface

uses
  SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  Forms, ExtCtrls;

type
  TSplashForm = class(TForm)
    SplashImage: TImage;
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  SplashForm: TSplashForm;

implementation

{$R *.DFM}

procedure TSplashForm.FormCreate(Sender: TObject);
begin
     Width  := SplashImage.Width;
     Height := SplashImage.Height;
end;

end.

=========================================================
3. Create a form with settings like:

object SplashForm: TSplashForm
  BorderStyle = bsNone
  Caption = 'SplashForm'
  Font.Color = clWindowText
  PixelsPerInch = 96
  Position = poScreenCenter
  Scaled = False
  OnCreate = FormCreate
  object SplashImage: TImage {your bitmap}

and load your bitmap onto the TImage on the form.

4. In your startup code...

begin
  SplashForm := TSplashform.Create(Application);
  SplashForm.Show;
  SplashForm.Update;

  {Load your main form and stuff here}

  SplashForm.Hide;
  SplashForm.Release;  
end;  

- Chris

--
Christopher J Fynn <cf...@sahaja.demon.co.uk>

Re:Oh, "SPLASH.DFM"


Quote
Alan Popow wrote:

[snip]

Quote
> I tried using the form activate event with a first line of
> Application.ProcessMessages; to get the form displayed, and then calling
> the code I want to execute. It *seems* to work ok, but I can't get
> ModalResult to close the dialog. Nor can I get Close to close it, or any
> combination of the duo. Is there a better place for the code, or should I
> be doing it entirely differently. Non-Modal is not the answer I am looking
> for.

Try non-model but with the style set to Stay on top. This works for me.

regards,

M@!

Re:Oh, "SPLASH.DFM"


Quote
Matthew Vincent <Vincenet.Matthew...@bhp.com.au> wrote:
>> be doing it entirely differently. Non-Modal is not the answer I am looking
>> for.

>Try non-model but with the style set to Stay on top. This works for me.

No, way too easy. <g>

The problem is that with non-modal, mouseclicks, keypresses etc. are all
recognized (users are often far less well behaved than the program).
Depending on the code running, they will all then fire once it is finished
thus giving the novice user of your program;
a) a headache, or
b) heart failure.

Actually, I did finally figure it out.

In the OnActivate event of the Modal dialog, put
Application.ProcessMessages. This gets the thing shown with all it's bits
and pieces. Then still in OnActivate, call whatever routine is supposed to
do the work that this is all for.

Have a timer on the form with an interval of 1. In the OnTimer event, put
a call to kill the dialog - ie - 'Close'. Once the OnActivate event is
done, the timer will fire and kill the form.

Unless something inside the whole process is laying quietly in wait, it
seems to work.

Alan

Re:Oh, "SPLASH.DFM"


Quote
Christopher Fynn <cf...@sahaja.demon.co.uk> wrote:
>> Out of curiosity (I'm pretty new to Delphi, and doing some of this stuff
>> still seems almost easier to me with C++), if that splash screen is to be
>> modal with no button paraphernalia, where exactly does the timer code go;

>This works for me:

>4. In your startup code...

>begin
>  SplashForm := TSplashform.Create(Application);
>  SplashForm.Show;

Yahbut... Here is the thing though. I want to use a MODAL dialog. Try your
code with SplashForm.ShowModal instead, and then try to figure out where
the rest of the code goes. When you call ShowModal, the whole world stops.
Life is FAR easier with non-modal dialogs.

Actually, I finally got it to work - I was never really interested in the
splash form itself (I agree that for a splash, non-modal is just fine), I
was interested in the concept of doing code in a modal form. Take a
situation where you want to run some code and show a progress gauge. User
interaction is strictly not required, and for some things, you may
actively want the user to be shackled on the other side of the planet
while your code is running, so you want to do it with a modal dialog.
Briefly, I wanted to pop up a dialog that contains a gauge, run code using
the gauge to show progress, and kill the form at the end. All in a MODAL
dialog.

What I finally ended up with is this:

in the OnActivate event of the modal form, I put the first line of
Application.ProcessMessages; (I didn't try your Update, but that might
even be better). Then, I call the number crunching function (which also
updates the gauge) still from within the OnActivate event. That is all
that is in that event. On the form there is a timer with an interval of 1.
The OnTimer event merely calls my killform proc.

It works, but I still figure there ought to be a way to run code on a
modal form with no user interaction easily - without all this fuss. Like
an OnFinishedMessingAroundAndNowReadyToInteract event.

Anyway, thanks for replying Chris. I truly do appreciate it when people
offer help. Pretty soon now I figure I'll know enough to be unable to do
all the stuff people are able to do because they don't know they can't.

Alan

Other Threads