I got behind in reading my e-mail and missed that this was the solution to my 
problem. The use of the 1 was the better choice. If I move the line  wd 'pshow' 
 I got a frame for the picture but the toucan doesn't show up until the sound 
finishes.

require 'gui/gtkwd'
wd 'pc form closeok'
wd 'xywh 0 0 100 100;cc b1 button bs_ownerdraw;cn 
"/users/owner/j701-user/temp/toucan.bmp"'
'winmm PlaySoundA > i *c x i'&cd 'c:\users\owner\j701\willie\00will.wav';0;1
wd 'pshow'

It is quite wonderful to have these problems working again after almost 10 
years.

Thank you all for the sound and the music.

Linda

-----Original Message-----
From: programming-boun...@jsoftware.com 
[mailto:programming-boun...@jsoftware.com] On Behalf Of David Mitchell
Sent: Wednesday, February 15, 2012 9:08 AM
To: Programming forum
Subject: Re: [Jprogramming] Sound before image

Either of Bill's suggestions works for me on Win7.  Both the sound and the 
image 
appeared simultaneously regardless of the sequence of the commands.

On 2/15/2012 9:00, bill lam wrote:
> You can change the last 0 to 1 for async as suggested in my previous message.
> Or put pshow before playsound. Or both of them.  (untested)
>
> So winmm can actually play sound on vista?
>
> Срд, 15 Фев 2012, Linda Alvord писал(а):
>> If you have an image and a sound file, the sound will play before the image
>> appears. Can you reverse this somehow?
>>
>>
>>
>> Require 'gui/gtkwd'
>>
>> wd 'pc form closeok'
>>
>> wd 'xywh 0 0 100 100;cc b1 button bs_ownerdraw;cn
>> "/users/owner/j701-user/temp/toucan.bmp"'
>>
>> 'winmm PlaySoundA>  i *c x i'&cd 'c:\users\owner\j701\willie\00will.wav';0;0
>>
>> wd 'pshow'
>>
>>
>>
>> You need an image like  toucan.bmp  in  a location where you can find it.
>> You need a  .wav   with a location to test this..
>>
>>
>>
>> Linda
>>
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to