|
You can download the source code of this example here: rss2htmlscout_csharp.zip
This page will teach you how to use Visual
C# and RSS2HTML Scout library
to convert RSS into HTML
RSS2HTML Scout is
capable of downloading RSS feeds using built-in multi-threaded and converting
RSS into HTML code using HTML templates (check online
documentation for more information about templates)
Download and install the latest version of RSS2HTML
Scout. You can download it here
1) Run Microsoft Visual Studio.NET
Go to New menu and click Project... to create new Visual C# project
New Project Wizard will
appear. Select Windows
Application in Visual
C# Projects group:
2) Visual
C# will create a
new empty project:
3) To use RSS2HTML Scout library
in Visual
C# application we should add reference to RSS2HTML Scout library. Select Project in
main menu and then select Add Reference command:
Switch to COM tab and find RSS2HTML
Scout library
in the list of available ActiveX/COM objects:
Switch to COM tab
and find RSS2HTML Scout library in the list
of available COM objects:
Now click on Select button
to add reference to RSS2HTML Scout and click OK
4) Double-click on form Form1 to create Form1_Load procedure (this procedure will be execute on Form1.OnLoad event):
The Source code editor window
will appear:
5) The following code snippet generates simple "Hello, World!" SWF flash movie and saves it into "c:\shapes.swf" file:
private void Form1_Load(object sender, System.EventArgs e)
{
RSS2HTMLScoutLib.RSS2HTMLScout
RSS2HTML = new RSS2HTMLScoutLib.RSS2HTMLScout();
RSS2HTML.ItemsPerFeed
= 5; // limit 5 latest items per feed
RSS2HTML.AddFeed ("http://bytescout.com/news.xml",
180); // update every 180
minutes (3 hours)
RSS2HTML.Execute();
RSS2HTML.SaveOutputToFile("c:\\RSS2HTMLOutput.html");
}
Hint:
You can simply copy the source code from the snippet above and paste into Visual C# source
code editor.
6) Press F5 to run the application (you can also use "Debug" | "Start" menu command) and Visual C#.NET will run the application:
The application will convert
RSS into HTML and this HTML codes will be saved as "c:\RSS2HTMLOutput.html"
file.
You can view generated
HTML file using Internet Explorer or another browser.
To display HTML files in your Visual Basic application please use WebBrowser
control
You can download the source code of this example here: swfscout_csharp.zip


"Hello, World!" examples
for different programming languages will
guide you step by step from the very beginning:
See
also:
|