Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

An Alarm in VB2008 [Need Help]

Chief

Member

so, ive got this alarm i'm making for a friend and its goin nicely. i just dont know how to get the mediaplayer to play the alarm noise... anyone know the media player controls and can help me?

here is my code so you can see it:

Code:
Public Class Form1

    Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub

    Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click
        Me.Close()
    End Sub

    Private Sub Label2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label2.Click

    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Label2.Text = TimeOfDay
        Timer1.Enabled = True
    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.Timers.ElapsedEventArgs)
        Label2.Text = TimeOfDay
    End Sub

    Private Sub Timer1_Elapsed(ByVal sender As System.Object, ByVal e As System.Timers.ElapsedEventArgs) Handles Timer1.Elapsed
        Label2.Text = TimeOfDay
        If Label2.Text = TextBox1.Text Then
            WMP

        End If
    End Sub

    Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
       
    End Sub

    Private Sub WMP_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles WMP.Enter

    End Sub
End Class


its a very simple code yet i have no idea how to finish it because  i have never used a media player
 

Chief

Member

that article wotn help me. its out of date because im using VB2008 and some of the code of the previous versions does not work in 08.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top