Hej alle
Jeg er igang med at lave en converter og jeg er simpelt gået i stå ved selve koden.. lige nu har jeg designet formularende og indsat controls. Jeg har har lavet alt pånær selve konverteringen når man trykker på "Convert"
Nogle gode ideer til at starte på `? har hørt om lame og noget med bass men kan simpelthen ikke finde ud af hvor eg skal downloade det og hvad jeg i det hele taget kan bruge de programmer til .. Alt hjælp bliver værdsat
Public Class Form1
Dim Point As New System.Drawing.Point()
Dim X, Y As Integer
Dim path As String
Dim returnValue As String
'Open file
Dim inputFile As New OpenFileDialog()
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ComboBox1.SelectedIndex = 0
End Sub
Private Sub Panel1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseDown
X = Control.MousePosition.X - Me.Location.X
Y = Control.MousePosition.Y - Me.Location.Y
End Sub
Private Sub Panel1_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Panel1.MouseEnter
Panel1.Cursor = Cursors.SizeAll
End Sub
Private Sub Panel1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseMove
If e.Button = MouseButtons.Left Then
Point = Control.MousePosition
Point.X = Point.X - (X)
Point.Y = Point.Y - (Y)
Me.Location = Point
End If
End Sub
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
inputFile.Title = "Select audio file"
inputFile.Filter = "Wma-file (*.wma)|*.wma|Wav-file (*.wav)|*.wav|MP3-file (*.mp3)|*.mp3"
If inputFile.ShowDialog() = Windows.Forms.DialogResult.OK Then
TextBox1.Text = inputFile.FileName
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim outputFile As New FolderBrowserDialog()
outputFile.Description = "Select directory to output"
If outputFile.ShowDialog() = Windows.Forms.DialogResult.OK Then
Dim f As String = inputFile.FileName()
Dim s As String = f.Substring(f.LastIndexOf("\") + 1)
TextBox2.Text = outputFile.SelectedPath & "\" & System.IO.Path.GetFileNameWithoutExtension(f) & ComboBox1.SelectedItem
End If
End Sub
Private Sub PictureBox2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox2.Click
End
End Sub
Private Sub PictureBox2_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox2.MouseDown
PictureBox2.Image = mp3_Converter.My.Resources.x_002
End Sub
Private Sub PictureBox2_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox2.MouseEnter
PictureBox2.Cursor = Cursors.Hand
PictureBox2.Image = mp3_Converter.My.Resources.x_001
End Sub
Private Sub PictureBox2_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox2.MouseLeave
PictureBox2.Image = mp3_Converter.My.Resources.x_00
End Sub
Private Sub PictureBox2_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox2.MouseMove
PictureBox2.Image = mp3_Converter.My.Resources.x_001
End Sub
Private Sub PictureBox2_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox2.MouseUp
PictureBox2.Image = mp3_Converter.My.Resources.x_001
End Sub
End Class