TMediaPlayer priority above TImage ???

TMediaPlayer priority above TImage ???

Post by Ciroli Ada » Sat, 17 Oct 1998 04:00:00



I have a big problem i trie all sutf and i despair

My program on button click put a image on
TImage after he call a TMediaPlayer a wav
sound.

But de order of events is that...

Click Button
Play Sound
Show Image

The natural and right order is

Click Button
Show Image
Play Sound

? Whats wrong in my program. The
TMediaPlayer have some kind of
priority more bigger than TImage
or oders component

The code is here
----------------------------------------------------------------
void __fastcall TFormPrincipal::ButtonShowClick(TObject *Sender)
{
  ImageP->Picture->LoadFromFile("IMG.BMP");

  MediaPlayer1->FileName="SOUND.WAV";

  try
  {
    MediaPlayer1->Open();
  }
  catch (...)
  {
    Close();
  }
  MediaPlayer1->Play();

Quote:}

----------------------------------------------------------------