|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Playing System Sounds/WAV filesCan someone please point me in the right direction as to how to play
system sounds and/or WAV files from a VS.Net 2003 application. I can find plenty of info about how easy it is with VS2005, but from VS.Net 2003 I can only find the Windows Multimedia article about the Statement: PlaySound("MouseClick", NULL, SND_SYNC). But how do I use this statement? With thanks Dave "Devlei" <dev***@eastcape.net> schrieb
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_playsound.asp
> Can someone please point me in the right direction as to how to play > system sounds and/or WAV files from a VS.Net 2003 application. > > I can find plenty of info about how easy it is with VS2005, but from > VS.Net 2003 I can only find the Windows Multimedia article about the > Statement: PlaySound("MouseClick", NULL, SND_SYNC). But how do I > use this statement? Declaration: Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" _ (ByVal lpszName As String, ByVal hModule As IntPtr, _ ByVal dwFlags As Integer) As Boolean You can overload the declaration depending on what you are passing to the function. See also: http://groups.google.com/groups?as_q=PlaySound&num=10&scoring=d&as_ugroup=microsoft.public.dotnet.languages.vb includes this link posted by Herfried: http://dotnet.mvps.org/dotnet/code/misc/#PlaySound Armin "Devlei" <dev***@eastcape.net> schrieb: ..NET 1.*:> Can someone please point me in the right direction as to how to play > system sounds and/or WAV files from a VS.Net 2003 application. > > I can find plenty of info about how easy it is with VS2005, but from > VS.Net 2003 I can only find the Windows Multimedia article about the > Statement: PlaySound("MouseClick", NULL, SND_SYNC). But how do I use > this statement? Implementing a message box with standard behavior <URL:http://dotnet.mvps.org/dotnet/faqs/?id=custommsgbox&lang=en> <URL:http://dotnet.mvps.org/dotnet/code/misc/#PlaySound> <URL:http://www.mentalis.org/soft/class.qpx?id=14> <URL:http://www.mentalis.org/soft/class.qpx?id=1> ..NET 2.0: Some system sounds can be played using 'System.Media.SystemSounds' (<URL:http://msdn2.microsoft.com/de-de/library/system.media.systemsounds.aspx>), wave files can be played using the 'System.Media.SoundPlayer' class (<URL:http://msdn2.microsoft.com/en-us/library/system.media.soundplayer.aspx>). -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> Thanks for the various links!!! I copied the sample from your
'Verschiedenes' web page, but get the following error: An unhandled exception of Type System.NullReferenceException occurred in PlaySounds.exe Additional Information: Object Reference not set to an instance of an object It occurs at the line : Dim Length As Integer = CInt(st.Length) Could you help a newbie further? With thanks Dave
Open a Text File in Notepad using VB.Net 2005
I miss loop [Help] Reading data from a DLL structure in C best way to tell if a date is not assigned? Where is ThisWorkbook.Sheets("xx") ?? Unable to resolve 'ThisWorkbook' :: Interop to Excel Visual Basic .NET Resource Kit running balance in datagrid what should i use? bindingsource Different ways to go about storing data in an xml file.. |
|||||||||||||||||||||||