using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.IO; using System.Reflection; using System.Xml; namespace ReadingDoucment { public partial class Form1 : Form { HelpItem h1; Help h2; public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { foreach (HelpItem hi in Help.GetHelpItems()) { listBox1.Items.Add(hi); listBox1.DisplayMember = "Label"; } listBox1.SelectedIndexChanged += new EventHandler(listBox1_SelectedIndexChanged); } void listBox1_SelectedIndexChanged(object sender, EventArgs e) { HelpItem hi = listBox1.SelectedItem as HelpItem; if (hi != null) { LoadFile(hi.File); } } void LoadFile(string file) { if (File.Exists(file)) { richTextBox1.LoadFile(file, RichTextBoxStreamType.RichText); } else { richTextBox1.Clear(); MessageBox.Show("File Not Exist", "Exception"); } } } }
ListBox.FullRowSelect = true; ListBox.View = ListView.Details;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)