Hello everybody,
I'm triyng to uninstall a font but I have some problems doing it. If anyone
would take a look at it, thx in advance.
private void cmdUninstall_Click(object sender, System.EventArgs e){
clsFontFamily f = (clsFontFamily)cboFonts.SelectedItem;
string n = f.Path.Substring(f.Path.LastIndexOf("\\")+1);
int i = RemoveFontResource(iPath + "\\" + n);
SendMessage((System.IntPtr)HWND_BROADCAST, WM_FONTCHANGE, 0, 0);
File.Delete(iPath + "\\" + n);
}
so my problems are .. :) .. after executing :
** my application still says that font is installed, I check this with the
following function
private bool IsInstalled(string name){
InstalledFontCollection iFont = new InstalledFontCollection();
foreach(FontFamily f in iFont.Families){
if(f.Name.Equals(name))
return true;
}
return false;
}
** the font file still exists in the fonts dir but cannot be opened anymore.
My guess is that the font is still in the resource but the file is
deteled because windows can't find the file when I asked for the properties.
Thx again.