Showing posts from October, 2012


Ahmed Samir

Evry1falls is my online name

Visual Basic 2010 - Button Sound / Music Play

Visual Basic 2010 - Button SoundThe code is simply goes like this You can copy and paste in your (Click_Event) or whatever it is you wish (MouseClick - MouseHover - MouseLeave) :

Dim MySound AsNew System.Media.SoundPlayer()  MySound.SoundLocation = "path to the .Wav file"MySound.Load()MySound.Play()' OR you can use this :Sub PlaySystemSound()My.Computer.Audio.PlaySystemSound(
End Sub
Background playing It lets the application execute other code while the sound plays. The My.Computer.Audio.Play method allows the application to play only one background sound at a time; when the application plays a new background sound, it stops playing the previous background sound. You can also play a sound and wait for it to complete.
For Visual Basic 2010 and in general, when an application plays a looping sound, it should eventually stop the sound. For more information, see How to: Stop Playing Sounds in the Background in Visual Basic 2010. Example The

Visual Basic Online Course ProgressBar

Visual Basic 2010 Progress Bar Control Using the ProgressBar control Example : - Create New Windows Project - Button1 - ProgressBar1

- Logic:

We will generate 4 MessageBoxes by clicking the Button1 Control and everytime a messagebox shows up, a ProgressBar step will be taken.
Progress Bar Class : In .Net Framework 4.0 A ProgressBar control consists of a window that is filled, by default from left to right, as an operation progresses. The control has a range and a current position. ProgressBar overrides the metadata of the Maximum property and sets its default to 100. ProgressBar overrides the metadata of the Focusable property and sets its default to false. For more information, see Dependency Properties Overview.

Customizing the ProgressBar Control To apply the same property settings to multiple Progress Bar controls, use the Style property. You can modify the default ControlTemplate to give the control a unique appearance. For more information about creating a ControlTemplate, see …

Comment Via facebook