Non le logiciel n'est pas sur le telephone, il permet de le gerer depuis windows.
Imports System.IO
Public Class Form4
Private Sub Form4_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
End Sub
Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim texte As String
texte = TextBox1.Text
Dim titre As String
titre = TextBox2.Text
If Not titre$ = "" And Not texte$ = "" Then
Dim SW As StreamWriter = File.CreateText("D:\" & titre & ".txt" )
SW.WriteLine(texte$)
SW.Close()
Else : MsgBox("Vous n'avez pas renseigné tous les champs disponibles" )
End If
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
OpenFileDialog1.Filter = "Fichiers image (*.jpg)|*.jpg"
OpenFileDialog1.ShowDialog()
ListBox1.Items.Add(Path.GetFileName(OpenFileDialog1.FileName))
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
ListBox1.Items.Remove(ListBox1.SelectedItem)
If Not (PictureBox1.Image Is Nothing) Then
PictureBox1.Image.Dispose()
PictureBox1.Image = Nothing
End If
End Sub
Private Sub TextBox3_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox3.TextChanged
TextBox3.Text = OpenFileDialog1.FileName
End Sub
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
Dim CheminFichier As String
CheminFichier = OpenFileDialog1.FileName
PictureBox1.Image = Image.FromFile(Path.GetFullPath(ListBox1.SelectedItem))
Dim img As Image = PictureBox1.Image
Dim bmp As New Bitmap(img, Me.PictureBox1.Width, Me.PictureBox1.Height)
Me.PictureBox1.Image = bmp
End Sub
Private Sub ToolStripProgressBar2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripProgressBar2.Click
ToolStripProgressBar1.Style = ProgressBarStyle.Marquee
End Sub
Private Sub ToolStripProgressBar1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
ToolStripProgressBar1.Style = ProgressBarStyle.Marquee
End Sub
Private Sub MenuStrip2_ItemClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolStripItemClickedEventArgs)
End Sub
Private Sub ToolStripComboBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub NouveauToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NouveauToolStripMenuItem1.Click
TextBox1.Clear()
TextBox2.Clear()
End Sub
Private Sub EnregistrersousToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EnregistrersousToolStripMenuItem1.Click
Dim CheminFichier As String
SaveFileDialog1.Filter = "Fichiers texte (*.txt)|*.txt"
SaveFileDialog1.FileName = "Document"
SaveFileDialog1.ShowDialog()
CheminFichier = SaveFileDialog1.FileName
Dim Fichier As New System.IO.StreamWriter(CheminFichier)
Fichier.Write(TextBox1.Text)
Fichier.Close()
End Sub
Private Sub ÀproposdeToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ÀproposdeToolStripMenuItem.Click
Dim myAboutBox1 As New AboutBox1()
myAboutBox1.Show()
End Sub
Private Sub ToutEnMajusculesToolStripMenuItem_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToutEnMajusculesToolStripMenuItem.Click
TextBox1.Text = TextBox1.Text.ToUpper
End Sub
Private Sub ToutEnMinusculesToolStripMenuItem_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToutEnMinusculesToolStripMenuItem.Click
TextBox1.Text = TextBox1.Text.ToLower
End Sub
Private Sub OuvrirToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OuvrirToolStripMenuItem1.Click
Dim CheminFichier As String
OpenFileDialog1.Filter = "Fichiers texte (*.txt)|*.txt"
OpenFileDialog1.ShowDialog()
CheminFichier = OpenFileDialog1.FileName
Try
Dim Fichier As New System.IO.StreamReader(CheminFichier)
TextBox1.Text = Fichier.ReadToEnd
Fichier.Close()
Catch ex As System.Exception
MsgBox("Impossible d'ouvrir le fichier, il est peut être en cours d'utilisation" )
Finally
End Try
End Sub
Private Sub EnregistrerToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EnregistrerToolStripMenuItem1.Click
Dim texte As String
texte = TextBox1.Text
Dim titre As String
titre = TextBox2.Text
If Not titre$ = "" And Not texte$ = "" Then
Dim SW As StreamWriter = File.CreateText("C:\" & titre & ".txt" )
SW.WriteLine(texte$)
SW.Close()
Else : MsgBox("Vous n'avez pas renseigné tous les champs disponibles" )
End If
End Sub
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Dim lettre As String
DriveInfo.GetDrives()
For Each di As DriveInfo In DriveInfo.GetDrives()
lettre = di.Name
If di.IsReady Then
MsgBox(di.VolumeLabel)
End If
If di.VolumeLabel = "MYPHONE" Then
End If
Next
End Sub
End Class
Message édité par moimael le 27-01-2007 à 18:06:57