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

VB 6 et antérieur Discussion :

Déterminer version VB à partir du code source


Sujet :

VB 6 et antérieur

  1. #1
    Membre habitué
    Profil pro
    Étudiant
    Inscrit en
    Février 2007
    Messages
    151
    Détails du profil
    Informations personnelles :
    Âge : 36
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Février 2007
    Messages : 151
    Points : 133
    Points
    133
    Par défaut Déterminer version VB à partir du code source
    Bonjour à tous,
    je cherche a déterminer la version de Visual Basic utilisée afin de modifier un programme existant, l'entreprise doit acheter une version de VB mais laquelle ? Je ne connais rien à rien en VB.
    Est-ce que le fait de voir écrit "VERSION 5.00" est une indication sur la version de Visual Basic à utiliser ou bien la version du fichier ?
    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
    VERSION 5.00
    Object = "{00028C01-0000-0000-0000-000000000046}#1.0#0"; "DBGRID32.OCX"
    Begin VB.Form DocListeProjet 
       Caption         =   "Liste des projets"
       ClientHeight    =   6675
       ClientLeft      =   60
       ClientTop       =   345
       ClientWidth     =   10470
       LinkTopic       =   "Form1"
       ScaleHeight     =   6675
       ScaleWidth      =   10470
       StartUpPosition =   3  'Windows Default
       Begin VB.CommandButton annuler 
          Caption         =   "Annuler"
          Height          =   375
          Left            =   7200
          TabIndex        =   4
          Top             =   6120
          Width           =   1335
       End
       Begin VB.CommandButton valider 
          Caption         =   "Valider"
          Height          =   375
          Left            =   8880
          TabIndex        =   3
          Top             =   6120
          Width           =   1335
       End
       Begin VB.CommandButton rechercher 
          Caption         =   "Rechercher"
          Height          =   255
          Left            =   8880
          TabIndex        =   2
          Top             =   360
          Width           =   1335
       End
       Begin VB.TextBox Text1 
          Height          =   285
          Left            =   5640
          TabIndex        =   1
          Top             =   360
          Width           =   3135
       End
       Begin MSDBGrid.DBGrid DBGrid1 
          Bindings        =   "DocListeProjet.frx":0000
          Height          =   5175
          Left            =   240
          OleObjectBlob   =   "DocListeProjet.frx":0014
          TabIndex        =   0
          Top             =   720
          Width           =   9975
       End
       Begin VB.Data Data1 
          Caption         =   "Data1"
          Connect         =   "Access"
          DatabaseName    =   ""
          DefaultCursorType=   0  'DefaultCursor
          DefaultType     =   2  'UseODBC
          Exclusive       =   0   'False
          Height          =   300
          Left            =   240
          Options         =   0
          ReadOnly        =   0   'False
          RecordsetType   =   1  'Dynaset
          RecordSource    =   ""
          Top             =   6240
          Visible         =   0   'False
          Width           =   1140
       End
       Begin VB.Line Line1 
          Index           =   3
          X1              =   5400
          X2              =   2280
          Y1              =   6480
          Y2              =   6480
       End
       Begin VB.Line Line1 
          Index           =   2
          X1              =   5400
          X2              =   2280
          Y1              =   6000
          Y2              =   6000
       End
       Begin VB.Line Line1 
          Index           =   1
          X1              =   5400
          X2              =   5400
          Y1              =   6000
          Y2              =   6480
       End
       Begin VB.Line Line1 
          Index           =   0
          X1              =   2280
          X2              =   2280
          Y1              =   6000
          Y2              =   6480
       End
       Begin VB.Label Label3 
          BackStyle       =   0  'Transparent
          Caption         =   "Sélectionnez un projet :"
          BeginProperty Font 
             Name            =   "MS Sans Serif"
             Size            =   9.75
             Charset         =   0
             Weight          =   400
             Underline       =   0   'False
             Italic          =   0   'False
             Strikethrough   =   0   'False
          EndProperty
          Height          =   255
          Left            =   240
          TabIndex        =   7
          Top             =   360
          Width           =   2295
       End
       Begin VB.Label Label2 
          BackStyle       =   0  'Transparent
          Caption         =   "_"
          BeginProperty Font 
             Name            =   "MS Sans Serif"
             Size            =   8.25
             Charset         =   0
             Weight          =   700
             Underline       =   0   'False
             Italic          =   0   'False
             Strikethrough   =   0   'False
          EndProperty
          ForeColor       =   &H00000080&
          Height          =   255
          Left            =   3960
          TabIndex        =   6
          Top             =   6120
          Width           =   1695
       End
       Begin VB.Label Label1 
          Alignment       =   1  'Right Justify
          BackStyle       =   0  'Transparent
          Caption         =   "Projet sélectionné :"
          Height          =   255
          Left            =   2400
          TabIndex        =   5
          Top             =   6120
          Width           =   1455
       End
       Begin VB.Image Image1 
          Height          =   11520
          Left            =   0
          Picture         =   "DocListeProjet.frx":0BAB
          Top             =   0
          Width           =   15360
       End
    End
    Attribute VB_Name = "DocListeProjet"
    Attribute VB_GlobalNameSpace = False
    Attribute VB_Creatable = False
    Attribute VB_PredeclaredId = True
    Attribute VB_Exposed = False
     
    Private Sub Form_Load()
     
        DocListeProjet.Top = AltoPantalla - (((AltoPantalla - DocListeProjet.Height) / 2) + DocListeProjet.Height)
        DocListeProjet.Left = AnchoPantalla - (((AnchoPantalla - DocListeProjet.Width) / 2) + DocListeProjet.Width)
     
        'DBGrid1
        DBGrid1.AllowUpdate = False
        Data1.DatabaseName = BaseDatos
        rechercher_Click
     
    End Sub
     
    Private Sub rechercher_Click() 'Moteur de recherche des projets
        Data1.RecordSource = "SELECT CodeProjet,Client,Description FROM Projets WHERE CodeProjet not like 'z_*' and (CodeProjet like ""*" & Text1.Text & "*"" or Client like ""*" & Text1.Text & "*"" or Description like ""*" & Text1.Text & "*"") order by CodeProjet asc"
        Data1.Refresh
    End Sub
     
    Private Sub DBGrid1_RowColChange(LastRow As Variant, ByVal LastCol As Integer)
        If DBGrid1.ApproxCount <> 0 Then
            Label2.Caption = Data1.Recordset("CodeProjet")
        Else
            Label2.Caption = ""
        End If
    End Sub
     
    Private Sub annuler_Click()
        Unload Me
    End Sub
     
    Private Sub Text1_KeyPress(KeyAscii As Integer)
        If KeyAscii = 13 Then
            rechercher_Click
        End If
    End Sub
     
     
    Private Sub valider_Click()
     
        If Label2.Caption <> "" And Label2.Caption <> "_" Then
     
            Set WS = DBEngine.Workspaces(0)
            Set bd = WS.OpenDatabase(BaseDatos, False, False)
     
            'Test si ce projet est déjà référencé
            deja_reference = False
            pregunta = "SELECT Document FROM Documents WHERE Document=""" & Label2.Caption & """"
            Set rs = bd.OpenRecordset(pregunta, dbOpenDynaset)
            If Not rs.EOF Then
                deja_reference = True
            End If
     
            'Renvoyer les données vers le form DocAjouter encours
            If deja_reference = False Then
                pregunta = "SELECT Client,Description FROM Projets WHERE CodeProjet=""" & Label2.Caption & """"
                Set rs = bd.OpenRecordset(pregunta, dbOpenDynaset)
     
                DocAjouter.Text1.Text = Label2.Caption
                DocAjouter.Text2(0).Text = ""
                DocAjouter.Text2(2).Text = ""
                If rs.Fields(0) <> "" Then DocAjouter.Text2(0).Text = rs.Fields(0)
                If rs.Fields(1) <> "" Then DocAjouter.Text2(2).Text = rs.Fields(1)
     
                bd.Close
                Unload Me
            Else
                MsgBox "Ce projet a déjà été référencé dans la base de document.", vbInformation
            End If
        Else
            MsgBox "Aucun projet n'a été sélectionné.", vbInformation
        End If
     
    End Sub
    Je vous remercie.

  2. #2
    Inactif  

    Profil pro
    Inscrit en
    Juillet 2007
    Messages
    4 555
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2007
    Messages : 4 555
    Points : 5 537
    Points
    5 537
    Par défaut
    Bonjour,

    d'après toi ?

    Bon ===>>> VB5

  3. #3
    Membre expert Avatar de OhMonBato
    Homme Profil pro
    Inscrit en
    Mars 2007
    Messages
    2 660
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Morbihan (Bretagne)

    Informations professionnelles :
    Secteur : Industrie

    Informations forums :
    Inscription : Mars 2007
    Messages : 2 660
    Points : 3 685
    Points
    3 685
    Par défaut
    C'est surtout que tu ne trouveras plus VB6 et encore moins VB5 dans le commerce (peut etre sur des sites comme Ebay et encore...)
    Il n'y a plus que VB.Net qui soit commercialisé par Microsoft.

  4. #4
    Membre habitué
    Profil pro
    Étudiant
    Inscrit en
    Février 2007
    Messages
    151
    Détails du profil
    Informations personnelles :
    Âge : 36
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Février 2007
    Messages : 151
    Points : 133
    Points
    133
    Par défaut
    Je me suis douté que c'était VB5 mais dans un fichier de config, j'ai une référence vers VB6

    Dans un fichier PDM j'ai ça :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
     
    VB6STKIT.DLL
    ...
    Microsoft Visual Studio\VB98\Wizards\PDWizard\ST6UNST.EXE=Yes
    ...
    C:\WINDOWS\system32\VB6FR.DLL=$(WinSysPath)
    A ce que j'ai vu, VB5 et VB6 ne sont pas vraiment compatibles.

  5. #5
    Membre expert
    Avatar de Delbeke
    Profil pro
    Inscrit en
    Juillet 2006
    Messages
    2 675
    Détails du profil
    Informations personnelles :
    Âge : 70
    Localisation : France

    Informations forums :
    Inscription : Juillet 2006
    Messages : 2 675
    Points : 3 696
    Points
    3 696
    Par défaut
    Vb6 peut recompiler des sources vb5 sans grand problème. L'inverse n'est pas forcement vrai, mais moyennant quelques adaptations du source, on y arrive.
    Par contre la compatibilité n'a pas été respectée de vb5/6 vers Vb.Net. (Merci à MicroSoft)

  6. #6
    Membre habitué
    Profil pro
    Étudiant
    Inscrit en
    Février 2007
    Messages
    151
    Détails du profil
    Informations personnelles :
    Âge : 36
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Février 2007
    Messages : 151
    Points : 133
    Points
    133
    Par défaut
    Je vous remercie de vos réponses et vous souhaite une bonne journée.

    Wil

  7. #7
    Rédacteur
    Avatar de DarkVader
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Mai 2002
    Messages
    2 130
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Paris (Île de France)

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

    Informations forums :
    Inscription : Mai 2002
    Messages : 2 130
    Points : 3 118
    Points
    3 118
    Par défaut
    Bonjour,
    Si VB5 ou VB6 c'est quasiment du pareil au même, la conversion de source à la version 7(.net)
    est un travail de haute voltige parfois irréalisable si le projet d'origine est conséquent.

    Si, comme on te l'a précédemment indiqué, tu ne trouves pas de version de VB5 ou 6
    tu as l'alternative de pouvoir travailler le code source avec VB5CCE qui est libre (voir sur le net) :
    cet Ide ne te permettra pas de compiler autre chose que des controls mais quand il ne s'agira plus
    que d'effectuer cette dernière opération, c'est que tu ne seras plus loin du compte.

    Note à la modération : Une mise en ligne de VB5CCE sur la page de «Outils VB» serait bienvenue.

  8. #8
    Membre habitué
    Profil pro
    Étudiant
    Inscrit en
    Février 2007
    Messages
    151
    Détails du profil
    Informations personnelles :
    Âge : 36
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Février 2007
    Messages : 151
    Points : 133
    Points
    133
    Par défaut
    Merci de l'info DarkVader. Je note ça.

  9. #9
    Expert éminent sénior
    Avatar de ProgElecT
    Homme Profil pro
    Retraité
    Inscrit en
    Décembre 2004
    Messages
    6 091
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 68
    Localisation : France, Haute Savoie (Rhône Alpes)

    Informations professionnelles :
    Activité : Retraité
    Secteur : Communication - Médias

    Informations forums :
    Inscription : Décembre 2004
    Messages : 6 091
    Points : 16 640
    Points
    16 640
    Par défaut
    Citation Envoyé par ucfoutu Voir le message
    Bonjour,

    d'après toi ?

    Bon ===>>> VB5
    J'ai bien remarqué que la discussion était taguer RESOLU, mais je tiens tout de même a vous faire voir cela
    Un Form que je viens de faire a l'instant ouvert avec notepad
    VERSION 5.00
    Begin VB.Form Form1
    Caption = "Form1"
    ClientHeight = 1485
    ClientLeft = 120
    ClientTop = 420
    ClientWidth = 3945
    LinkTopic = "Form1"
    ScaleHeight = 1485
    ScaleWidth = 3945
    StartUpPosition = 3 'Windows Default
    Une capture d'ecran effectué à l'instant

    Ou est l'erreur

  10. #10
    Inactif  

    Profil pro
    Inscrit en
    Juillet 2007
    Messages
    4 555
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2007
    Messages : 4 555
    Points : 5 537
    Points
    5 537
    Par défaut
    Bonjour, Progelect,

    Nous voilà donc peu avancés, en effet.

    Un petit truc, alors,

    Rechercher dans le .vbp l'existence d'une ligne commençant par :
    Retained
    Si n'existe pas : VB5
    Si Existe : VB6

    Edit :
    Lire également ceci (non dénué d'intérêt) :
    http://www.vb-helper.com/vb6tovb5.htm

    Tu sais, Progelect ?
    Je n'ai toujours pas installé VB6 (je reste... très heureux... avec VB5)

  11. #11
    Expert éminent sénior
    Avatar de ProgElecT
    Homme Profil pro
    Retraité
    Inscrit en
    Décembre 2004
    Messages
    6 091
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 68
    Localisation : France, Haute Savoie (Rhône Alpes)

    Informations professionnelles :
    Activité : Retraité
    Secteur : Communication - Médias

    Informations forums :
    Inscription : Décembre 2004
    Messages : 6 091
    Points : 16 640
    Points
    16 640
    Par défaut
    Je ne crois pas que c'est de troler que d'ajouter des informations sur cette discussion, donc j'ai regardé pour retrouver le mot Retained dans un .vbp, pour ma version de VB6 il existe bien ce mot, curieux tout de même que dans les Forms il soit indiqué VERSION 5.00.

  12. #12
    Membre éprouvé Avatar de DAUDET78
    Homme Profil pro
    retraité
    Inscrit en
    Janvier 2008
    Messages
    635
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 81
    Localisation : France, Yvelines (Île de France)

    Informations professionnelles :
    Activité : retraité
    Secteur : Industrie

    Informations forums :
    Inscription : Janvier 2008
    Messages : 635
    Points : 1 165
    Points
    1 165
    Par défaut
    Citation Envoyé par ucfoutu Voir le message
    Bon ===>>> VB5
    Hélas non, les fichiers .FRM générés par VB6 sont marqués VB5 ....

    Il suffi de l'ouvrir avec NotePad pour le constater.

  13. #13
    Inactif  

    Profil pro
    Inscrit en
    Juillet 2007
    Messages
    4 555
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2007
    Messages : 4 555
    Points : 5 537
    Points
    5 537
    Par défaut
    Re...

    Je ne vois aucun Troll, personnellement, bien au contraire : rien que de l'utile.
    J'ai donc interrpogé "ailleurs", en anglais et en huis clos ...
    L'embarras est le même et les réponses/suppositions des uns et des autres divergent trop pour que l'on puisse en retenir valablement une seule, bien que l'une d'entre elles me paraisse moins "improbable" que les autres.
    Je te la livre sans en prendre la paternité du tout :
    "Version 5.00" ne serait là que pour spécifier (un peu comme pour les fichiers .reg) la manière d'utiliser les données qui suivent.
    Ouvre (bloc-notes) un fichier .reg ... tu y trouveras ceci :
    Windows Registry Editor Version 5.00
    qui permet de savoir comment traiter les données du .reg
    Celui qui a émis cette supposition pense que :
    Version 5.00
    en 1ère ligne du fichier .frm joue un rôle similaire.

    Voilà donc où je/nous en suis/sommes ...

  14. #14
    Inactif  

    Profil pro
    Inscrit en
    Juillet 2007
    Messages
    4 555
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2007
    Messages : 4 555
    Points : 5 537
    Points
    5 537
    Par défaut
    Et voilà la suite, maintenant ...
    Ce sont les explications de la structure...

    Je laisse le texte tel quel, en anglais ...

    Let's have a look at the .frm structure.
    You have it here (part of) :

    VERSION 5.00
    Begin VB.Form Form1
    Caption = "Form1"
    ClientHeight = xxxx
    ClientLeft = xxxx
    ClientTop = xxx
    ClientWidth = xxxxx
    LinkTopic = "Form1"
    ScaleHeight = xxxxx
    ScaleWidth = xxxxx
    StartUpPosition = 3 'Windows Default
    Begin VB.CommandButton Command1
    and so on ....


    The very first line (VERSION 5.00) is there to describe the form module version. Then comes a line (line 2) for marking the start of the form form1.
    Then come some lines (up to startup position) for setting the properties of the form (Caption, Height, Left, Top, Width, LinkTopic, ScaleHeight, ScaleWidth, and StartUp Position).
    Voilà qui parait raisonnable.

    Et chacun est convenu de ce qu'il fallait maintenant arrêter là les explications, car on ne saurait aller plus loin....

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

Discussions similaires

  1. Réponses: 3
    Dernier message: 11/07/2011, 18h07
  2. Réponses: 37
    Dernier message: 23/02/2011, 12h22
  3. Diagramme de classe à partir du code source
    Par mehdiyou dans le forum Général Java
    Réponses: 5
    Dernier message: 20/02/2010, 01h15
  4. [Installation] comment installer SVN à partir de code source sous Debian
    Par bliml dans le forum Subversion
    Réponses: 1
    Dernier message: 23/08/2007, 08h05
  5. Comment créer un exe à partir des codes source
    Par daniel50171 dans le forum Autres éditeurs
    Réponses: 2
    Dernier message: 20/08/2007, 19h49

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