Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old July 16th, 2003, 11:21 AM
anish001 anish001 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 6 anish001 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
how to open a .hlp file

Question 1:
I am using Following code on MDIform to show help

Private Sub tbrToolBar_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Key
Case "WorldWideWeb": Call itmWebBrowser_Click
Case "Help": SendKeys ("{F1}")
End Select

End Sub

my App.helpfile is defined properly as
App.HelpFile = App.Path & "\Help\anish01.hlp"

if I press F1 key on screen other than Mdiform, it works fine. but If I press on Mdiform, Application freezes and I have to restart the Application. any suggestions??? (On other screen, Keypreview property is set to true. MDIform does not have this property)


Question 2:

Everytime. User presses Help icon, index screen in my help file shows up. How can I show content screen.

is there any good link for "Help" ???

Reply With Quote
  #2  
Old July 22nd, 2003, 04:23 PM
lmck lmck is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 4 lmck User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Try executing the helpfile directly instead of using the sendkeys. Perhaps that will work.

Option Explicit

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

Private Sub ShowHelp()

Dim lngResult As Long

lngResult = ShellExecute(Me.hwnd, "open", App.HelpFile, vbNullString, vbNullString, 1)

End Sub

Reply With Quote
  #3  
Old November 15th, 2003, 11:00 PM
trajecto trajecto is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 1 trajecto User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Error Checking

Add some error checking to boot:

Private Sub mnuContents_Click()

Dim lngResult As Long

If Len(App.HelpFile) < 20 Then

MsgBox "Unable to display Help Contents. There is no Help associated with this project.", vbInformation, Me.Caption
Else
On Error Resume Next
lngResult = ShellExecute(Me.hwnd, "open", App.HelpFile, vbNullString, vbNullString, 1)
If Err Then
MsgBox Err.Description
End If
End If

End Sub

Reply With Quote
  #4  
Old November 16th, 2003, 07:29 AM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
I feel it's good way that use shellexecute function to avoid freeze the application form..

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > how to open a .hlp file


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway