>Hello again
>
>Added a timer to a form that displays test questions.
>
>Timer Interval = 500
>Timer event code is:
>
>if Thisform.lblTime.Caption <> time()
> Thisform.lblTime.Caption = time()
>endif
>
>
>There is another label on the form that informs the student the time at which the test will end (FinishTime).
>
>Data is held on the server, logic for the screen is
>
>Has time() exceeded FinishTime
>if yes
> exit application
>else
> get next question from tables
> display question stemulus and answer choices on screen (with @says and general fields
don't ask> wait through a for loop (1 - 5,000,000 counter)
> call Windows Sound Player to play recorded portion of question
> ask for student response
> 'grade' response and calculate next question value
>endif
>
>Rinse and repeat above until calculations hit a specific value, or time exceeded, then score and exit test.
>
>This is in 8 labs, each having 19 stations
>
>Now, to make a long story even longer, here's the issue
>
>Since I've added the timer, what were seeing, beginning when we hit what I'd consider a moderate load on the network, is that the sound plays first, then the choices display on the screen.
>
>Would increasing the timer interval help with this? If not, any ideas?
>
>Thanks
>
>D
How do you play the sound ? Is it with
http://msdn.microsoft.com/en-us/library/windows/desktop/dd798676(v=vs.85).aspxIf yes, try playing it ASYNC and see whether it helps
The flags you would be using
bitor(SND_NODEFAULT, SND_ASYNC)
#define SND_SYNC 0x0000
#define SND_ASYNC 0x0001
#define SND_NODEFAULT 0x0002
#define SND_MEMORY 0x0004
#define SND_LOOP 0x0008
Or
Display the choices first + DOEVENTS + play the sound
Gregory