Link to home
Start Free TrialLog in
Avatar of SaiSeng
SaiSeng

asked on

MDIforms: Couldnt load CHM help in some forms (Urgent)

I have my program @ www.geocities.com/saiseng84/myCoding.zip
Can you guys take a look what happened to my program?
my program couldnt load the chm help file after login
some forms can but some forms couldnt load the chm help.

Username Pswd
- admin abc123
- user abc123

thanks.
saiseng
ASKER CERTIFIED SOLUTION
Avatar of fantasy1001
fantasy1001

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SaiSeng
SaiSeng

ASKER

~ weird things happened after apply the solution given by Fantasy,
it works but the following situation happened to me, does it to you??? ~
[01]
after user have run the application, then close the product view THEN
   click help button OR "F1"
   the help file doesnt show straight away, user will have to click on the help button again
   then only shows the help file

[02]
IF
login as user
AND straight away click the help
OR   click "delete order" button
OR   click "my profile" button
THEN
   click help button OR "F1"
   the help file doesnt show straight away, user will have to click on the help button again
   then only shows the help file
END IF

[03]
IF
login as admin
AND straight away click the help
OR   click "customer maintenance" all sub buttons
OR   click "ordermaintenance > new order & delete order" button
OR   click "product maintenance" all sub buttons
OR   click "change password" button
THEN
   click help button OR "F1"
   the help file doesnt show straight away, user will have to click on the help button again
   then only shows the help file
END IF


Thanks Fantasy ;P
Donn't use keybd_event, try to open the chm directly,

add this line to the top of the code
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

add this line
Private Sub mnHelpManual_Click()
    Dim ret As Long
    ret = ShellExecute(Me.hwnd, vbNullString, App.HelpFile, vbNullString, App.Path, 1)
end sub

Thanks,
~ fantasy ~
Avatar of SaiSeng

ASKER

YES!!! done.. thanks Fantasy. ;P
it works!!