Show help in c# showing proper topic but wrong content in CHM - winforms

Below is the code I am using to show my CHM file.
Help.ShowHelp(control, HelpFile, HelpNavigator.Topic, topic);
topic="/foo_Manual/foo-Define_Technologies_1-Chapter9/Defining_foo.htm.";
It is opening the proper html widow in the right; however, the left side's contents tab is always pointing to 1st chapter.

Try this one
Help.ShowHelp(Control, HelpFileName, HelpNavigator.TopicId, TopicID);

This depends on the way your CHM file is compiled and/or the last user action.
But you need AutoSync too (see attached picture of HTMLHelp Workshop).
Please note one that the last visited tab is saved to a hh.dat file: When a CHM file is compiled, you can define the default tab displayed when the file is opened. If a user opened one of the other tabs (e.g. the index) and closes the file, the next time the file is opened, it will be opened in the Index tab.
Following code is working for me:
Help.ShowHelp(this.btnOpenHelpShowTopic, helpProvider1.HelpNamespace, HelpNavigator.Topic, #"/Garden/flowers.htm");

Related

How to get the log file of an OMNeT++ simulation

Is there any way to get automatically the content of the log view in OMNeT++ presented below into a file (any type, even in a text file)?
Note that I am not talking about the .elog file generated automatically by OMNET++.
No, there is no way to automatically write the content of Log Viewer in Message mode.

file upload with angular-base64-upload no file selected text still appears even file is selected

This is implementation example of angular-base64-upload (Click see demo)
The issue is that , when I select the file , text No file selected with browse button still appear even file is selected !
is that issue in api ? or something missing in demo ?
I faced with the same problem, and found, that this plugin clears the input title after file was selected. The model associated with the control still works fine. Plugin author added this feature at the latest version (0.1.22), on the 26'th April, to resolve this bug: https://github.com/adonespitogo/angular-base64-upload/issues/66
There is another issue in the project list:
https://github.com/adonespitogo/angular-base64-upload/issues/103
according to our problem. So, I hope, this problem can be solved soon.

Make file open in current WPF application

I have a WPF application that I've associated with a custom file type.
The steps were:
1. Open Project Properties->Publish->Options->File Associations
2. Filled in Extension = .tr2, Description = TR2 file, ProgID = TR2File.tr2, Icon = W32.ico
3. Opened a blank text file, renamed it to test.tr2, double click it and the program starts up.
4. Created a second file, named test2.tr2, double click it and a second instance of my program starts up.
Now, I still haven't figured out how to actually open/read the files yet, but first I would really like to make it so that if the program is already running, then it just opens in the current app, and doesn't try to open a new instance of the app.
Have your program create a named pipe. When a second instance executes, before it does anything else, have it check for the existence of this named pipe. If it exists, open it and use it to send the filename being opened in the second instance, and then terminate. If it doesn't exist you don't have an existing instance, so you can open.

How to set the default page for a .CHM file in HTML Help Workshop?

When I open the help (.chm) application, I could see table of contents. By default, the first entry in the file is selected, however I couldn't see the corresponding page data. Instead, I see "This program cannot display the web page" (the default error message that comes in IE7).The page is displayed only when I click on any of the contents on the left side.
Is there a way of showing the page by default without clicking on the entry?
The following code is the .hhp file.
[OPTIONS]
Compatibility = 1.1 or later
Compiled file=Config.chm
Contents file=Config.hhc
Default topic=D:\apps\bin\Debug\html\Databases.htm
Language=0x409 English (United States)
Display compile progress=No
Title=ETL_Config Documentation
[FILES]
D:\apps\bin\Debug\html\Databases.htm
D:\apps\bin\Debug\html\InstanceInformation.htm
Your default topic should reference a relative file name inside the .CHM file, not a file outside of the .CHM.

How to start the associated program when selecting more than one files?

I have set .jpg file associated to my own program. I want to add the context menu to .jpg files, so I set the entry of HKCR.jpg\shell\open\command to "myProg.exe %1". After associating, there will be an item on the top of the context menu saying "Open image with myprog". This works right when I select a single .jpg file, but when I selected more than one file and click the top item of the context menu, nothing happended. How can I solve the problem?
Thank you very much
Each selected file will be sent to a new instance of your application. Your application should check if a previous version exists, or not. If a previous instance exists, it should sent its parameters to it (e.g. using Windows Messages) and then terminate.
Another approach is to use DDE (Dynamic Data Exchange), an old method used by Shell to send all files to one instance of your program.
You might need double quotes around the "%1".
Read this article for much more detailed information about how all this works.
http://msdn.microsoft.com/en-us/library/bb776883.aspx
Also, this blog entry talks about what you need to do specifically for multi-select command execution: http://blogs.msdn.com/pix/archive/2006/06/30/652889.aspx

Resources