Join 150,131 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 2,148 people online right now. Registration is fast and FREE... Join Now!
I have a help file that is in .chm format. I can get it to open using the helpprovider but at the moment that only works if the user presses the F1 button. This program is very simple so if the user actually needs help with it I don't think they are going to know enough to press F1 for help. How can I make it so that if they go under the help menu and click on help the chm file will open like it does with the helpprovider?
Is this vb6 / a VB.net version of basic.(eg an Express Edition)
Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.
The only way I know of is to use the ShellExecute API.
CODE
Private Declare Function ShellExecute Lib "Shell32" (hWnd As Long, _ ByVal lpOperation As String, ByVal lpFile As String, _ ByVal lpParameters As String, ByVal lpDirectory As String, _ nShowCmd As Long) As Long
I am using Microsoft Visual Basic 2008 Express Edition. I am attaching the code as a file because for some reason whenever I try to post the code the post acts like I didn't type anything at all and wont let me post it.
Attached File(s) Code.txt ( 89.42k )
Number of downloads: 48
The only way I know of is to use the ShellExecute API.
CODE
Private Declare Function ShellExecute Lib "Shell32" (hWnd As Long, _ ByVal lpOperation As String, ByVal lpFile As String, _ ByVal lpParameters As String, ByVal lpDirectory As String, _ nShowCmd As Long) As Long
Thank you for letting me know what you would do but what exactly does that do? When I put it in vb 2008 it comes up with a bunch of errors. Could you explain what you are doing?
Have you tried addimg an HelpProvider object to the form Set Namespace to help file location.
helpprovider only shows the help window when the user presses F1, i am trying to get it like any normal program where you go to the help menu and click the help button
Have you tried addimg an HelpProvider object to the form Set Namespace to help file location.
helpprovider only shows the help window when the user presses F1, i am trying to get it like any normal program where you go to the help menu and click the help button
sorry didnt notice the other posting. How would the code you mentioned work? would it be using an html help file off of a website or a help file installed on the user's computer? Also, when i paste that code into the program it spits out a handful of errors but when i type it in by hand it turns out fine but the option that it gives between the < and > is, i think, for me to put in a web address that i would be getting the help file from. I have it all set up for me to use an actual file from the computer that would be installed with the program. If the internet is the only way to use this then i guess that i can set it up that way, but i would prefer not to seeing as i already have it made.