Click to See Complete Forum and Search --> : opening .chm or .hlp file from menuItem


b_bprimal
02-25-2007, 03:41 AM
Hello Everybody

I have make a help file from help workshop (help.chm or help.hlp) .Now i want to access this file from menuItem help from menubar. How can i (when click the help menuitem this file showld open)


thanks

Bhaskar

duongkhangth2
02-28-2007, 04:49 AM
JMenuItem mnitem = new JMenuItem("Open .chm or .hlp");
menuitem.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {
String filename = "c:\\file.chm"; //path point to .chm file or .hlp file

Runtime.getRuntime().exec("cmd.exe /c " + filename);
}

});