Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionPrivate Sub CreateLabel() Dim i As Integer, j As Integer, k As Integer Dim a As String k = 4230 j = 4230 Call IniReadItems(ConfigHardIniPath, "SENSORS", MySensors()) 'permet de lire le nom des objets dans notre fichier 'ConfigHard (C:\Program Files\C-Mac\ConfigHard.ini) For i = 1 To UBound(MySensors) a = IniReadString(ConfigHardIniPath, "SENSORS", MySensors(i)) cfg_Sensors() = Split(a, "") If Left(MySensors(i), 1) = "H" Then 'si notre nom de capteur ne commence pas par H pour HUMIDITY.... j = j + 600 Frm_Main.Controls.Add "VB.Label", "testlabel" With Frm_Main!testlabel(i) .Top = j .Left = 2430 .Visible = True .Width = 1215 .Caption = cfg_Sensors(3) End With End If If Left(MySensors(i), 1) = "T" Then 'si notre nom de capteur ne commence pas par T pour TEMPERATURE.... k = k + 600 Frm_Main.Controls.Add "VB.Label", "testlabel" With Frm_Main!testlabel(i) .Top = k .Left = 5670 .Visible = True .Width = 1215 .Caption = cfg_Sensors(3) End With End If Next i End Sub