Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 202
  • Last Modified:

Form won't load

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
broadbent
Asked:
broadbent
1 Solution
 
st_steveCommented:
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
 
broadbentAuthor Commented:
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
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
broadbentAuthor Commented:
no error number - just hangs
0
 
broadbentAuthor Commented:
no error number - just hangs
0
 
gcs001Commented:
Have you installed all the DLL's necessary to run the VB app on the Test machine?
0
 
derekcmartinCommented:
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
 
wsh2Commented:
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
 
broadbentAuthor Commented:
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
 
wsh2Commented:
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
 
broadbentAuthor Commented:
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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now