Bonjour,
J'ai un problème lors de la programmation d'une application VB 2010, je n'arrive pas à changer le texte d'un Label et l'image d'une ImageBox selon les valeurs d'une textBox, Je serais très reconnaissant si quelqu'un peut m'aider.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Dim x As Integer = 0 
Dim y As Integer = 0 
Dim z As Integer = 0 
 
Try 
  If ToolStripTextBox1.Text = "" Then 
 
    For i As Integer = 0 To Aramex_Gestion_PalettesDataGridView.RowCount - 1 
      If Aramex_Gestion_PalettesDataGridView.Rows(i).Cells(4).Value = "Entrée" Then 
        x = x + Aramex_Gestion_PalettesDataGridView.Rows(i).Cells(5).Value 
      Else 
        y = y - Aramex_Gestion_PalettesDataGridView.Rows(i).Cells(5).Value 
      End If 
      z = x + y 
    Next 
    Label8.Text = z 
    PictureBox2.Image = My.Resources.Material_Icons_e565_0__512 
    Label7.Text = "Bonne gestion ! Tout est en ordre." 
    If z < 0 And z > -200 Then 
      PictureBox2.Image = My.Resources.Material_Icons_e565_2__512 
      Label7.Text = "Fait attention ! La situation est risquée." 
    End If 
    If z <= -200 Then 
      PictureBox2.Image = My.Resources.Material_Icons_e565_1__512 
      Label7.Text = "Mauvaise gestion ! La situation est dangereuse." 
    End If 
 
  End If 
Catch ex As System.Exception 
  System.Windows.Forms.MessageBox.Show(ex.Message) 
End Try
Nom : Capture.PNG
Affichages : 289
Taille : 95,7 Ko

Cordialement.