weird VB issue

Associate
Joined
1 Mar 2006
Posts
425
i made something in VB6 (i know its donkeys old) but still

when i run the project from within VB (using F5) it runs fine

it also compiles to EXE without issue

however once i click on the exe from the desktop it timers for a second and doesn't load ...it is however running in the task manager in the backround and using memory


what could this be??


thanks in advance
 
sounds like dodgy code tbh, do you have any crazy loops hogging cpu on form load ? (if you do, put a few 'doevents' in to stop the 'hogging')

another thing I guess to some extent could be VB runtimes are not registered correctly, though I would expect a error msg
 
i dont have any loops in the form_load

would it be an idea to create a blank form as the startup just to see if the runtimes are registed properly...or wouldn't that tell me much?
 
yeah deffo, just try make a exe with a blank form and see if that loads... should isolate the problem to some extent

good thinking :)
 
i have created other programs with VB6 that have run but they dont use stuff like Winsock control or RTB etc

the program that doesnt load...it should when fully running ...join a channel on an irc server...it never gets that far...

is there a way to see how far into the code it is getting before it dies?
 
not sure tbh, not once made into a .exe ....you could just strip out suspect components / code until it works. Shouldn't take long.
 
should still be easy.... very little of that code will run at load / form load. Just hack out the likely suspects one by one, like 3rd party controls etc, API calls etc

i'm no coder (well not anymore) ,maybe someone else here has better ideas...
 
You could try writing messages to a text file on disk throughout the load event. This would tell you what line it is getting upto (and seemingly failing on).

What actually happens in the load event? Is it doing the IRC server connect at this point? Maybe try running this code on a timer control and enable the timer in the load event. This way it will wait until the form has loaded (and is visible onscreen) before connecting.
 
Is the IDE passing any parameters to the program? Then when you double click the exe, those params won't be there.
 
^ yeah i think its got something to do with me setting values and pulling values from places that dont exist yet


thanks guys ill try it later
 
Back
Top Bottom