How to create a help file - c#

I want to create a help file opens when pressed F1 anytime. How to create it and include to code?

You are asking two things which are separate issues:
Create a help file.
This can be tricky depending on how you do it. There are many different options, some launch a web browser to a online help while others launch a help viewer of some kind. I have also seen people having simple help viewer implemented in simple controls like some kind of browser control or rich text viewer. To create a external file (like a *.chm file) I would use a commercial package like robohelp, there are SDKs from Microsoft, but packages like RoboHelp makes lift so much easier.
Launch the help
To get the help to be displayed you normally (in the case of an *.chm file or an web browser) need to launch the viewer program. The help SDK from Microsoft contains help for this, but you may also just lauch the program as any other program. Take a look at the System.Diagnostics.Process class.

If you want to create a CHM help file you may check out HelpNDoc which is a perfect tool to create PDF,HTML and CHMs instantly. If it comes to launching, mrz is also perfectly right.

There is a help SDK that microsoft provides
check it out:
http://msdn.microsoft.com/en-us/library/ms670169
Im assuming this is what your looking for?
you could set F1 to one of these HTML pages?

If your program is rather simple, a single HTML file opened in the user's default browser should be ok. But if Your application is a bit more complex, there's no real alternative to a chm file.
You might also include a PDF which describes common use-cases. (Like a book about using your software)

You can create your help in HTML format and for viewing, you can create a Form which has an embedded browser in it, and load the index (or whatever you call the first page) in the browser.

Related

How to create .xsn (InfoPath) file programmatically

We have a 3rd party component that takes INPUT as an .xsn (InfoPath2007) file and gives a pre-determined output. It was all fine until one of our client decided not to use MS-InfoPath anymore and as such even our 3rd party component is not able to function as we are not able to create xsn files (which were created by a human-InfoPath user till now, until InfoPath was discontinued in their group)... so the challenge for us is to create these SIMPLE (textbox, dropdown, date-picker and check-radio-box controls) InfoPath like forms -- .XSN files programmatically. Is this possible? Are there any APIs or Object-model based functions that can be leveraged for this task. Our team is predominantly C# developers. Our current analysis reveals that files pertaining to manifest, XML, J-scripting parts of .XSN might be achievable after some careful coding... however XSL (part that is associated with layout) seems to be a big gamble. Any pointers on this subject will be greatly appreciated.
UPDATE (as the problem statement does not seem to clear yet):
We do not want to convert InfoPath form into any HTML or alike format.
NOW here, we need to create some simple (pre-determined control-types with their known data) InfoPath forms programatically in .xsn file format. We want this to be done programatically, because earlier it was being done by a human-client who no longer subscribes to InfoPath-license and hiring another human for doing this is ruled out for various HR-reasons. So this "programatically"created xsn-file is fed it into this 3rd party component. Then this 3rd party component reads through the various parts inside the xsn-input and manipulates on it, into an output custom-file-frmat such that the custom 'workflow-component' keeps working further ahead... so hope you get the bigger picture now. Now an xsn file is essentially a CAB file consisting of many parts-components like manifest, xsL, xsD, xmL, images, jScript etc. So now if I have a winforms or ASP.NET webform... is it possible to write some component (using InfoPath object model or APIs) which can read through the UI-controls of this winform and then come up with the essentials that need to go into xsL, xmL, manifest etc so as to "collectively get compressed" into an InfoPath form!!!
Yes it is possible to Automatically create InfoPath Template Forms. The XSN is nothing but a cabinet file (.CAB) having the extension renamed to .xsn.
To further understand what are the contents of CAB file and what do they do, please follow the link:
A beginner's guide to forms and form templates
Following are the links that shall help you further.
Microsoft Cabinet Software Development Kit
A relevant Q&A to open CAB through C# program

monitoring most common web browsers c#/vc++/c

i'm trying to do a download manager just for learning cos i'm new in windows programming,
could someone tell me how to monitor most common web browsers,
i'd like to implement something like:
http://www.iwisoft.com/videodownloader/video-downloader-features.php
everytime you visit a web page in common browsers detects all video files in the web page and allow you to download or not the file, any idea how to do that without building an app for every browser, which is the best language to do it c#/vc++/managed/unmanaged,
i'm learning and using a mix of all to do other parts like download files, add rules to firewall or modify the registry
thanks a lot
I don't really know a neat way of doing this, but you could try the following :
Enumerate the name of the current window using GetForegroundWindow.
Check if the name you get using GetWindowText matches the usual name of the browser.
If it is a browser, moniter the clipboard and check for hyperlinks
then do your download stuff.
I program in C++ and assembly, but I wouldn't be able to advice you on the programming language since I don't have any experience with C#. But since you are new, I would suggest starting out with basic stuff. As pointed out in your comment, this is not something that can be achieved easily.

Creating winforms help file

I'm looking to create a indexable help file for a winforms app, but how do you get started?
The Microsoft MSDN is rubbish, it says "create a new project" but doesn't specify which type to create.
How do I go about creating a help file for my applications?
Are you looking for this
Integrating "Help" into WinForms Application?
Maybe this doesn't count as a real answer:
I would vote against those help files. 5-6 years back we had real context sensitive help files on a per-dialog-basis in our applications, and it was a lot of effort to maintain those.
Therefore, we changed this to shipping "simple" PDF files that appear on F1. We never got any complaints from users.
Recently we started migrating this to real HTML websites with lots of individual pages, a search function, "prev" and "next" navigation, and a printer-friendly format. This enables us to update the manual much quicker and makes it more "linkable" compared to PDF.
Personally, I really never get warm with those help files. E.g. I still do not understand why some files need to be trusted, before I can open and view them.

How can I launch a windows application from a webpage?

We have a company intranet and the powers that be think it would be nice to have a collection of icons/links representing the applications that most reps use (Outlook, Excel, few other apps).
The idea would be that if the application is installed, clicking the link/icon would launch the application on the client machine.
Anyone ever had a requirement like that and been successful implementing it?
Wanted to reach out to everyone before I go back and say no. Thanks in advance for any replies.
Make each button be a link to download a company template file for the given application. For example, the "Excel" button would download and the user should be prompted to open it with Excel.
For instance, try clicking one of the links here:
http://www.google.com/#sclient=psy&hl=en&q=template+filetype:xls
Linking to static files on the web server should be sufficient, so long as your server sends the correct MIME-Type or Content-Type.
You will probably have to adjust browsers' security settings to allow them to follow the links, but you should be able to use URLs of the form file:///C:\\Program Files\\Notepad.exe (You might prefer to use normal slashes / instead, as you don't have to watch out for how many copies of \ are needed to get past quoted string interpretation in whatever you're using to design the web page(s).
Using IE on a local intranet we have implemented this in an ActiveX control. Josh Pearce's solution works for those types of apps with MIME types, but not all apps you may wish to open would work this way.

Display HTML in a silverlight application

I need to display HTML in my silverlight application and cannot find a way of doing it. I cannot use the web browser control as it needs to be able to run in or out of a browser.
Does anyone know of a good way to do this, because all I can think of doing at the moment is running replace methods on the text to just replace the tags with C# equivalents eg(<br /> to \n).
The way I do it is to check if the application is running inside the browser and change the means of display accordingly. If running inside the browser, I overlay the application with an IFrame, as I describe in this article: http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-6.aspx. Otherwise, I use the WebBrowser control. I have a control which does this all for you in the source code that accompanies my book, which is downloadable from the Apress website here: http://www.apress.com/book/downloadfile/4638.
Hope this helps...
Chris
I believe what you are looking for is HTML Bridge.
Edit I'm am actually now unsure if you'll still have access to javascript if you're running this OOB. I'm going to look into this some more and will further update. I'll still leave the answer up though for reference.
Second Edit Here is what I've found. HTML Bridge is disabled when you run silverlight out of browser. This disables access to the HTML DOM as well as Javascript. However, according to a comment on this site:
HTML Bridge is not available when you first install a OOB app. But you CAN force it if you modify the index.html in the folder where the app is installed just adding the enablehtmlaccess parameter.
It works!
You can even create dynamic HTML elements using the well-known methods of the HtmlPage class. You can even open a new browser window with the Navigate() method and its "_blank" parameter.
Keep in mind this information was posted about SL 3. Its possible that this may have changed, but I doubt it. So it seems that what you may want to do is build a script into the startup of your SL app that detects whether or not your app is running out of browser. If it is then you may want to have some script to call that can modify this file for you.
There recently was a similar question.
I posted a link there to an implementation that parses and displays HTML inline in Silverlight. Of course, it will work only with simple HTML, but maybe you can expand it to your needs.

Categories

Resources