|
-
Oct 15th, 2002, 04:59 AM
#1
Thread Starter
Hyperactive Member
opening app from another app
Hi,
In my exe I have a command button. When this button is clicked it opens my help.exe (I use the treeview control in my help file).
Now, what I want to know is, is it possible to have the help file opened on a certain page when it's opened from the main app? Like when the above button, titled 'Using this program' is clicked, the page that loads in the help.exe is the relevant page to that part of the program?
If the user opens the helpfile by double clicking it (not through the main application) it opens up on the title page, rather than a particular page.
Is it possible to do this in vb? How?
-
Oct 15th, 2002, 05:45 AM
#2
Frenzied Member
Call the application (how do you do that? With Shell?) with a parameter. This parameter is passed into the called program as Command$.
The starting program can check to see what is in Command$ and do anything it likes based on the values.
-
Oct 15th, 2002, 06:39 AM
#3
Thread Starter
Hyperactive Member
Thanks Jordan, but I'm not too sure what you mean by the command$.
I use Shell:
Private Sub Command1_Click()
Call ShellExecute(hwnd, "Open", "project1.exe", "How do I use.htm", App.Path, 1)
End Sub
The application project1.exe opens, alright. I got that far. But I want it to open the page 'How do I use.htm.
If it's any use, I've got access to all source code for project1.exe. It's a web browser I've made myself.
Thanks.
-
Oct 15th, 2002, 07:12 AM
#4
Frenzied Member
In Project1, in the Form_Load procedure just put this line, and take it from there:
-
Oct 15th, 2002, 08:57 AM
#5
Thread Starter
Hyperactive Member
If I simply put msgbox command$ in the form_load of project1, project1 always loads showing a message box - even if I don't open project1 from project2.
And it doesn't go straight to "how do I use.htm" .
I tried this? Why doesn't it work? Been looking at similar problems and can't get it to work. What's wrong?
If Shell(Command$) = Shell(App.Path & "\how do I use.htm") Then
WebsterPro2.Navigate "file:///" & App.Path & "\how do I use.htm", NavGet, 0, "", "", ""
End If
Also dabbled in stuff like:
Shell Command$, open
-
Oct 15th, 2002, 12:05 PM
#6
-
Oct 16th, 2002, 04:20 AM
#7
Frenzied Member
In the Shell / ShellExecute you put:
MyProgram Myparameters
Then within the form_load area (or anywhere else really) of MyProgram you take a look at Command$. Command$ will have "Myparameters" in it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|