Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Form won't load

Posted on 2000-04-06
11
Medium Priority
?
200 Views
Last Modified: 2010-08-05
I have 2 machines - one tests the application setup.
The app has a .bas with a sub main() and this sub eventually loads a form - frmMain thus:-

....
Load frmMain

frmMain has this code:-
Private Sub Form_Load()
Dim a$, b$, c$, e As Boolean, er$, f1&, f2&, i&, j&, k1&, k2&, k$, ky0$, ky1$, ky2$, l&, m$, n$, p&
Dim r$, u$(), v As Variant, x As Boolean
Dim s5 As String * 5, s20 As String * 20, Img As ListImage
Dim cl As New Collection, sz As New Collection
Dim dt As DETAIL_TYPE, dr() As DIRECTORY_TYPE, fl As Folder

msgSplash.Label(6) = "Loading Main"
DoEvents

some of the dims are user defined types.
msgSplash is a splash from loaded in Sub Main()

If I compile it to an exe and run it on the machine it was compiled on, then no problems. But if I copy it to the other machine, it does not reach the label(6)

Previous versions have worked and I can't think what I've changed.

Any ideas.
0
Comment
Question by:broadbent
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
11 Comments
 
LVL 6

Expert Comment

by:st_steve
ID: 2689251
where are the data types defined?? are they defined as public types?? Any messages when you run the application on other computers?? does the application hang (stop responding)? or does it just doesn't show the form??
0
 
LVL 4

Author Comment

by:broadbent
ID: 2689338
Data types are defined in .bas file as public

What I expect to see is the splash screen with a message appearing as it goes through the program. So the splash form is visible and the last message shows "about to load frmMain" which should disappear immediately when the frmMain is loaded. Instead it just hangs with the splash form visible. No error message.

frmMain is not visible at this point.
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 2689382
I assume you get some error like number 530, which means that either the runtime vb is missing or some of the ocx is missing---
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 4

Author Comment

by:broadbent
ID: 2689397
no error number - just hangs
0
 
LVL 4

Author Comment

by:broadbent
ID: 2689409
no error number - just hangs
0
 
LVL 4

Expert Comment

by:gcs001
ID: 2689444
Have you installed all the DLL's necessary to run the VB app on the Test machine?
0
 
LVL 1

Expert Comment

by:derekcmartin
ID: 2689527
I noticed the line

msgSplash.Label(6) = "Loading Main"

so what you have is an array of labels?  

Maybe, this should be
msgSplash.label6 = "Loading Main"

If you do have an array, try

msgSplash.label(6).caption = "Loading Main"

Hope it works
0
 
LVL 14

Expert Comment

by:wsh2
ID: 2690826
Doing a DoEvents in a Form_Load just does NOT make sense.. try changing..

From:

msgSplash.Label(6) = "Loading Main"
DoEvents

To:

msgSplash.Label(6) = "Loading Main"
msgSplash.Label(6).Refresh

To achieve the effect you want.. <smile>.

0
 
LVL 4

Author Comment

by:broadbent
ID: 2690878
I have an array of labels.
The default property of a label is caption so you don't need it. (it does work - promise)
The doevents is there to allow the label to catch up, but you may be right.

However it still hangs
0
 
LVL 14

Accepted Solution

by:
wsh2 earned 400 total points
ID: 2691011
Did you use the Packaging and Deployment Wizard to "install" your program on the second machine or just copy it over? (There is a chance your components are out of version synch, and this would correct that problem).

If you did use PDW, then did you Uninstall first before Re-Installing? In other words, physically check to make sure that the program.exe (and components) have been updated / changed to the newest version (compare file sizes, times and dates).
 
Precisely which message was the last to show? The one in Sub Main.. or the one in frmMain Form_Load? If it is the one in Form_Load, then you have a Logic problem somehere in frmMain. As you have defined a Folder Type variable, I am assuming that you are using FSO (Is SCRRUN.DLL installed on the other machine?). As every machines file environment is different, I would first check out that section of code.

Short of this.. add some testing MsgBoxes, if you checked any of the Project.. Project1 Properties.. Compiler.. Advanced Optimizations options.. uncheck them, recompile and give it another shot.
0
 
LVL 4

Author Comment

by:broadbent
ID: 2692758
I discovered this - but thanks for your confirmation. I'll do a little more work to test this as you've suggested.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

704 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