Public Class Form1
' This SoundPlayer plays a sound whenever the player hits a wall.
Private startSoundPlayer = New System.Media.SoundPlayer("C:\Windows\Media\chord.wav")
' This SoundPlayer plays a sound when the player finishes the game.
Private finishSoundPlayer = New System.Media.SoundPlayer("C:\Windows\Media\tada.wav")
PrivateSub MoveToStart()
startSoundPlayer.Play()
Dim startingPoint = Panel1.Location
startingPoint.Offset(10, 10)
Cursor.Position = PointToScreen(startingPoint)
EndSub
在MSDN的VB tutor2中,这个句子startSoundPlayer.Play(),我在VS2010的环境中,发现startSoundPlayer对象IDE找不到Play()的成员函数,
如果自己强行输入Play()的话,IDE报错。
请帮忙看下这是什么原因呢?