Imports System.IO Imports AxWindowsMediaPlayer1 = AxWMPLib Public Class Csv Dim ResourceFilePath As String Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click SelectPageList.Show() Me.Close() End Sub Private Sub AxWindowsMediaPlayer1_Enter(sender As Object, e As EventArgs) Handles AxWindowsMediaPlayer1.Enter ' Determine the Resource File Path If System.Diagnostics.Debugger.IsAttached() Then 'Debugging mode ResourceFilePath = System.IO.Path.GetFullPath(Application.StartupPath & "\..\..\resources\") Else 'Published mode ResourceFilePath = Application.StartupPath & "\resources\" End If ' Specify the avi file AxWindowsMediaPlayer1.URL = ResourceFilePath & "\\csv.avi" ' Media Player automatically plays file by default End Sub Private Sub Csv_Load(sender As Object, e As EventArgs) Handles MyBase.Load End Sub End Class
firstRun
You have to use a variable, for example: firstRun. You can store it somewhere: resources, file, etc.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)