Board index » delphi » Bitmap on Welcome splash form disappears/wrong colors?

Bitmap on Welcome splash form disappears/wrong colors?

Hello

I show a welcome splash form while my application starts. I create and
desrtoy it like this:

  frmWelcome := TfrmWelcome.Create(Application);
  frmWelcome.Show;
  frmWelcome.Update;
  {...}  
  Application.CreateForm();
  {...}
  frmWelcome.Free;
  Application.Run;

I use the form's canvas to draw a bitmap which I load from a resource in the
OnCreate handler. My problem is that the bitmap sometimes erases before the
splash form dissapears or, sometimes, the colors of the bitmap is wrong.

Anyone has suggestion what to do? I have'nt found much information about
palettes and so on in the documentation.

Thanks in advance

/Andreas Olsson

 

Re:Bitmap on Welcome splash form disappears/wrong colors?


Quote
In article <50cpou$...@news.lth.se>, cie95...@lustudat.student.lu.se (Andreas Olsson) wrote:
>I use the form's canvas to draw a bitmap which I load from a resource in the
>OnCreate handler. My problem is that the bitmap sometimes erases before the
>splash form dissapears or, sometimes, the colors of the bitmap is wrong.

>Anyone has suggestion what to do? I have'nt found much information about
>palettes and so on in the documentation.

It is possible that an other program {*word*30}s around with the pallettes.

X-Win32 is one of the guilty programs. Nothing you can do about this.

Happy Hacking The Graphical Gnome

----------------------------------------------
| Rob den Braasem    | Voice :-31-79-3531520 |
|                    | Fax   :-31-79-3513561 |
|                    | Mail  : r...@ktibv.nl  |
|                    |-----------------------+---------------------+
| KTI bv             | "I die when it's time for me to die.        |
| P.O. Box 86        | So let me live  my life the way I want to." |
| 2700 AB Zoetermeer |                                             |
| The Netherlands    |   Jimi Hendrix                              |
-------------------------------------------------------------------+

Re:Bitmap on Welcome splash form disappears/wrong colors?


Quote
In article <50cpou$...@news.lth.se> cie95...@lustudat.student.lu.se (Andreas Olsson) writes:
>I show a welcome splash form while my application starts. I create and
>desrtoy it like this:
>Anyone has suggestion what to do? I have'nt found much information about
>palettes and so on in the documentation.

These problems can be caused if you have a 256-color bitmap but are rendering
on a machine set for only 16 colors.

Re:Bitmap on Welcome splash form disappears/wrong colors?


Quote
Andreas Olsson wrote:

> Hello

> I show a welcome splash form while my application starts. I create and
> desrtoy it like this:

>   frmWelcome := TfrmWelcome.Create(Application);
>   frmWelcome.Show;
>   frmWelcome.Update;
>   {...}
>   Application.CreateForm();
>   {...}
>   frmWelcome.Free;
>   Application.Run;

> I use the form's canvas to draw a bitmap which I load from a resource in the
> OnCreate handler. My problem is that the bitmap sometimes erases before the
> splash form dissapears or, sometimes, the colors of the bitmap is wrong.

> Anyone has suggestion what to do? I have'nt found much information about
> palettes and so on in the documentation.

> Thanks in advance

> /Andreas Olsson

I would try Refresh instead of update.  I have found this to work flawlessly.

--
Mark.

Other Threads