IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

 Delphi Discussion :

Copier le contenu d'un Edit dans une nouvelle Form


Sujet :

Delphi

  1. #1
    Membre du Club
    Profil pro
    Inscrit en
    Février 2008
    Messages
    108
    Détails du profil
    Informations personnelles :
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations forums :
    Inscription : Février 2008
    Messages : 108
    Points : 61
    Points
    61
    Par défaut Copier le contenu d'un Edit dans une nouvelle Form
    Bonjour,

    Je débute en turbo delphi 6 (autodidacte depuis une semaine...) et je voudrais savoir comment copier le contenu d'un Edit d'une Form1 dans le labelx d'une Form2.

    J'utilise Form2.activate, mais je ne sais pas quoi déclarer après :
    label2.caption := ????

    form1.edit3.text? mais cela ne marche pas.

    Merci d'avance pour l'aide.

  2. #2
    Membre chevronné Avatar de philnext
    Profil pro
    Inscrit en
    Octobre 2002
    Messages
    1 552
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2002
    Messages : 1 552
    Points : 1 780
    Points
    1 780
    Par défaut
    ben pourtant
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    label2.caption := form1.edit3.text;
    ça me semblait de bon goût...

  3. #3
    Rédacteur/Modérateur
    Avatar de ero-sennin
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Juillet 2005
    Messages
    2 965
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 37
    Localisation : France, Nord (Nord Pas de Calais)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juillet 2005
    Messages : 2 965
    Points : 4 935
    Points
    4 935
    Par défaut
    Salut et Bienvenue sur Developpez.com

    Pour ton soucis et pour faire relativement simple, il faut savoir que les Form que tu créées, génère une nouvelle unité (unit1, unit2 ... par défaut).

    Donc depuis Form2, si tu veux accéder au Edit1 de la Form1, il te faut dire à Delphi d'inclure l'unité Unit1 dans Unit2 (Form2 donc).
    Pour cela, tu fais (à partir de la Form2) :
    - Fichier
    - Utilisé l'unité
    - Choisir Unit1 (correspond à Form1 par défaut)

    Maintenant, la Form2 connait l'existence d'une second Form, qui est, si tu n'as rien modifié, Form1.

    Tu peux donc accéder au contenu de la Form1 ...
    Exemple :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    procedure TForm2.FormActivate(Sender: TObject);
    begin
      Label1.Caption:=Form1.Edit1.Text;
    end;
    J'espère que c'est plus clair désormais.
    A+

  4. #4
    Membre du Club
    Profil pro
    Inscrit en
    Février 2008
    Messages
    108
    Détails du profil
    Informations personnelles :
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations forums :
    Inscription : Février 2008
    Messages : 108
    Points : 61
    Points
    61
    Par défaut
    merci pour l'encouragement, mais je ne vois pas ce qui cloche dans cette pauvre ligne de code!

    Ma Form1 s'appell DET1
    Ma form2 s'appelle Recap.

    cela viendrait il de là?

    Cela m'étonnerait, car j'ai déjà essayé!

  5. #5
    Membre du Club
    Profil pro
    Inscrit en
    Février 2008
    Messages
    108
    Détails du profil
    Informations personnelles :
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations forums :
    Inscription : Février 2008
    Messages : 108
    Points : 61
    Points
    61
    Par défaut
    Merci. mon problème se solutionne petit à petit.

    Quand je fais un test, le programme plante sur ma Form1

    [Pascal Erreur] dethermine.pas(107): E2065 Déclaration forward ou external non satisfaite : 'TForm1.FormCreate'
    [Pascal Erreur fatale] Projetdethermine.dpr(14): F2063 Impossible de compiler l'unité utilisée 'dethermine.pas'

    Pourquoi?

  6. #6
    Rédacteur/Modérateur
    Avatar de ero-sennin
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Juillet 2005
    Messages
    2 965
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 37
    Localisation : France, Nord (Nord Pas de Calais)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juillet 2005
    Messages : 2 965
    Points : 4 935
    Points
    4 935
    Par défaut
    Montre nous le code entier de l'unit stp. L'erreur provient d'autre part à en croire le message d'erreur

  7. #7
    Membre du Club
    Profil pro
    Inscrit en
    Février 2008
    Messages
    108
    Détails du profil
    Informations personnelles :
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations forums :
    Inscription : Février 2008
    Messages : 108
    Points : 61
    Points
    61
    Par défaut
    bon je ne sais pas si ce code est très académique au vue des puriste qui se trouvent en face de moi... mais bon je suis autodidacte. merci pour l'indulgence.

    Voici mon oeuvre :

    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
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
    467
    468
    469
    470
    471
    472
    473
    474
    475
    476
    477
    478
    479
    480
    481
    482
    483
    484
    485
    486
    487
    488
    489
    490
    491
    492
    493
    494
    495
    496
    497
    498
    499
    500
    501
    502
    503
    504
    505
    506
    507
    508
    509
    510
    511
    512
    513
    514
    515
    516
    517
    unit dethermine;
     
    interface
     
    uses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, ComCtrls, StdCtrls, ExtCtrls, Menus;
     
    type
      TForm1 = class(TForm)
        ComboBoxEx1: TComboBoxEx;
        ComboBoxEx2: TComboBoxEx;
        ComboBoxEx3: TComboBoxEx;
        RadioGroup1: TRadioGroup;
        CheckBox1: TCheckBox;
        CheckBox2: TCheckBox;
        CheckBox3: TCheckBox;
        CheckBox4: TCheckBox;
        CheckBox5: TCheckBox;
        CheckBox6: TCheckBox;
        CheckBox7: TCheckBox;
        CheckBox8: TCheckBox;
        RadioButton1: TRadioButton;
        RadioButton2: TRadioButton;
        CheckBox9: TCheckBox;
        CheckBox10: TCheckBox;
        CheckBox11: TCheckBox;
        CheckBox12: TCheckBox;
        RadioGroup2: TRadioGroup;
        RadioButton3: TRadioButton;
        RadioButton4: TRadioButton;
        RadioButton5: TRadioButton;
        RadioButton6: TRadioButton;
        RadioButton7: TRadioButton;
        RadioButton8: TRadioButton;
        RadioButton9: TRadioButton;
        RadioButton10: TRadioButton;
        RadioButton11: TRadioButton;
        RadioButton12: TRadioButton;
        RadioButton13: TRadioButton;
        RadioButton14: TRadioButton;
        RadioButton15: TRadioButton;
        Edit1: TEdit;
        Edit2: TEdit;
        Label1: TLabel;
        Edit3: TEdit;
        Label2: TLabel;
        Label3: TLabel;
        Label4: TLabel;
        Label5: TLabel;
        Label6: TLabel;
        Label7: TLabel;
        Label8: TLabel;
        Label9: TLabel;
        Label10: TLabel;
        Label11: TLabel;
        Label12: TLabel;
        Label13: TLabel;
        Label14: TLabel;
        Label15: TLabel;
        Label16: TLabel;
        Label17: TLabel;
        Label18: TLabel;
        Label19: TLabel;
        Label20: TLabel;
        Button1: TButton;
        Label21: TLabel;
        Button2: TButton;
        Button3: TButton;
        Button4: TButton;
        procedure Edit2Change(Sender: TObject);
        procedure Edit1Change(Sender: TObject);
        procedure ComboBoxEx1Change(Sender: TObject);
        procedure ComboBoxEx2Change(Sender: TObject);
        procedure ComboBoxEx3Change(Sender: TObject);
        procedure CheckBox1Click(Sender: TObject);
        procedure CheckBox2Click(Sender: TObject);
        procedure CheckBox3Click(Sender: TObject);
        procedure CheckBox4Click(Sender: TObject);
        procedure CheckBox5Click(Sender: TObject);
        procedure CheckBox6Click(Sender: TObject);
        procedure CheckBox7Click(Sender: TObject);
        procedure CheckBox8Click(Sender: TObject);
        procedure RadioButton1Click(Sender: TObject);
        procedure RadioButton2Click(Sender: TObject);
        procedure CheckBox9Click(Sender: TObject);
        procedure CheckBox10Click(Sender: TObject);
        procedure CheckBox11Click(Sender: TObject);
        procedure CheckBox12Click(Sender: TObject);
        procedure RadioButton3Click(Sender: TObject);
        procedure RadioButton4Click(Sender: TObject);
        procedure RadioButton5Click(Sender: TObject);
        procedure RadioButton6Click(Sender: TObject);
        procedure RadioButton7Click(Sender: TObject);
        procedure RadioButton8Click(Sender: TObject);
        procedure RadioButton9Click(Sender: TObject);
        procedure RadioButton10Click(Sender: TObject);
        procedure RadioButton11Click(Sender: TObject);
        procedure RadioButton12Click(Sender: TObject);
        procedure RadioButton13Click(Sender: TObject);
        procedure RadioButton14Click(Sender: TObject);
        procedure RadioButton15Click(Sender: TObject);
        procedure Button1Click(Sender: TObject);
        procedure Button2Click(Sender: TObject);
        procedure Button3Click(Sender: TObject);
        procedure Button4Click(Sender: TObject);
        procedure FormCreate(Sender: TObject);
      private
        { Déclarations privées }
      public
        { Déclarations publiques }
      end;
     
    var
      Form1: TForm1;
     i : integer;
     
    implementation
    uses Unit2; //déclaration
    {$R *.dfm}
     
    procedure TForm1.Button1Click(Sender: TObject);
     
    begin
    {for I := 1 to 20 do begin
    edit3.Text = 'ECMS' + label[i].caption
    end;  }
     
    edit3.text := 'ECMS' + label1.Caption + label2.caption + label3.caption+label4.Caption+label5.Caption+label6.caption+label7.caption+label8.caption+label9.caption+label10.caption+label11.caption+label12.caption+label13.caption+label14.caption+label15.caption+label16.caption+label17.caption+label18.caption+label19.caption+label20.caption
    end;
     
    procedure TForm1.Button2Click(Sender: TObject);
    begin
    edit1.text := '';
    edit2.text := '';
    edit3.text := '';
    comboboxex1.text :=  'Type de sonde';
    comboboxex2.text :=  'Tête/Connecteur';
    comboboxex3.text :=  'Raccord';
    checkbox1.Checked := false;
    checkbox2.Checked := false;
    checkbox3.Checked := false;
    checkbox4.Checked := false;
    checkbox5.Checked := false;
    checkbox6.Checked := false;
    checkbox7.Checked := false;
    checkbox8.Checked := false;
    checkbox9.Checked := false;
    checkbox10.Checked := false;
    checkbox11.Checked := false;
    checkbox12.Checked := false;
    radiobutton1.checked := false;
    radiobutton2.checked := false;
    radiobutton3.checked := false;
    radiobutton4.checked := false;
    radiobutton5.checked := false;
    radiobutton6.checked := false;
    radiobutton7.checked := false;
    radiobutton8.checked := false;
    radiobutton9.checked := false;
    radiobutton10.checked := false;
    radiobutton11.checked := false;
    radiobutton12.checked := false;
    radiobutton13.checked := false;
    radiobutton14.checked := false;
    radiobutton15.checked := false;
    end;
     
    procedure TForm1.Button3Click(Sender: TObject);
    begin
    close;
    end;
     
    procedure TForm1.Button4Click(Sender: TObject);
    begin
    form2.show;
    end;
     
    procedure TForm1.CheckBox10Click(Sender: TObject);
    begin
    if checkbox10.checked = true  then
     label17.Caption := 'N'
    ;
    if checkbox10.checked = false  then
     label17.Caption := ''
    end;
     
    procedure TForm1.CheckBox11Click(Sender: TObject);
    begin
    if checkbox11.checked = true  then
     label18.Caption := 'V'
    ;
    if checkbox11.checked = false  then
     label18.Caption := ''
    end;
     
    procedure TForm1.CheckBox12Click(Sender: TObject);
    begin
    if checkbox12.checked = true  then
     label19.Caption := 'G'
    ;
    if checkbox12.checked = false  then
     label19.Caption := ''
    end;
     
    procedure TForm1.CheckBox1Click(Sender: TObject);
    begin
    if checkbox1.Checked = true then
    label7.Caption := 'D'
    ;
    if checkbox1.checked = false  then
     label7.Caption := ''
    end;
     
    procedure TForm1.CheckBox2Click(Sender: TObject);
    begin
    if checkbox2.checked =true  then
     label8.Caption := 'S'
    ;
    if checkbox2.checked = false  then
     label8.Caption := ''
    end;
     
    procedure TForm1.CheckBox3Click(Sender: TObject);
    begin
    if checkbox3.checked = true  then
     label9.Caption := 'O'
    ;
    if checkbox3.checked = false  then
     label9.Caption := ''
    end;
     
    procedure TForm1.CheckBox4Click(Sender: TObject);
    begin
    if checkbox4.checked = true  then
     label10.Caption := 'A'
    ;
    if checkbox4.checked = false  then
     label10.Caption := ''
    end;
     
    procedure TForm1.CheckBox5Click(Sender: TObject);
    begin
    if checkbox5.checked = true  then
     label11.Caption := 'C'
    ;
    if checkbox5.checked = false  then
     label11.Caption := ''
    end;
     
    procedure TForm1.CheckBox6Click(Sender: TObject);
    begin
    if checkbox6.checked = true  then
     label12.Caption := 'J'
    ;
    if checkbox6.checked = false  then
     label12.Caption := ''
    end;
     
    procedure TForm1.CheckBox7Click(Sender: TObject);
    begin
    if checkbox7.checked = true  then
     label13.Caption := 'R'
    ;
    if checkbox7.checked = false  then
     label13.Caption := ''
    end;
     
    procedure TForm1.CheckBox8Click(Sender: TObject);
    begin
    if checkbox8.checked = true  then
     label14.Caption := 'E'
    ;
    if checkbox5.checked = false  then
     label14.Caption := ''
    end;
     
    procedure TForm1.CheckBox9Click(Sender: TObject);
    begin
    if checkbox9.checked = true  then
     label16.Caption := 'L'
    ;
    if checkbox9.checked = false  then
     label16.Caption := ''
    end;
     
    procedure TForm1.ComboBoxEx1Change(Sender: TObject);
    begin
    if comboboxex1.Text = 'Pt100' then
    label1.Caption := 'P'
     
     ELSE
    if comboboxex1.Text = 'Thermocouple J' then
    label1.Caption := 'J'
     
    else
    if comboboxex1.Text = 'Thermocouple K' then
    label1.Caption := 'K'
     
    else
    if comboboxex1.Text = 'Thermocouple S' then
    label1.Caption := 'S'
     
    else
    if comboboxex1.Text = 'Pt1000' then
    label1.Caption := 'M'
    end;
     
    procedure TForm1.ComboBoxEx2Change(Sender: TObject);
    begin
    if comboboxex2.text = 'DIN B avec revêtement expoxy' then
    label2.Caption := 'B'
     
    ELSE
    if comboboxex2.text = 'Mini Dan avec revêtement epoxy' then
    label2.Caption := 'D'
     
    ELSE
    if comboboxex2.text = 'Inox foré dans la masse' then
    label2.Caption := 'I'
     
    ELSE
    if comboboxex2.text = 'Inox BaTemp type D' then
    label2.Caption := 'T'
     
    ELSE
    if comboboxex2.text = 'Inox BaTemp type F' then
    label2.Caption := 'E'
     
    ELSE
    if comboboxex2.text = 'Noryl' then
    label2.Caption := 'N'
     
    ELSE
    if comboboxex2.text = 'Plastique (PA66 ou BBK)' then
    label2.Caption := 'P'
     
    ELSE
    if comboboxex2.text = 'Miniature avec revêtement epoxy' then
    label2.Caption := 'M'
     
    ELSE
    if comboboxex2.text = 'Fonte' then
    label2.Caption := 'F'
     
    ELSE
    if comboboxex2.text = 'ADF' then
    label2.Caption := 'A'
     
    ELSE
    if comboboxex2.text = 'DAN G avec revêtement epoxy' then
    label2.Caption := 'G'
     
    ELSE
    if comboboxex2.text = 'Connecteur DIN43650/A (Hirschmann)' then
    label2.Caption := 'H'
     
    ELSE
    if comboboxex2.text = 'Ambiance extérieure' then
    label2.Caption := 'AE'
     
    ELSE
    if comboboxex2.text = 'Connecteur M12' then
    label2.Caption := 'C'
     
    ELSE
    if comboboxex2.text = 'Connecteur M12 avec sortie 4-20 mA' then
    label2.Caption := 'U'
    end;
     
    procedure TForm1.ComboBoxEx3Change(Sender: TObject);
    begin
    if comboboxex3.text = 'Fixe sous tête' then
    label5.Caption := 'F'
     
    else
    if comboboxex3.text = 'Positionné à 50 mm' then
    label5.Caption := 'P'
     
    else
    if comboboxex3.text = 'Sans' then
    label5.Caption := 'S'
     
    else
    if comboboxex3.text = 'Taraudé 1/2 G' then
    label5.Caption := 'T'
    end;
     
    procedure TForm1.Edit1Change(Sender: TObject);
    var
    d : real;
    begin
    label4.Caption := edit1.text ;
     d := sysutils.strtofloat(edit1.text) ;
     
    if d < 10 then
    label4.Caption := '0' + edit1.text
     end;
     
    procedure TForm1.Edit2Change(Sender: TObject);
    var
    l : double;
    lu : string;
    begin
    label6.Caption := edit2.text;
    lu := edit2.text;
     
    l := sysutils.strtofloat(lu) ;
     
    if l < 100 then
    label6.Caption := '00' + edit2.text
     
    else
    if (l > 100) and (l<1000) then
    label6.Caption := '0' + edit2.text
     
    else
    if l > 1000 then
    label6.Caption := edit2.text
     
    end;
     
     
     
     
    procedure TForm1.RadioButton10Click(Sender: TObject);
    begin
    if radiobutton10.checked = true  then
     label20.Caption := '-DF2'
    end;
     
    procedure TForm1.RadioButton11Click(Sender: TObject);
    begin
    if radiobutton11.checked = true  then
     label20.Caption := '-BCS'
    end;
     
    procedure TForm1.RadioButton12Click(Sender: TObject);
    begin
    if radiobutton12.checked = true  then
     label20.Caption := '-12G'
    end;
     
    procedure TForm1.RadioButton13Click(Sender: TObject);
    begin
    if radiobutton13.checked = true  then
     label20.Caption := '-12N'
    end;
     
    procedure TForm1.RadioButton14Click(Sender: TObject);
    begin
    if radiobutton14.checked = true  then
     label20.Caption := '-14G'
    end;
     
    procedure TForm1.RadioButton15Click(Sender: TObject);
    begin
    if radiobutton15.checked = true  then
     label20.Caption := '-14N'
    end;
     
    procedure TForm1.RadioButton1Click(Sender: TObject);
    begin
    if radiobutton1.checked = true  then
     label15.Caption := 'H'
     
    end;
     
    procedure TForm1.RadioButton2Click(Sender: TObject);
    begin
    if radiobutton2.checked = true  then
     label15.Caption := 'B'
    end;
     
    procedure TForm1.RadioButton3Click(Sender: TObject);
    begin
    if radiobutton3.checked = true  then
     label20.Caption := '-CL3'
    end;
     
    procedure TForm1.RadioButton4Click(Sender: TObject);
    begin
    if radiobutton4.checked = true  then
     label20.Caption := '-CL5'
    end;
     
    procedure TForm1.RadioButton5Click(Sender: TObject);
    begin
    if radiobutton5.checked = true  then
     label20.Caption := '-SL3'
    end;
     
    procedure TForm1.RadioButton6Click(Sender: TObject);
    begin
    if radiobutton6.checked = true  then
     label20.Caption := '-SL5'
    end;
     
    procedure TForm1.RadioButton7Click(Sender: TObject);
    begin
    if radiobutton7.checked = true  then
     label20.Caption := '-SF3'
    end;
     
    procedure TForm1.RadioButton8Click(Sender: TObject);
    begin
    if radiobutton8.checked = true  then
     label20.Caption := '-SF5'
    end;
     
    procedure TForm1.RadioButton9Click(Sender: TObject);
    begin
    if radiobutton9.checked = true  then
     label20.Caption := '-DL2'
    end;
     
    end.

  8. #8
    Rédacteur/Modérateur
    Avatar de ero-sennin
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Juillet 2005
    Messages
    2 965
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 37
    Localisation : France, Nord (Nord Pas de Calais)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juillet 2005
    Messages : 2 965
    Points : 4 935
    Points
    4 935
    Par défaut
    Re

    Dans les déclarations, vire le FormCreate ...
    Ca donne ça :

    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
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
    467
    468
    469
    470
    471
    472
    473
    474
    475
    476
    477
    478
    479
    480
    481
    482
    483
    484
    485
    486
    487
    488
    489
    490
    491
    492
    493
    494
    495
    496
    497
    498
    499
    500
    501
    502
    503
    504
    505
    506
    507
    508
    509
    510
    511
    512
    513
    514
    515
    516
    517
    unit dethermine;
     
    interface
     
    uses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, ComCtrls, StdCtrls, ExtCtrls, Menus;
     
    type
      TForm1 = class(TForm)
        ComboBoxEx1: TComboBoxEx;
        ComboBoxEx2: TComboBoxEx;
        ComboBoxEx3: TComboBoxEx;
        RadioGroup1: TRadioGroup;
        CheckBox1: TCheckBox;
        CheckBox2: TCheckBox;
        CheckBox3: TCheckBox;
        CheckBox4: TCheckBox;
        CheckBox5: TCheckBox;
        CheckBox6: TCheckBox;
        CheckBox7: TCheckBox;
        CheckBox8: TCheckBox;
        RadioButton1: TRadioButton;
        RadioButton2: TRadioButton;
        CheckBox9: TCheckBox;
        CheckBox10: TCheckBox;
        CheckBox11: TCheckBox;
        CheckBox12: TCheckBox;
        RadioGroup2: TRadioGroup;
        RadioButton3: TRadioButton;
        RadioButton4: TRadioButton;
        RadioButton5: TRadioButton;
        RadioButton6: TRadioButton;
        RadioButton7: TRadioButton;
        RadioButton8: TRadioButton;
        RadioButton9: TRadioButton;
        RadioButton10: TRadioButton;
        RadioButton11: TRadioButton;
        RadioButton12: TRadioButton;
        RadioButton13: TRadioButton;
        RadioButton14: TRadioButton;
        RadioButton15: TRadioButton;
        Edit1: TEdit;
        Edit2: TEdit;
        Label1: TLabel;
        Edit3: TEdit;
        Label2: TLabel;
        Label3: TLabel;
        Label4: TLabel;
        Label5: TLabel;
        Label6: TLabel;
        Label7: TLabel;
        Label8: TLabel;
        Label9: TLabel;
        Label10: TLabel;
        Label11: TLabel;
        Label12: TLabel;
        Label13: TLabel;
        Label14: TLabel;
        Label15: TLabel;
        Label16: TLabel;
        Label17: TLabel;
        Label18: TLabel;
        Label19: TLabel;
        Label20: TLabel;
        Button1: TButton;
        Label21: TLabel;
        Button2: TButton;
        Button3: TButton;
        Button4: TButton;
        procedure Edit2Change(Sender: TObject);
        procedure Edit1Change(Sender: TObject);
        procedure ComboBoxEx1Change(Sender: TObject);
        procedure ComboBoxEx2Change(Sender: TObject);
        procedure ComboBoxEx3Change(Sender: TObject);
        procedure CheckBox1Click(Sender: TObject);
        procedure CheckBox2Click(Sender: TObject);
        procedure CheckBox3Click(Sender: TObject);
        procedure CheckBox4Click(Sender: TObject);
        procedure CheckBox5Click(Sender: TObject);
        procedure CheckBox6Click(Sender: TObject);
        procedure CheckBox7Click(Sender: TObject);
        procedure CheckBox8Click(Sender: TObject);
        procedure RadioButton1Click(Sender: TObject);
        procedure RadioButton2Click(Sender: TObject);
        procedure CheckBox9Click(Sender: TObject);
        procedure CheckBox10Click(Sender: TObject);
        procedure CheckBox11Click(Sender: TObject);
        procedure CheckBox12Click(Sender: TObject);
        procedure RadioButton3Click(Sender: TObject);
        procedure RadioButton4Click(Sender: TObject);
        procedure RadioButton5Click(Sender: TObject);
        procedure RadioButton6Click(Sender: TObject);
        procedure RadioButton7Click(Sender: TObject);
        procedure RadioButton8Click(Sender: TObject);
        procedure RadioButton9Click(Sender: TObject);
        procedure RadioButton10Click(Sender: TObject);
        procedure RadioButton11Click(Sender: TObject);
        procedure RadioButton12Click(Sender: TObject);
        procedure RadioButton13Click(Sender: TObject);
        procedure RadioButton14Click(Sender: TObject);
        procedure RadioButton15Click(Sender: TObject);
        procedure Button1Click(Sender: TObject);
        procedure Button2Click(Sender: TObject);
        procedure Button3Click(Sender: TObject);
        procedure Button4Click(Sender: TObject);
        //procedure FormCreate(Sender: TObject); // A supprimer
      private
        { Déclarations privées }
      public
        { Déclarations publiques }
      end;
     
    var
      Form1: TForm1;
     i : integer;
     
    implementation
    uses Unit2; //déclaration
    {$R *.dfm}
     
    procedure TForm1.Button1Click(Sender: TObject);
     
    begin
    {for I := 1 to 20 do begin
    edit3.Text = 'ECMS' + label[i].caption
    end;  }
     
    edit3.text := 'ECMS' + label1.Caption + label2.caption + label3.caption+label4.Caption+label5.Caption+label6.caption+label7.caption+label8.caption+label9.caption+label10.caption+label11.caption+label12.caption+label13.caption+label14.caption+label15.caption+label16.caption+label17.caption+label18.caption+label19.caption+label20.caption
    end;
     
    procedure TForm1.Button2Click(Sender: TObject);
    begin
    edit1.text := '';
    edit2.text := '';
    edit3.text := '';
    comboboxex1.text :=  'Type de sonde';
    comboboxex2.text :=  'Tête/Connecteur';
    comboboxex3.text :=  'Raccord';
    checkbox1.Checked := false;
    checkbox2.Checked := false;
    checkbox3.Checked := false;
    checkbox4.Checked := false;
    checkbox5.Checked := false;
    checkbox6.Checked := false;
    checkbox7.Checked := false;
    checkbox8.Checked := false;
    checkbox9.Checked := false;
    checkbox10.Checked := false;
    checkbox11.Checked := false;
    checkbox12.Checked := false;
    radiobutton1.checked := false;
    radiobutton2.checked := false;
    radiobutton3.checked := false;
    radiobutton4.checked := false;
    radiobutton5.checked := false;
    radiobutton6.checked := false;
    radiobutton7.checked := false;
    radiobutton8.checked := false;
    radiobutton9.checked := false;
    radiobutton10.checked := false;
    radiobutton11.checked := false;
    radiobutton12.checked := false;
    radiobutton13.checked := false;
    radiobutton14.checked := false;
    radiobutton15.checked := false;
    end;
     
    procedure TForm1.Button3Click(Sender: TObject);
    begin
    close;
    end;
     
    procedure TForm1.Button4Click(Sender: TObject);
    begin
    form2.show;
    end;
     
    procedure TForm1.CheckBox10Click(Sender: TObject);
    begin
    if checkbox10.checked = true  then
     label17.Caption := 'N'
    ;
    if checkbox10.checked = false  then
     label17.Caption := ''
    end;
     
    procedure TForm1.CheckBox11Click(Sender: TObject);
    begin
    if checkbox11.checked = true  then
     label18.Caption := 'V'
    ;
    if checkbox11.checked = false  then
     label18.Caption := ''
    end;
     
    procedure TForm1.CheckBox12Click(Sender: TObject);
    begin
    if checkbox12.checked = true  then
     label19.Caption := 'G'
    ;
    if checkbox12.checked = false  then
     label19.Caption := ''
    end;
     
    procedure TForm1.CheckBox1Click(Sender: TObject);
    begin
    if checkbox1.Checked = true then
    label7.Caption := 'D'
    ;
    if checkbox1.checked = false  then
     label7.Caption := ''
    end;
     
    procedure TForm1.CheckBox2Click(Sender: TObject);
    begin
    if checkbox2.checked =true  then
     label8.Caption := 'S'
    ;
    if checkbox2.checked = false  then
     label8.Caption := ''
    end;
     
    procedure TForm1.CheckBox3Click(Sender: TObject);
    begin
    if checkbox3.checked = true  then
     label9.Caption := 'O'
    ;
    if checkbox3.checked = false  then
     label9.Caption := ''
    end;
     
    procedure TForm1.CheckBox4Click(Sender: TObject);
    begin
    if checkbox4.checked = true  then
     label10.Caption := 'A'
    ;
    if checkbox4.checked = false  then
     label10.Caption := ''
    end;
     
    procedure TForm1.CheckBox5Click(Sender: TObject);
    begin
    if checkbox5.checked = true  then
     label11.Caption := 'C'
    ;
    if checkbox5.checked = false  then
     label11.Caption := ''
    end;
     
    procedure TForm1.CheckBox6Click(Sender: TObject);
    begin
    if checkbox6.checked = true  then
     label12.Caption := 'J'
    ;
    if checkbox6.checked = false  then
     label12.Caption := ''
    end;
     
    procedure TForm1.CheckBox7Click(Sender: TObject);
    begin
    if checkbox7.checked = true  then
     label13.Caption := 'R'
    ;
    if checkbox7.checked = false  then
     label13.Caption := ''
    end;
     
    procedure TForm1.CheckBox8Click(Sender: TObject);
    begin
    if checkbox8.checked = true  then
     label14.Caption := 'E'
    ;
    if checkbox5.checked = false  then
     label14.Caption := ''
    end;
     
    procedure TForm1.CheckBox9Click(Sender: TObject);
    begin
    if checkbox9.checked = true  then
     label16.Caption := 'L'
    ;
    if checkbox9.checked = false  then
     label16.Caption := ''
    end;
     
    procedure TForm1.ComboBoxEx1Change(Sender: TObject);
    begin
    if comboboxex1.Text = 'Pt100' then
    label1.Caption := 'P'
     
     ELSE
    if comboboxex1.Text = 'Thermocouple J' then
    label1.Caption := 'J'
     
    else
    if comboboxex1.Text = 'Thermocouple K' then
    label1.Caption := 'K'
     
    else
    if comboboxex1.Text = 'Thermocouple S' then
    label1.Caption := 'S'
     
    else
    if comboboxex1.Text = 'Pt1000' then
    label1.Caption := 'M'
    end;
     
    procedure TForm1.ComboBoxEx2Change(Sender: TObject);
    begin
    if comboboxex2.text = 'DIN B avec revêtement expoxy' then
    label2.Caption := 'B'
     
    ELSE
    if comboboxex2.text = 'Mini Dan avec revêtement epoxy' then
    label2.Caption := 'D'
     
    ELSE
    if comboboxex2.text = 'Inox foré dans la masse' then
    label2.Caption := 'I'
     
    ELSE
    if comboboxex2.text = 'Inox BaTemp type D' then
    label2.Caption := 'T'
     
    ELSE
    if comboboxex2.text = 'Inox BaTemp type F' then
    label2.Caption := 'E'
     
    ELSE
    if comboboxex2.text = 'Noryl' then
    label2.Caption := 'N'
     
    ELSE
    if comboboxex2.text = 'Plastique (PA66 ou BBK)' then
    label2.Caption := 'P'
     
    ELSE
    if comboboxex2.text = 'Miniature avec revêtement epoxy' then
    label2.Caption := 'M'
     
    ELSE
    if comboboxex2.text = 'Fonte' then
    label2.Caption := 'F'
     
    ELSE
    if comboboxex2.text = 'ADF' then
    label2.Caption := 'A'
     
    ELSE
    if comboboxex2.text = 'DAN G avec revêtement epoxy' then
    label2.Caption := 'G'
     
    ELSE
    if comboboxex2.text = 'Connecteur DIN43650/A (Hirschmann)' then
    label2.Caption := 'H'
     
    ELSE
    if comboboxex2.text = 'Ambiance extérieure' then
    label2.Caption := 'AE'
     
    ELSE
    if comboboxex2.text = 'Connecteur M12' then
    label2.Caption := 'C'
     
    ELSE
    if comboboxex2.text = 'Connecteur M12 avec sortie 4-20 mA' then
    label2.Caption := 'U'
    end;
     
    procedure TForm1.ComboBoxEx3Change(Sender: TObject);
    begin
    if comboboxex3.text = 'Fixe sous tête' then
    label5.Caption := 'F'
     
    else
    if comboboxex3.text = 'Positionné à 50 mm' then
    label5.Caption := 'P'
     
    else
    if comboboxex3.text = 'Sans' then
    label5.Caption := 'S'
     
    else
    if comboboxex3.text = 'Taraudé 1/2 G' then
    label5.Caption := 'T'
    end;
     
    procedure TForm1.Edit1Change(Sender: TObject);
    var
    d : real;
    begin
    label4.Caption := edit1.text ;
     d := sysutils.strtofloat(edit1.text) ;
     
    if d < 10 then
    label4.Caption := '0' + edit1.text
     end;
     
    procedure TForm1.Edit2Change(Sender: TObject);
    var
    l : double;
    lu : string;
    begin
    label6.Caption := edit2.text;
    lu := edit2.text;
     
    l := sysutils.strtofloat(lu) ;
     
    if l < 100 then
    label6.Caption := '00' + edit2.text
     
    else
    if (l > 100) and (l<1000) then
    label6.Caption := '0' + edit2.text
     
    else
    if l > 1000 then
    label6.Caption := edit2.text
     
    end;
     
     
     
     
    procedure TForm1.RadioButton10Click(Sender: TObject);
    begin
    if radiobutton10.checked = true  then
     label20.Caption := '-DF2'
    end;
     
    procedure TForm1.RadioButton11Click(Sender: TObject);
    begin
    if radiobutton11.checked = true  then
     label20.Caption := '-BCS'
    end;
     
    procedure TForm1.RadioButton12Click(Sender: TObject);
    begin
    if radiobutton12.checked = true  then
     label20.Caption := '-12G'
    end;
     
    procedure TForm1.RadioButton13Click(Sender: TObject);
    begin
    if radiobutton13.checked = true  then
     label20.Caption := '-12N'
    end;
     
    procedure TForm1.RadioButton14Click(Sender: TObject);
    begin
    if radiobutton14.checked = true  then
     label20.Caption := '-14G'
    end;
     
    procedure TForm1.RadioButton15Click(Sender: TObject);
    begin
    if radiobutton15.checked = true  then
     label20.Caption := '-14N'
    end;
     
    procedure TForm1.RadioButton1Click(Sender: TObject);
    begin
    if radiobutton1.checked = true  then
     label15.Caption := 'H'
     
    end;
     
    procedure TForm1.RadioButton2Click(Sender: TObject);
    begin
    if radiobutton2.checked = true  then
     label15.Caption := 'B'
    end;
     
    procedure TForm1.RadioButton3Click(Sender: TObject);
    begin
    if radiobutton3.checked = true  then
     label20.Caption := '-CL3'
    end;
     
    procedure TForm1.RadioButton4Click(Sender: TObject);
    begin
    if radiobutton4.checked = true  then
     label20.Caption := '-CL5'
    end;
     
    procedure TForm1.RadioButton5Click(Sender: TObject);
    begin
    if radiobutton5.checked = true  then
     label20.Caption := '-SL3'
    end;
     
    procedure TForm1.RadioButton6Click(Sender: TObject);
    begin
    if radiobutton6.checked = true  then
     label20.Caption := '-SL5'
    end;
     
    procedure TForm1.RadioButton7Click(Sender: TObject);
    begin
    if radiobutton7.checked = true  then
     label20.Caption := '-SF3'
    end;
     
    procedure TForm1.RadioButton8Click(Sender: TObject);
    begin
    if radiobutton8.checked = true  then
     label20.Caption := '-SF5'
    end;
     
    procedure TForm1.RadioButton9Click(Sender: TObject);
    begin
    if radiobutton9.checked = true  then
     label20.Caption := '-DL2'
    end;
     
    end.
    L'erreur veut dire que tu as déclarés une chose dans la partie déclaration mais que tu ne l'a pas implémenté ... Donc soit tu implémentes, soit du enlèves la déclaration ...

  9. #9
    Membre du Club
    Profil pro
    Inscrit en
    Février 2008
    Messages
    108
    Détails du profil
    Informations personnelles :
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations forums :
    Inscription : Février 2008
    Messages : 108
    Points : 61
    Points
    61
    Par défaut
    cela me génère une erreur !

    "La méthode formCreate référencée par Form1.OnCreate n'existe pas. Voulez vous retirer la référence?"

  10. #10
    Membre du Club
    Profil pro
    Inscrit en
    Février 2008
    Messages
    108
    Détails du profil
    Informations personnelles :
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations forums :
    Inscription : Février 2008
    Messages : 108
    Points : 61
    Points
    61
    Par défaut
    Ca bloque à ce niveau de mon code :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    procedure TForm1.Button1Click(Sender: TObject);
     
    edit3.text := 'ECMS' + label1.Caption + label2.caption + label3.caption+label4.Caption+label5.Caption+label6.caption+label7.caption+label8.caption+label9.caption+label10.caption+label11.caption+label12.caption+label13.caption+label14.caption+label15.caption+label16.caption+label17.caption+label18.caption+label19.caption+label20.caption
    end;

  11. #11
    Rédacteur/Modérateur
    Avatar de ero-sennin
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Juillet 2005
    Messages
    2 965
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 37
    Localisation : France, Nord (Nord Pas de Calais)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juillet 2005
    Messages : 2 965
    Points : 4 935
    Points
    4 935
    Par défaut
    Quelle est l'erreur ?

  12. #12
    Membre du Club
    Profil pro
    Inscrit en
    Février 2008
    Messages
    108
    Détails du profil
    Informations personnelles :
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations forums :
    Inscription : Février 2008
    Messages : 108
    Points : 61
    Points
    61
    Par défaut
    bon appartemment il manquait le begin et le ";" en fin de ligne.

    Mais si je laisse le procedure FormCreate(Sender: TObject);

    J'ai cel comme erreur :

    [Pascal Erreur] dethermine.pas(108): E2065 Déclaration forward ou external non satisfaite : 'TForm1.FormCreate'
    [Pascal Erreur fatale] Projetdethermine.dpr(14): F2063 Impossible de compiler l'unité utilisée 'dethermine.pas'

    Si je l'enlève j'ai le message La methode Formcreate référencée par Form1oncreate n'existe pas. Voulez vous la retirer? Oui Non annuler.

    Etonnant car mon programme fonctionnait très bien.

  13. #13
    Rédacteur/Modérateur
    Avatar de ero-sennin
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Juillet 2005
    Messages
    2 965
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 37
    Localisation : France, Nord (Nord Pas de Calais)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juillet 2005
    Messages : 2 965
    Points : 4 935
    Points
    4 935
    Par défaut
    Logiquement Oui devrait fonctionnait

  14. #14
    Membre du Club
    Profil pro
    Inscrit en
    Février 2008
    Messages
    108
    Détails du profil
    Informations personnelles :
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations forums :
    Inscription : Février 2008
    Messages : 108
    Points : 61
    Points
    61
    Par défaut
    si je réponds Non à la question, mon programme se bloque

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    begin
      Application.Initialize;
      Application.CreateForm(TForm1, Form1);
      Application.CreateForm(TForm2, Form2); "A ce niveau là!"
      Application.Run;
    end.

  15. #15
    Membre du Club
    Profil pro
    Inscrit en
    Février 2008
    Messages
    108
    Détails du profil
    Informations personnelles :
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations forums :
    Inscription : Février 2008
    Messages : 108
    Points : 61
    Points
    61
    Par défaut
    bon problème résolu. Je ne vois pas ce qui se passait, mais l'essentiel est que ça marche.

    Merci beaucoup pour tout!

    juste une petite question avant d'aller secoucher :

    Sur mon appli j'ai créer un bouton qui décoche toutes mes checkbox et radiobutton, et qui me remets 2 edit vierges. Le problème est que dans ces edit je tape des chiffres et quand je clique sur ce bouton cela me met le message suivant :

    '' n'est pas une valeur en virgule flottante correcte.

    Le problème vient il de ma conversion strtofloat?

    N'existe-t-il pas une synthaxe du style val(edit1.text) ?

  16. #16
    Rédacteur/Modérateur
    Avatar de ero-sennin
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Juillet 2005
    Messages
    2 965
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 37
    Localisation : France, Nord (Nord Pas de Calais)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juillet 2005
    Messages : 2 965
    Points : 4 935
    Points
    4 935
    Par défaut
    Citation Envoyé par breizh44 Voir le message
    Sur mon appli j'ai créer un bouton qui décoche toutes mes checkbox et radiobutton, et qui me remets 2 edit vierges. Le problème est que dans ces edit je tape des chiffres et quand je clique sur ce bouton cela me met le message suivant :

    '' n'est pas une valeur en virgule flottante correcte.

    Le problème vient il de ma conversion strtofloat?

    N'existe-t-il pas une synthaxe du style val(edit1.text) ?
    Je ne saisi pas trop la chose
    Tu as un bouton qui décoche toutes les CheckBox et les RadioButton et qui mes à vide 2 TEdit ... Jusque la OK.
    Mais je ne vois pas le soucis avec StrToFloat ... si tu mets à vide un TEdit, tu procèdes ainsi :
    Faudrait avoir le code de ton bouton, car là, c'est confus pour moi ...

  17. #17
    Membre du Club
    Profil pro
    Inscrit en
    Février 2008
    Messages
    108
    Détails du profil
    Informations personnelles :
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations forums :
    Inscription : Février 2008
    Messages : 108
    Points : 61
    Points
    61
    Par défaut
    je viens de créer une nouvelle discussion pour plus de clareté.

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [AC-2003] Copier le contenu d'un contrôle dans une table
    Par alainb dans le forum IHM
    Réponses: 4
    Dernier message: 01/01/2010, 09h53
  2. Réponses: 1
    Dernier message: 22/06/2009, 12h09
  3. [Toutes versions] Copier le contenu d'un tableau dans une feuille de calcul
    Par Heureux-oli dans le forum Contribuez
    Réponses: 0
    Dernier message: 25/04/2009, 20h08
  4. Comment copier le contenu d'un Edit dans un autre Edit ?
    Par petitclem dans le forum C++Builder
    Réponses: 4
    Dernier message: 17/04/2009, 16h12
  5. Réponses: 3
    Dernier message: 26/04/2008, 17h58

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo