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

IHM Discussion :

un peu lourd mon code aidez moi


Sujet :

IHM

  1. #1
    Membre régulier
    Profil pro
    Inscrit en
    Août 2007
    Messages
    411
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2007
    Messages : 411
    Points : 117
    Points
    117
    Par défaut un peu lourd mon code aidez moi
    ca marche ma petite boîte0 gradit
    mais regardez mon code c'est lour ya pas moins lourd que cela

    merci de votre patience

    Célia

    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
     
    If Texte2.Value = 1 Then Boîte0.Width = 56
    If Texte2.Value = 2 Then Boîte0.Width = 112
    If Texte2.Value = 3 Then Boîte0.Width = 168
    If Texte2.Value = 4 Then Boîte0.Width = 224
    If Texte2.Value = 5 Then Boîte0.Width = 280
    If Texte2.Value = 6 Then Boîte0.Width = 336
    If Texte2.Value = 7 Then Boîte0.Width = 392
    If Texte2.Value = 8 Then Boîte0.Width = 448
    If Texte2.Value = 9 Then Boîte0.Width = 504
    If Texte2.Value = 10 Then Boîte0.Width = 560
    If Texte2.Value = 11 Then Boîte0.Width = 616
    If Texte2.Value = 12 Then Boîte0.Width = 672
    If Texte2.Value = 13 Then Boîte0.Width = 728
    If Texte2.Value = 14 Then Boîte0.Width = 784
    If Texte2.Value = 15 Then Boîte0.Width = 840
    If Texte2.Value = 16 Then Boîte0.Width = 896
    If Texte2.Value = 17 Then Boîte0.Width = 952
    If Texte2.Value = 18 Then Boîte0.Width = 1008
    If Texte2.Value = 19 Then Boîte0.Width = 1064
    If Texte2.Value = 20 Then Boîte0.Width = 1120
    If Texte2.Value = 21 Then Boîte0.Width = 1176
    If Texte2.Value = 22 Then Boîte0.Width = 1232
    If Texte2.Value = 23 Then Boîte0.Width = 1288
    If Texte2.Value = 24 Then Boîte0.Width = 1344
    If Texte2.Value = 25 Then Boîte0.Width = 1400
    If Texte2.Value = 26 Then Boîte0.Width = 1456
    If Texte2.Value = 27 Then Boîte0.Width = 1512
    If Texte2.Value = 28 Then Boîte0.Width = 1568
    If Texte2.Value = 29 Then Boîte0.Width = 1624
    If Texte2.Value = 30 Then Boîte0.Width = 1680
    If Texte2.Value = 31 Then Boîte0.Width = 1736
    If Texte2.Value = 32 Then Boîte0.Width = 1792
    If Texte2.Value = 33 Then Boîte0.Width = 1848
    If Texte2.Value = 34 Then Boîte0.Width = 1904
    If Texte2.Value = 35 Then Boîte0.Width = 1960
    If Texte2.Value = 36 Then Boîte0.Width = 2016
    If Texte2.Value = 37 Then Boîte0.Width = 2072
    If Texte2.Value = 38 Then Boîte0.Width = 2128
    If Texte2.Value = 39 Then Boîte0.Width = 2184
    If Texte2.Value = 40 Then Boîte0.Width = 2240
    If Texte2.Value = 41 Then Boîte0.Width = 2296
    If Texte2.Value = 42 Then Boîte0.Width = 2352
    If Texte2.Value = 43 Then Boîte0.Width = 2408
    If Texte2.Value = 44 Then Boîte0.Width = 2464
    If Texte2.Value = 45 Then Boîte0.Width = 2520
    If Texte2.Value = 46 Then Boîte0.Width = 2576
    If Texte2.Value = 47 Then Boîte0.Width = 2632
    If Texte2.Value = 48 Then Boîte0.Width = 2688
    If Texte2.Value = 49 Then Boîte0.Width = 2744
    If Texte2.Value = 50 Then Boîte0.Width = 2800
    If Texte2.Value = 51 Then Boîte0.Width = 2856
    If Texte2.Value = 52 Then Boîte0.Width = 2912
    If Texte2.Value = 53 Then Boîte0.Width = 2968
    If Texte2.Value = 54 Then Boîte0.Width = 3024
    If Texte2.Value = 55 Then Boîte0.Width = 3080
    If Texte2.Value = 56 Then Boîte0.Width = 3136
    If Texte2.Value = 57 Then Boîte0.Width = 3192
    If Texte2.Value = 58 Then Boîte0.Width = 3248
    If Texte2.Value = 59 Then Boîte0.Width = 3304
    If Texte2.Value = 60 Then Boîte0.Width = 3360
    If Texte2.Value = 61 Then Boîte0.Width = 3416
    If Texte2.Value = 62 Then Boîte0.Width = 3472
    If Texte2.Value = 63 Then Boîte0.Width = 3528
    If Texte2.Value = 64 Then Boîte0.Width = 3584
    If Texte2.Value = 65 Then Boîte0.Width = 3640
    If Texte2.Value = 66 Then Boîte0.Width = 3696
    If Texte2.Value = 67 Then Boîte0.Width = 3752
    If Texte2.Value = 68 Then Boîte0.Width = 3808
    If Texte2.Value = 69 Then Boîte0.Width = 3864
    If Texte2.Value = 70 Then Boîte0.Width = 3920
    If Texte2.Value = 71 Then Boîte0.Width = 3976
    If Texte2.Value = 72 Then Boîte0.Width = 4032
    If Texte2.Value = 73 Then Boîte0.Width = 4088
    If Texte2.Value = 74 Then Boîte0.Width = 4144
    If Texte2.Value = 75 Then Boîte0.Width = 4200
    If Texte2.Value = 76 Then Boîte0.Width = 4256
    If Texte2.Value = 77 Then Boîte0.Width = 4312
    If Texte2.Value = 78 Then Boîte0.Width = 4368
    If Texte2.Value = 79 Then Boîte0.Width = 4424
    If Texte2.Value = 80 Then Boîte0.Width = 4480
    If Texte2.Value = 81 Then Boîte0.Width = 4536
    If Texte2.Value = 82 Then Boîte0.Width = 4592
    If Texte2.Value = 83 Then Boîte0.Width = 4648
    If Texte2.Value = 84 Then Boîte0.Width = 4704
    If Texte2.Value = 85 Then Boîte0.Width = 4760
    If Texte2.Value = 86 Then Boîte0.Width = 4816
    If Texte2.Value = 87 Then Boîte0.Width = 4872
    If Texte2.Value = 88 Then Boîte0.Width = 4928
    If Texte2.Value = 89 Then Boîte0.Width = 4984
    If Texte2.Value = 90 Then Boîte0.Width = 5040
    If Texte2.Value = 91 Then Boîte0.Width = 5096
    If Texte2.Value = 92 Then Boîte0.Width = 5152
    If Texte2.Value = 93 Then Boîte0.Width = 5208
    If Texte2.Value = 94 Then Boîte0.Width = 5264
    If Texte2.Value = 95 Then Boîte0.Width = 5320
    If Texte2.Value = 96 Then Boîte0.Width = 5376
    If Texte2.Value = 97 Then Boîte0.Width = 5432
    If Texte2.Value = 98 Then Boîte0.Width = 5488
    If Texte2.Value = 99 Then Boîte0.Width = 5544
    If Texte2.Value = 100 Then Boîte0.Width = 5600

  2. #2
    Membre averti Avatar de Vince
    Profil pro
    Inscrit en
    Mars 2002
    Messages
    369
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2002
    Messages : 369
    Points : 366
    Points
    366
    Par défaut
    en plus simple ça donne :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    Boîte0.Width = Texte2.Value * 56
    PS : évite les accents et les ^ sur les noms de variables ou de composants graphiques (ex :Boîte0) bien qu'Access soit souple de ce côté là....

    Pour éviter les mauvaises surprises :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    if Texte2.Value > 0 then 
        Boîte0.Width = Texte2.Value * 56
    end
    De plus il faudrait "vérrouiller" Texte2 à de la saisie numérique... La fonction IsNumeric() --> à voir dans l'aide car Access pour moi c'est un peu loin
    Ou peut-être plus simple dans les propriétés de la textbox

  3. #3
    Membre régulier
    Profil pro
    Inscrit en
    Août 2007
    Messages
    411
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2007
    Messages : 411
    Points : 117
    Points
    117
    Par défaut super ca marche merci merci merci
    gros smaccc tu me sauve la vie en faite je me débrouille par mes pitits moyens et des fois comme je sais pas comment faire je contourne avec des codes un peu relou dans ce genre

    encore merci

    bisous

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

Discussions similaires

  1. [Débutant] Probleme avec mon pfe aidez moi sil vous plaît
    Par chanana dans le forum VB.NET
    Réponses: 2
    Dernier message: 14/03/2013, 08h20
  2. Aide pour créer mon site, aidez moi.
    Par ganon551 dans le forum Mon site
    Réponses: 24
    Dernier message: 30/06/2006, 19h45
  3. aidez moi svp,"code source" du jeux serpent
    Par joshkof dans le forum C++
    Réponses: 3
    Dernier message: 24/05/2006, 11h03
  4. Je vois pas d'où vient mon erreur!! Aidez moi SVP
    Par liliboms dans le forum MS SQL Server
    Réponses: 3
    Dernier message: 04/04/2005, 08h25

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