Solved

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

Posted on 2003-10-29
4
239 Views
Last Modified: 2010-05-03
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
0
Comment
Question by:SaiSeng
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
fantasy1001 earned 250 total points
ID: 9648057
There are problem with the sendkey method, you api:

Add this declaration on top of your mdiform code
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)

Change this sub

Private Sub mnHelpManual_Click()
'    SendKeys ("{F1}")
    keybd_event 112, 0, 0, 0
    keybd_event 112, 0, &H2, 0
End Sub

I have test it out and it works fine at my computer.

Thanks
Fantasy
0
 

Author Comment

by:SaiSeng
ID: 9648911
~ 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
0
 
LVL 5

Expert Comment

by:fantasy1001
ID: 9648985
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 ~
0
 

Author Comment

by:SaiSeng
ID: 9650629
YES!!! done.. thanks Fantasy. ;P
it works!!
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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question