bonjour,

j'ai un soft qui me permet d afficher dans une picturebobx un graphe qu il faut que j enregistre...

tt s enregistre sauf le graphe a l interieur je ne sais pas si ça vient du save ou du load voici les progs si qq a une idée ? merci

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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
 
Private Sub Sauve_gir_Click()
'Sauvegarde des données
 
 Synchro = False
'Fermeture du port comm
 If MSComm1.PortOpen = True Then
  MSComm1.PortOpen = False
 End If
 
 Timer1.Enabled = False
 
 Nom_Fichier$ = Depart.ouvre_fichier(False, "*.GIR", "GIR")
 
 If Nom_Fichier$ <> "" Then
  flag_print = True
  Open Nom_Fichier$ For Output As #2
  Print #2, nom_bateau
  Print #2, Label1
  Print #2, Label2
  Print #2, UpDown2.Value
  Print #2, Label6
  Print #2, Label7
  Print #2, Label8
  Print #2, Label9
  Print #2, Label10
  Print #2, Label11
  Print #2, Label15
  Print #2, Label16
  Print #2, Text1.Text
  Print #2, klg
  Print #2, ofset_x
  Print #2, ofset_y
  Print #2, long_drift
  Print #2, lat_drift
  Print #2, Pointeur
  Print #2, Pointe_Cercle
 
  Print #2, Picture1
  Print #2, Picture2
  Print #2, Picture3
 
  For i% = 0 To Pointeur
   Print #2, Lat(i%)
   Print #2, Lg(i%)
  Next i%
  For i% = 0 To Pointe_Cercle '- 1
   Print #2, Cercle(i%)
   'Print #2, Cap_derive(i%)
  Next i%
  Close #2
 End If
 
 
'Réactivation du port comm et des timers
 MSComm1.PortOpen = True
 Timer1.Enabled = True
 Timer2.Enabled = True
 Call Retrace(Picture1)
 
End Sub
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
 
Private Sub Sauve_Click()
'Chargement des données sauvegardées
 
 Synchro = False
'Fermeture du port comm
 If MSComm1.PortOpen = True Then
  MSComm1.PortOpen = False
 End If
 
  'Désactivation des Timer
 Timer1.Enabled = False
 Timer2.Enabled = False
 Nom_Fichier$ = Depart.ouvre_fichier(True, "*.GIR", "GIR")
 If Nom_Fichier$ <> "" Then
  Call Init_Cercle
  Command1.Visible = False
  Open Nom_Fichier$ For Input As #2
  Input #2, nom_bateau
  Frame1.Caption = "Gyration Measurement " & nom_bateau
  Label7.Visible = True
  Label8.Visible = True
  Label10.Visible = True
  Label11.Visible = True
  Input #2, A:  Label1 = A
  Line Input #2, A: Label2 = A
  Input #2, A: UpDown2.Value = A
  Input #2, A: Label6 = A
  Input #2, A: Label7 = A
  Input #2, A: Label8 = A
  Input #2, A: Label9 = A
  Input #2, A: Label10 = A
  Input #2, A: Label11 = A
  Input #2, A: Label15 = A
  Input #2, A: Label16 = A
  Input #2, A: Text1.Text = A
  Line Input #2, A: klg = CDbl(A)
  Input #2, ofset_x
  Input #2, ofset_y
  Input #2, long_drift
  Input #2, lat_drift
  Input #2, Pointeur
  Input #2, Pointe_Cercle
 
 
 
 
    For i% = 0 To Pointeur
   Line Input #2, A: Lat(i%) = CDbl(A)
   Line Input #2, A: Lg(i%) = CDbl(A)
  Next i%
 
  For i% = 0 To Pointe_Cercle - 1
   Input #2, Cercle(i%)
  Next i%
 
  Close #2
 End If
 Label23.Visible = True
 Command4.Caption = "End Replay"
 Command4.Visible = True
 Call Retrace(Picture1) 'Retraçage du Graph
 
End Sub
il y a peut etre une methode plus simple pour sauvegarder en gardant le max d info merci de bien vouloir me eclairer