PDA

Click to See Complete Forum and Search --> : Main Form will not LOAD!!!!


Phil.Hebert
Jan 24th, 2000, 04:47 AM
I have a module that is my STARTINg point in my program, It loads the Splash Screen, the main form,and then close the splash screen! For some reason It will not open the main form!!! It works on my computer but not a another HP Pavilion!! If I can fix this problem,I can start shipping this program!

My main form has a SSTab, Menu, and ButtonBar Controls, Could it be one of the OCX or an out of date file?

I have:
P200mmx with Windows 98a

the HP is:
Pentium with Windows 98?

chrisjk
Jan 24th, 2000, 09:15 AM
Post your SubMain() code so we can have a look...

Phil.Hebert
Jan 24th, 2000, 01:35 PM
Gladly... This is all under my Begining Module:

------


Private Const HWND_TOPMOST = -1
Private Const HWND_NOTOPMOST = -2
Private Const SWP_NOMOVE = &H2
Private Const SWP_NOSIZE = &H1
Private Const SWP_NOACTIVATE = &H10
Private Const SWP_SHOWWINDOW = &H40
Private Const TOPMOST_FLAGS = SWP_NOMOVE Or SWP_NOSIZE
Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, Y, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long

Public Sub MakeNormal(Handle As Long)
'// Replaces the window in the ZOrder
SetWindowPos Handle, HWND_NOTOPMOST, 0, 0, 0, 0, TOPMOST_FLAGS
End Sub
Public Sub MakeTopMost(Handle As Long)
'// Sets the window in the ZOrder
SetWindowPos Handle, HWND_TOPMOST, 0, 0, 0, 0, TOPMOST_FLAGS
End Sub


Sub Main()
Load frmSplash
frmSplash.Show
DoEvents
MakeTopMost frmSplash.hwnd
Dim SoundFile As String, ReturnLength As Long
SoundFile = "d:\OpenJanex.wav"
Result = sndPlaySound(SoundFile, 1)
frmSplash.Refresh
Load frmMain
DoEvents
frmMain.Show
Unload frmSplash
End Sub

------

Anything else, I will send, I NEED THIS FIXED! PLEASE

Rick H
Jan 24th, 2000, 05:14 PM
Its not a problem with the sound file is it? Does that file exist on the other PC? does the other PC have a sound card??

Just an idea..

Phil.Hebert
Jan 25th, 2000, 03:20 AM
No its not the sound! I placed it in the project just recently, It did not work before that and still doesn't. Its weird how it works on my computer and two others, and not the HP with 98 on it!

chrisjk
Jan 25th, 2000, 06:04 AM
Hmmm, there is a lot of code there. I think you'll have to find out which bit is causing the problem by a process of elimination. Comment out all lines apart from the following

Load frmSplash
frmSplash.Show
Load frmMain
frmMain.Show
Unload frmSplash

If it works, then un-comment something and try again.

That's the best I can suggest - might take a while but almost guaranteed to work...

Good luck,

------------------
- Chris
chris.kilhams@btinternet.com
If it ain't broke - don't fix it :)

Phil.Hebert
Jan 25th, 2000, 02:00 PM
I tried THat, I think its in the Main form, Im thinking its has to do with either the Status Bar, ToolBar, or Menu. But I cant Single out the trouble,

andymac
Jan 25th, 2000, 09:58 PM
Have you tried removing each of the controls and seeing if it's a particular one ? Also check the version numbers of each of them to see if they're the same as on your machine or if they're out of date and for some reason not being updated.
We had a nightmare problem where we used the package creator thing (with SP3) and built an install on win98. Installed it on NT4 (SP5) and it completely trashed NT4 ! Had to rebuild it from scratch.
So just because you think the files are right, doesn't mean that they are !!!

cheers

Andy