Solved

Forms Loading As Modules

Posted on 2006-11-09
14
990 Views
Last Modified: 2012-06-21
Hi,

  I have a VB6 project and am trying to load it onto another computer with VB6.  However, it says "error during load" and the log says that the forms aren't being loaded (the forms are physically located in the same directory as the project file, along with their associated *.frx files).  When I try to manually add these forms, they show up as modules!

  Any ideas?

Thank you,
TK
0
Comment
Question by:tkeeler1
14 Comments
 
LVL 20

Assisted Solution

by:hes
hes earned 50 total points
ID: 17906322
Is the version of VB6 the same on both machines(Pro vs Enterprise)
Is the Service Pack level the same (sp1-sp6)
0
 

Author Comment

by:tkeeler1
ID: 17906605
I'm not sure.  I don't have the original computer anymore.  If not, is there a work-around for this problem?

Thanks,
TK
0
 
LVL 11

Expert Comment

by:Dany Balian
ID: 17907894
when the form fails to load... usually it creates a log file in the same folder with the same name as the form

check it... maybe the form is referencing an ocx or dll that doesnt exist anymore

hope this helps...

dan
0
 

Author Comment

by:tkeeler1
ID: 17909977
The error log just says that the form failed to load!  :(  No help....

Is there anything you know of that's different in the headers of different VB6 versions, that would make this problem happen?

Thanks,
TK
0
 
LVL 12

Assisted Solution

by:jkaios
jkaios earned 50 total points
ID: 17910415
In addition to what mrdanny suggested, which seemed to the closer/correct answer is that you have to check your project file, too.
The project file is the one that ends with .vbp and check if your project contains references to any OCX or ActiveX DLL.

References to OCXs are stored in the .VBP file with lines starting with "Object="
References to DLLs are stored in the .VBP file with lines starting with "Reference="

You probably might have referenced one of these OCXs or DLLs in your project that do not exist on the other machine.
0
 

Author Comment

by:tkeeler1
ID: 17911947
Hi,

  Even forms without any DLLs or OCX's needed (like the "About" screen) didn't load.  I know what you mean though-- I've tried loading it without the DLLs in the past, and gotten a different error (like couldn't find library).  This one's just different--  no forms load no matter what.

Any other ideas?

Thanks,
TK
0
 
LVL 11

Expert Comment

by:Dany Balian
ID: 17912223
do u think u can upload the vbp file and maybe one form (the "about form") to eestuff.com? so that we'll take a look??

cheers,

dan
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:tkeeler1
ID: 17914083
Hi Dan,

  How do you upload files to EEstuff.com?

Thanks,
TK
0
 

Author Comment

by:tkeeler1
ID: 17914142
Hi Dan,

  I figure that it might be easier to post the code here.  The error I'm getting in the FrmAbout.log is the following:

'0' could not be loaded
Line 0: The file C:\Documents and Settings\user\Desktop\frmAbout.frm could not be loaded.

Here's the VBP code (note that there are some references to OCX's that won't load-- but the main problem is that the form isn't loading):
----------------------------------------------
Type=Exe
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\..\WINDOWS\system32\stdole2.tlb#OLE Automation
Reference=*\G{D1BA5044-2242-11D2-9F5A-00A0C9879443}#1.0#0#..\..\..\..\Program Files\ARAT\EWOSS 2000\SaxComm6.ocx#Sax Comm Objects 6.0
Object={D1BA5044-2242-11D2-9F5A-00A0C9879443}#1.0#0; SaxComm6.ocx
Reference=*\G{DB797681-40E0-11D2-9BD5-0060082AE372}#5.0#0#..\..\..\..\WINDOWS\SYSTEM32\XceedZip.dll#Xceed Zip Compression Library v5.1
Reference=*\G{91493440-5A91-11CF-8700-00AA0060263B}#2.6#0#..\..\..\..\Program Files\Microsoft Office\OFFICE11\msppt.olb#Microsoft PowerPoint 9.0 Object Library
Reference=*\G{293364AC-43F8-11D3-BC2D-4000000A2806}#2.0#0#..\..\..\..\WINDOWS\SYSTEM32\cgziplibrary.dll#CodeGuru Zip Library
Reference=*\G{420B2830-E718-11CF-893D-00A0C9054228}#1.0#0#..\..\..\..\WINDOWS\system32\scrrun.dll#Microsoft Scripting Runtime
Object={3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0; RICHTX32.OCX
Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0; COMDLG32.OCX
Object={BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0; TABCTL32.OCX
Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCTL.OCX
Object={86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCT2.OCX
Object={38911DA0-E448-11D0-84A3-00DD01104159}#1.1#0; COMCT332.OCX
Object={648A5603-2C6E-101B-82B6-000000000014}#1.1#0; MSCOMM32.OCX
Form=frmAbout.frm
Module=Settings; Settings.bas
Module=Registry; Registry.bas
Module=SendBinaryMDS; Binary.bas
Module=CMWS; CMWS.bas
IconForm="MainForm"
Startup="MainForm"
HelpFile=""
Title="ARATSSL"
ExeName32="ARATSSL.exe"
Command32=""
Name="EEARATSSL"
HelpContextID="0"
CompatibleMode="0"
MajorVer=2
MinorVer=0
RevisionVer=0
AutoIncrementVer=0
ServerSupportFiles=0
VersionCompanyName="SRI International"
CompilationType=0
OptimizationType=2
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
DebugStartupOption=0

[RVB]
DeleteClass1=MDIForm1
DeleteClass2=Form1
DeleteClass3=frmSplash

[MS Transaction Server]
AutoRefresh=1

---------------------------------------

FrmAbout Code:

VERSION 5.00
Begin VB.Form frmAbout
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "About Goodies"
   ClientHeight    =   5985
   ClientLeft      =   2340
   ClientTop       =   1935
   ClientWidth     =   9675
   ClipControls    =   0   'False
   Icon            =   "frmAbout.frx":0000
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   299.25
   ScaleMode       =   2  'Point
   ScaleWidth      =   483.75
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  'CenterOwner
   Begin VB.PictureBox Picture1
      AutoRedraw      =   -1  'True
      AutoSize        =   -1  'True
      Height          =   3510
      Left            =   2280
      Picture         =   "frmAbout.frx":0442
      ScaleHeight     =   3450
      ScaleWidth      =   3450
      TabIndex        =   17
      Top             =   360
      Width           =   3510
   End
   Begin VB.CommandButton cmdOK
      Cancel          =   -1  'True
      Caption         =   "OK"
      Default         =   -1  'True
      Height          =   345
      Left            =   7560
      TabIndex        =   0
      Top             =   5400
      Width           =   1260
   End
   Begin VB.Label ClassEmail
      Caption         =   "Goodies@arat.army.smil.mil"
      BeginProperty Font
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   -1  'True
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   240
      Left            =   1800
      TabIndex        =   16
      Top             =   5640
      Width           =   4605
   End
   End
Attribute VB_Name = "frmAbout"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

--------------------------------------------
Thanks for your help!
TK
0
 
LVL 11

Accepted Solution

by:
Dany Balian earned 100 total points
ID: 17914305
well i copied and pasted ur code into a project1.vbp and frmabout.frm

and i got the same errors, when i double click on the form in designview

the problem is because i dont have ur frx files which contains the pictures of the document...
so i removed the lines that reference the frx files...
(the form icon line and the picturebox picture line)

and the project and form loaded normally... (except ofcourse for the ocx errors)

so i guess there's sthg wrong in the frx files...
if u remove them.. ur project will load... without pictures...

so remove the frx lines from the forms that give u error only...

is that a good solution???

waiting for ur feedback...

cheers,

dan

0
 

Author Comment

by:tkeeler1
ID: 17915514
Hmm... this doesn't solve the problem of why the frx files worked on my old computer, and not this one... ?

I have several forms in this project that won't load, so I'm hesitant to redo all of them, if there's a better fix.  Is there any wayt to determine if there's a line or some syntax error that would make everything work?

Thanks,
TK
0
 
LVL 27

Assisted Solution

by:Ark
Ark earned 50 total points
ID: 17928759
Not sure, but did you try change relative path like
..\..\..\..\WINDOWS\system32\stdole2.tlb
to absolute
C:\WINDOWS\system32\stdole2.tlb
0
 

Author Comment

by:tkeeler1
ID: 17934771
Okay, I don't think I'm getting anywhere... it's just so strange that versions of VB6 can be so different that a project file won't open!  If anyone comes up with a solution for this, let me know.....

thanks,
TK
0
 

Expert Comment

by:mnoonan080700
ID: 23713306
I know this has been closed for a while but I stumbled upon this when searching for a resolution to the same problem (and it doesn't seem like there was really a solution given here).  What I found was that my source control application (Clearcase) had a text mode setting set wrong so that my form files where not formatted correctly (no carriage returns or line feeds).  Once I corrected that all was well again.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now