preload a resource into memory?

  • Thread starter Thread starter JamesB
  • Start date Start date
J

JamesB

In my app, I have an embedded small .wav file that plays when the user hover
over certain items. It works fine, apart from the very first time, where it
is delayed slightly; presumably as it is loaded into memory.
Is there a way I can "pre-load" this when the application starts?
 
you can load the wav file into a stream using GetManifestResourceStream when
the object is first created. That way you
can access the in-memory stream at any time and play it.

Peter
 
Back
Top