Files
Lecteur-media/lecteur/lecteur média/Form34.vb
T
2026-06-18 14:15:48 +02:00

152 lines
7.2 KiB
VB.net

Imports System.ComponentModel
Imports System.IO
Public Class Form34
Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
Button1.Text = "Lire: " & TextBox1.Text
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
If TextBox1.Text = "" Then
MsgBox("Merci d'entrer une url", MsgBoxStyle.Information)
Else
Form1.Timer25.Stop()
Form1.ComboBox1.DropDownStyle = ComboBoxStyle.Simple
Form1.ComboBox1.SelectedText = ""
Form1.ComboBox1.DropDownStyle = ComboBoxStyle.DropDownList
Form1.AxWindowsMediaPlayer1.Ctlcontrols.stop()
Form1.AxWindowsMediaPlayer1.currentPlaylist.clear()
Form1.TextBox1.Clear()
Form1.AjoutéUnMarqueurToolStripMenuItem.Enabled = False
Form1.AjoutéAuFavorisToolStripMenuItem.Enabled = True
Dim lines4() As String = File.ReadAllLines(notification)
If lines4(0) = 0 Then
ouvrirfr2()
End If
If lines4(0) = 1 Then
ouvrirfr()
End If
End If
End Sub
Private Sub Form34_Load(sender As Object, e As EventArgs) Handles MyBase.Load
ComboBox1.SelectedIndex = 0
Dim lines1a() As String = File.ReadAllLines(théme)
If lines1a(0) = 2 Then
Me.BackColor = Color.FromArgb(64, 64, 64)
TextBox1.BackColor = Color.FromArgb(64, 64, 64)
Button1.BackColor = Color.FromArgb(64, 64, 64)
ComboBox1.BackColor = Color.FromArgb(64, 64, 64)
TextBox1.ForeColor = Color.White
ComboBox1.ForeColor = Color.White
Button1.ForeColor = Color.White
Me.ForeColor = Color.White
ElseIf lines1a(0) = 3 Then
Me.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
TextBox1.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
Button1.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
ComboBox1.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
TextBox1.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
ComboBox1.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
Button1.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
Me.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
End If
End Sub
Sub ouvrirfr2()
Form1.AjoutéAuFavorisToolStripMenuItem.Enabled = True
If ComboBox1.SelectedItem = "Musique" Then
Form1.AxWindowsMediaPlayer1.URL = TextBox1.Text
Form1.TextBox1.Text = Form1.AxWindowsMediaPlayer1.URL
Form1.PictureBox6.Hide()
Form1.PictureBox7.Hide()
Form1.PictureBox2.Hide()
Form1.PictureBox3.Show()
Form1.PictureBox4.Show()
Form1.VitesseToolStripMenuItem.Enabled = False
Form1.AllaiAToolStripMenuItem.Enabled = False
Form1.PictureBox5.Enabled = True
Form1.PictureBox6.Enabled = True
Form1.PictureBox7.Enabled = True
Form1.PleinToolStripMenuItem.Enabled = False
Form1.PauseToolStripMenuItem.Enabled = True
Form1.StopToolStripMenuItem.Enabled = True
Form1.Text = lecteurnom & ": " & Form1.AxWindowsMediaPlayer1.currentMedia.name
Close()
Else
Form1.AxWindowsMediaPlayer1.URL = TextBox1.Text
Form1.ComboBox1.Text = " "
Form1.TextBox1.Text = Form1.AxWindowsMediaPlayer1.URL
Form1.PictureBox2.Hide()
Form1.PictureBox7.Hide()
Form1.PictureBox1.Hide()
Form1.PictureBox4.Show()
Form1.VitesseToolStripMenuItem.Enabled = True
Form1.AllaiAToolStripMenuItem.Enabled = True
Form1.PictureBox5.Enabled = True
Form1.PictureBox6.Enabled = True
Form1.PictureBox7.Enabled = True
Form1.PauseToolStripMenuItem.Enabled = True
Form1.StopToolStripMenuItem.Enabled = True
Form1.PleinToolStripMenuItem.Enabled = True
Form1.Text = lecteurnom & ": " & Form1.AxWindowsMediaPlayer1.currentMedia.name
Close()
End If
End Sub
Sub ouvrirfr()
Form1.Timer7.Start()
Form1.AjoutéAuFavorisToolStripMenuItem.Enabled = True
If ComboBox1.SelectedItem = "Musique" Then
Dim lines7() As String = File.ReadAllLines(imgmusique)
If lines7(0) = 1 Then
Form1.PictureBox2.Image = Image.FromFile(lines7(2))
Else
End If
Form1.AxWindowsMediaPlayer1.URL = TextBox1.Text
Form1.TextBox1.Text = Form1.AxWindowsMediaPlayer1.URL
Form1.NotifyIcon1.BalloonTipTitle = lecteurnom
Form1.NotifyIcon1.BalloonTipText = "vous écouter:" & " " & Form1.AxWindowsMediaPlayer1.currentMedia.name
Form1.NotifyIcon1.ShowBalloonTip(1)
Form1.PictureBox7.Hide()
Form1.PictureBox2.Show()
Form1.PictureBox1.Hide()
Form1.PictureBox4.Show()
Form1.VitesseToolStripMenuItem.Enabled = False
Form1.AllaiAToolStripMenuItem.Enabled = False
Form1.PictureBox5.Enabled = True
Form1.PictureBox6.Enabled = True
Form1.PictureBox7.Enabled = True
Form1.PleinToolStripMenuItem.Enabled = False
Form1.PauseToolStripMenuItem.Enabled = True
Form1.StopToolStripMenuItem.Enabled = True
Form1.Text = lecteurnom & ": " & Form1.AxWindowsMediaPlayer1.currentMedia.name
Close()
Else
Form1.AxWindowsMediaPlayer1.URL = TextBox1.Text
Form1.ComboBox1.Text = " "
Form1.TextBox1.Text = Form1.AxWindowsMediaPlayer1.URL
Form1.PictureBox2.Hide()
Form1.PictureBox7.Hide()
Form1.PictureBox1.Hide()
Form1.PictureBox4.Show()
Form1.VitesseToolStripMenuItem.Enabled = True
Form1.AllaiAToolStripMenuItem.Enabled = True
Form1.PictureBox5.Enabled = True
Form1.PictureBox6.Enabled = True
Form1.PictureBox7.Enabled = True
Form1.PauseToolStripMenuItem.Enabled = True
Form1.StopToolStripMenuItem.Enabled = True
Form1.PleinToolStripMenuItem.Enabled = True
Form1.Text = lecteurnom & ": " & Form1.AxWindowsMediaPlayer1.currentMedia.name
Form1.NotifyIcon1.BalloonTipTitle = lecteurnom
Form1.NotifyIcon1.BalloonTipText = "vous regarder:" & " " & Form1.AxWindowsMediaPlayer1.currentMedia.name
Form1.NotifyIcon1.ShowBalloonTip(1)
Close()
End If
End Sub
Private Sub Form34_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing
TextBox1.Clear()
End Sub
End Class