private void ExtractNormalFileInResx(byte[] resource, String path) {
FileStream file = new FileStream(path, FileMode.Create); file.Write(resource, 0, resource.Length); file.Flush(); file.Close(); }
调用时:
ExtractNormalFileInResx(IT6831A.Properties.Resources._7SEG, Application.StartupPath + @"\7SEG.ttf");
重点是要把资源内嵌到资源管理器中。
原文:https://www.cnblogs.com/Fpack/p/15196265.html