J'ai récemment téléchargé VB6 pour ouvrir un fichier .VBP que je suis en train de convertir en VB2010. Mon but est d'exécuter le programme sur VB6 afin que je puisse parcourir le code ligne par ligne afin de déboguer le programme que j'écris de zéro dans VB2010.Onglets VB6 ne s'affichent pas sur le formulaire
Le programme, qui fonctionne sur une machine virtuelle, a une forme de starup qui ressemble à ceci:
Cependant, quand je considère le formulaire de démarrage sur VB6, je vois ceci:
Comme vous pouvez le voir, les pages à onglet sont manquantes. Lorsque j'exécute le code, le débogueur interrompt à la première ligne qui implique les pages à onglet (FrontWeights, etc sont tous les noms de quelques pages (noms de GRIDS, pas de pages à onglet), et le débogueur interrompt " FrontWeights.ColWidth (1) = 4280 + 1000"):
Private Sub Form_Load()
Screen.MousePointer = 11
Width = 10680
Height = 6816
FrontWeights.ColWidth(1) = 4280 + 1000
FrontWeights.ColWidth(2) = 1109
FrontWeights.ColWidth(3) = 1109
FrontWeights.ColWidth(4) = 1109
For I = 1 To 100
FrontWeights.AddItem Str$(I), I
Next I
FrontWeights.Row = 0
FrontWeights.Col = 1
FrontWeights.Text = "Description"
FrontWeights.Col = 2
FrontWeights.Text = "Quantity"
FrontWeights.Col = 3
FrontWeights.Text = "Weight (lbs)"
FrontWeights.Col = 4
FrontWeights.Text = "Offset (in)"
BogieWeights.ColWidth(1) = 4280 + 1000
BogieWeights.ColWidth(2) = 1109
BogieWeights.ColWidth(3) = 1109
BogieWeights.ColWidth(4) = 1109
For I = 1 To 100
BogieWeights.AddItem Str$(I), I
Next I
BogieWeights.Row = 0
BogieWeights.Col = 1
BogieWeights.Text = "Description"
BogieWeights.Col = 2
BogieWeights.Text = "Quantity"
BogieWeights.Col = 3
BogieWeights.Text = "Weight (lbs)"
BogieWeights.Col = 4
BogieWeights.Text = "Offset (in)"
CenterWeights.ColWidth(1) = 4280 + 1000
CenterWeights.ColWidth(2) = 1109
CenterWeights.ColWidth(3) = 1109
CenterWeights.ColWidth(4) = 1109
For I = 1 To 100
CenterWeights.AddItem Str$(I), I
Next I
CenterWeights.Row = 0
CenterWeights.Col = 1
CenterWeights.Text = "Description"
CenterWeights.Col = 2
CenterWeights.Text = "Quantity"
CenterWeights.Col = 3
CenterWeights.Text = "Weight (lbs)"
CenterWeights.Col = 4
CenterWeights.Text = "Offset (in)"
InternalPipingGrid.ColWidth(1) = 3005
InternalPipingGrid.ColWidth(2) = 795
InternalPipingGrid.ColWidth(3) = 795
InternalPipingGrid.ColWidth(4) = 795
InternalPipingGrid.ColWidth(5) = 795
InternalPipingGrid.ColWidth(6) = 795
InternalPipingGrid.ColWidth(7) = 795
InternalPipingGrid.ColWidth(8) = 795
For I = 1 To 100
InternalPipingGrid.AddItem Str$(I), I
Next I
InternalPipingGrid.Row = 0
InternalPipingGrid.Col = 1
InternalPipingGrid.Text = "Description"
InternalPipingGrid.Col = 2
InternalPipingGrid.Text = "Lbs/Ft"
InternalPipingGrid.Col = 3
InternalPipingGrid.Text = "Gal/Ft"
InternalPipingGrid.Col = 4
InternalPipingGrid.Text = "Passes"
InternalPipingGrid.Col = 5
InternalPipingGrid.Text = "X Front"
InternalPipingGrid.Col = 6
InternalPipingGrid.Text = "Y Front"
InternalPipingGrid.Col = 7
InternalPipingGrid.Text = "X Rear"
InternalPipingGrid.Col = 8
InternalPipingGrid.Text = "Y Rear"
KingPinWeights.ColWidth(1) = 4280 + 1000
KingPinWeights.ColWidth(2) = 1109
KingPinWeights.ColWidth(3) = 1109
KingPinWeights.ColWidth(4) = 1109
For I = 1 To 100
KingPinWeights.AddItem Str$(I), I
Next I
KingPinWeights.Row = 0
KingPinWeights.Col = 1
KingPinWeights.Text = "Description"
KingPinWeights.Col = 2
KingPinWeights.Text = "Quantity"
KingPinWeights.Col = 3
KingPinWeights.Text = "Weight (lbs)"
KingPinWeights.Col = 4
KingPinWeights.Text = "Offset (in)"
LandingLegWeights.ColWidth(1) = 4280 + 1000
LandingLegWeights.ColWidth(2) = 1109
LandingLegWeights.ColWidth(3) = 1109
LandingLegWeights.ColWidth(4) = 1109
For I = 1 To 100
LandingLegWeights.AddItem Str$(I), I
Next I
LandingLegWeights.Row = 0
LandingLegWeights.Col = 1
LandingLegWeights.Text = "Description"
LandingLegWeights.Col = 2
LandingLegWeights.Text = "Quantity"
LandingLegWeights.Col = 3
LandingLegWeights.Text = "Weight (lbs)"
LandingLegWeights.Col = 4
LandingLegWeights.Text = "Offset (in)"
RearWeights.ColWidth(1) = 4280 + 1000
RearWeights.ColWidth(2) = 1109
RearWeights.ColWidth(3) = 1109
RearWeights.ColWidth(4) = 1109
For I = 1 To 100
RearWeights.AddItem Str$(I), I
Next I
RearWeights.Row = 0
RearWeights.Col = 1
RearWeights.Text = "Description"
RearWeights.Col = 2
RearWeights.Text = "Quantity"
RearWeights.Col = 3
RearWeights.Text = "Weight (lbs)"
RearWeights.Col = 4
RearWeights.Text = "Offset (in)"
Screen.MousePointer = 0
End Sub
Toute aide sur la façon dont je peux résoudre ce problème? FYI - c'est un projet de travail, donc je serais hésitant à partager/télécharger des fichiers.
EDIT: texte du fichier projet:
Type=Exe
Module=MODULE11; TransWgt.Bas
Form=TankSize.frm
Form=Properti.frm
Form=Bulkhead.frm
Form=PrintOut.frm
Form=Drawing.frm
Object={6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0; COMCTL32.OCX
Object={00028C01-0000-0000-0000-000000000046}#1.0#0; DBGRID32.OCX
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\Windows\SysWOW64\stdole2.tlb#Standard OLE Types
Reference=*\G{00025E01-0000-0000-C000-000000000046}#4.0#0#C:\Program Files (x86)\Common Files\Microsoft Shared\DAO\DAO350.DLL#Microsoft DAO 3.0 Object Library
Form=InputData.Frm
Startup="InputDataForm"
HelpFile=""
Title="Transport Weight Analysis"
ExeName32="TransWgt.Exe"
Command32=""
Name="TransportWeightAnalysis"
HelpContextID="0"
CompatibleMode="0"
MajorVer=1
MinorVer=0
RevisionVer=0
AutoIncrementVer=0
ServerSupportFiles=0
VersionComments="This is a pre-release version of this program."
VersionCompanyName="E.D. Etnyre & Co."
VersionFileDescription="Program for calculating weight distributions of any transport."
CompilationType=0
OptimizationType=0
FavorPentiumPro(tm)=0
CodeViewDebugInfo=0
NoAliasing=0
BoundsCheck=0
OverflowCheck=0
FlPointCheck=0
FDIVCheck=0
UnroundedFP=0
StartMode=0
Unattended=0
Retained=0
ThreadPerObject=0
MaxNumberOfThreads=1
EDIT 2: changé de forme VM à ce que l'écran affiche ensemble (c.-à-un menu)
EDIT 3: Il y avait un fichier .CLS que VB6 n'était pas en mesure de charger initialement. J'ai ajouté manuellement non. Maintenant, quand je cours, mon erreur indique «Erreur de compilateur: procédure extérieure invalide»
Les billes dans ma tête pense que n'est pas le contrôle standard TabStrip fourni avec VB6. On dirait un produit de tiers. Le code que vous avez posté semble remplir une grille. – LarsTech
Affiche le contenu du fichier VBP. –
Le texte est ajouté. En outre, j'ai été en mesure d'utiliser l'Assistant de mise à niveau VB2008 pour mettre à niveau le fichier .VBP VB6. Il y a une tonne d'erreurs de syntaxe, mais le contrôle de tabulation n'est pas présent, si cela aide –