Click here to Skip to main content
15,902,198 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralVB-6 Menus Pin
N4LXL7-Jul-04 3:06
N4LXL7-Jul-04 3:06 
GeneralRe: VB-6 Menus Pin
Dave Kreskowiak7-Jul-04 5:27
mveDave Kreskowiak7-Jul-04 5:27 
Generalsetting the track bar control Pin
Prowess6-Jul-04 23:29
Prowess6-Jul-04 23:29 
GeneralRe: setting the track bar control Pin
hpAng6-Jul-04 23:49
hpAng6-Jul-04 23:49 
GeneralRe: setting the track bar control Pin
Prowess7-Jul-04 0:23
Prowess7-Jul-04 0:23 
GeneralAdding User-Controlled Sound to Visual Basic .NET Pin
6-Jul-04 20:58
suss6-Jul-04 20:58 
GeneralRe: Adding User-Controlled Sound to Visual Basic .NET Pin
hpAng6-Jul-04 21:33
hpAng6-Jul-04 21:33 
GeneralRe: Adding User-Controlled Sound to Visual Basic .NET Pin
hpAng6-Jul-04 23:11
hpAng6-Jul-04 23:11 
This is the code, just paste it into a form with 1 command button.

Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim media As OpenFileDialog = New OpenFileDialog
media.RestoreDirectory = True
If media.ShowDialog = DialogResult.OK Then
Dim waveFile As String = media.FileName
Dim extension As String = System.IO.Path.GetExtension(waveFile)
If (extension.ToLower() = ".wav") Then
PlaySound(waveFile, 0, &H8)
End If
End If
End Sub

hope that help.

anghp@yahoo.com
Feel free to email or yahoo messenger.
Generalquery interface in VB??..... Pin
kunja_chan6-Jul-04 11:15
kunja_chan6-Jul-04 11:15 
GeneralRe: query interface in VB??..... Pin
beowulfagate6-Jul-04 13:52
beowulfagate6-Jul-04 13:52 
GeneralRe: query interface in VB??..... Pin
The Man from U.N.C.L.E.19-Jul-04 7:29
The Man from U.N.C.L.E.19-Jul-04 7:29 
GeneralDisplay Images Pin
Brad Fackrell6-Jul-04 8:43
Brad Fackrell6-Jul-04 8:43 
GeneralRe: Display Images Pin
beowulfagate6-Jul-04 13:49
beowulfagate6-Jul-04 13:49 
QuestionTwo listboxes on same form appear linked? Pin
drluggo6-Jul-04 3:20
drluggo6-Jul-04 3:20 
AnswerRe: Two listboxes on same form appear linked? Pin
Dave Kreskowiak6-Jul-04 4:24
mveDave Kreskowiak6-Jul-04 4:24 
GeneralAccessing parallel port by using VB.Net Pin
marcus_gsh5-Jul-04 21:23
sussmarcus_gsh5-Jul-04 21:23 
GeneralRe: Accessing parallel port by using VB.Net Pin
Dave Kreskowiak6-Jul-04 2:54
mveDave Kreskowiak6-Jul-04 2:54 
GeneralRe: Accessing parallel port by using VB.Net Pin
marcus_gsh7-Jul-04 20:07
sussmarcus_gsh7-Jul-04 20:07 
GeneralMail program in VB6 Pin
Ravi S.V.5-Jul-04 19:34
Ravi S.V.5-Jul-04 19:34 
GeneralRe: Mail program in VB6 Pin
Hesham Amin5-Jul-04 22:12
Hesham Amin5-Jul-04 22:12 
GeneralQuestion for the VB guys Pin
#realJSOP5-Jul-04 15:55
professional#realJSOP5-Jul-04 15:55 
QuestionProblems in VB.net? Pin
mythinky5-Jul-04 15:39
mythinky5-Jul-04 15:39 
AnswerRe: Problems in VB.net? Pin
Colin Angus Mackay6-Jul-04 1:00
Colin Angus Mackay6-Jul-04 1:00 
AnswerRe: Problems in VB.net? Pin
Dave Kreskowiak6-Jul-04 3:10
mveDave Kreskowiak6-Jul-04 3:10 
AnswerRe: Problems in VB.net? Pin
Martin Dionne14-Jul-04 12:07
Martin Dionne14-Jul-04 12:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.