I have a program that reads a chm file through this function:
CODE
System.Windows.Forms.Help.ShowHelp(Me, tempfolder & "/Help.chm", HelpNavigator.AssociateIndex)
Now, I would like to delete it when the program closes.
So far I have this:
CODE
If System.IO.File.Exists(tempfolder & "/preview.html") Then
SetAttr(tempfolder & "/preview.html", FileAttribute.Normal)
Kill(tempfolder & "/preview.html")
End If
SetAttr(tempfolder & "/preview.html", FileAttribute.Normal)
Kill(tempfolder & "/preview.html")
End If
However, the above fails, because apparently, the Help.ShowHelp class uses a read/write attribute (I cannot have a read only for some reason. If I do, the help window does not open).
Is there any way of deleting this file ones the program terminates?
Thanks guys!