标题:如何在VB界面布置背景音乐?
只看楼主
chen5322
Rank: 1
等 级:新手上路
帖 子:63
专家分:0
注 册:2006-5-25
得分:0 

Dim i As Integer
Dim a As Integer
Dim b As Integer
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

i = i + 1
Label2.Text = "背景音乐加载"

'a = 1
'b = 1
If i = (290 * (a + 1)) Then
AxWindowsMediaPlayer1.URL = Application.StartupPath & "\背景音乐\背景音乐.wav"
a = a + 1
End If
If i = 1 Then
AxWindowsMediaPlayer1.URL = Application.StartupPath & "\背景音乐\背景音乐.wav"
Label2.Text = "窗体加载"
'
f1.Show()
Me.Hide()


End If
End Sub

Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Timer1.Start()
AxWindowsMediaPlayer1.Visible = False
End Sub

Private Sub AxWindowsMediaPlayer1_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AxWindowsMediaPlayer1.Enter


End Sub

2006-12-06 20:50



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-53903-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.315038 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved