Results 1 to 8 of 8

Thread: Main Form will not LOAD!!!!

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2000
    Location
    Glasgow, MT, USA
    Posts
    44

    Post

    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?



  2. #2
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923

    Post

    Post your SubMain() code so we can have a look...

  3. #3

    Thread Starter
    Member
    Join Date
    Jan 2000
    Location
    Glasgow, MT, USA
    Posts
    44

    Post

    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

  4. #4
    Hyperactive Member
    Join Date
    Jan 2000
    Location
    Gloucestershire, England
    Posts
    301

    Post

    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..

  5. #5

    Thread Starter
    Member
    Join Date
    Jan 2000
    Location
    Glasgow, MT, USA
    Posts
    44

    Post

    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!

  6. #6
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923

    Post

    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

  7. #7

    Thread Starter
    Member
    Join Date
    Jan 2000
    Location
    Glasgow, MT, USA
    Posts
    44

    Post

    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,

  8. #8
    Lively Member
    Join Date
    Jan 2000
    Location
    North Yorkshire
    Posts
    102

    Post

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width