C#
122&&113
这个作者很懒,什么都没留下…
展开
-
C# Winform应用程序占用内存较大解决方法整理
微软的 .NET FRAMEWORK 现在可谓如火如荼了。但是,.NET 一直所为人诟病的就是“胃口太大”,狂吃内存,虽然微软声称 GC 的功能和智能化都很高,但是内存的回收问题,一直存在困扰,尤其是 winform 程序,其主要原因是因为.NET程序在启动时,是需要由JIT动态编译并加载的,这个加载会把所有需要的资源都加载进来,很多资源是只有启动时才用的。以XP 系统为例子,程序启动后,打开...转载 2020-04-10 10:38:22 · 565 阅读 · 0 评论 -
C#利用lockbits方法快速对Bitmap进行读写
实例:关于Bitmap处理的一个方法展示使用SetPixel的方法private void BitmapSetGradient(ref Bitmap bitmap) { int nx, ny; double r, g, b; nx = bitmap.Width; ny = bitm...原创 2020-03-04 20:55:51 · 2634 阅读 · 0 评论 -
C# GDI+ Panel 双缓冲技术
默认的panel控件在重画时会出现闪烁的问题解决问题的方法是在继承原有panel属性的基础上赋予它双缓冲的功能在Form类中添加如下代码1 /// <summary>2 /// 双缓冲panel3 /// </summary>4 public class DoubleBufferPanel : Panel5 {6 public DoubleBuffer...原创 2020-02-06 11:45:26 · 848 阅读 · 0 评论 -
C#如何朗读字符串
先在引用里添加 System.Speech。添加using语句using System.Speech.Synthesis;然后就是设置播放语音的方法public void WordSpeak(string s){ SpeechSynthesizer speech = new SpeechSynthesizer(); speech.Rate = 1;//设置语速 speech.V...原创 2020-02-06 11:35:39 · 468 阅读 · 0 评论