利用Win32 API 函數 ShowWindowAsync / ShowWindow 改變視窗大小
1.需要匯入 System.Runtime.InteropServices 命名空間2.宣告 ShowWindowAsync 函數 [DllImport("user32.dll")] private...
应用程序每次只能运行一个实例(C#)
有时根据实际需要可能希望应用程序每次只有一个实例在运行,当再次点击同一个应用程序的可执行文件时并不生成一个新的实例,而是将相应的用户界面激活,显示在屏幕最前面。要解决这个问题主要是考虑如何判断应用程序...
How to convert a numeric value or currency to English words using C#
IntroductionAfter looking around the web for this functionality and failing to get an answer to my problem. I decided to spare some minutes and develop this functionality up to my requirement. I've...
浅谈C#中标准Dispose模式的实现
C#程序中的Dispose方法,一旦被调用了该方法的对象,虽然还没有垃圾回收,但实际上已经不能再使用了。所以使用上要仔细考虑细节。需要明确一下C#程序(或者说.NET)中的资源。简单的说来,C#中的每一个类型都...