摘要:
47、监视剪贴板 [System.Runtime.InteropServices.DllImport("user32")] privatestaticexternIntPtrSetClipboardViewer(IntPtrhwnd); [System.Runtime.Interop... 阅读全文
摘要:
43、修改系统的右键菜单 if(args.Length>0) { Console.Write(args[0]); Console.Read(); } else ... 阅读全文
摘要:
如何在C语言中隐藏默认的DOS窗口(Windows下)?看这个问题问的人比较多,而网上的答案不尽人意,就自己写个,放变大家!#include<iostream>usingnamespacestd;intmain(){cout<<"Hello world!"<<endl;return0;}方法一:在你的控制台程序前加入#ifdef_MSC_VER#pragma comment( linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\" 阅读全文
摘要:
38、获取系统中可用的驱动器列表和系统磁盘图标 [StructLayout(LayoutKind.Sequential)] publicstructSHFILEINFO { publicIntPtrhIcon; publicintiIcon; ... 阅读全文
摘要:
35、读写ini文件 [DllImport("kernel32")] privatestaticexternintGetPrivateProfileInt(stringlpApplicationName,stringlpKeyName,intnDefault,stringlpFileName); ... 阅读全文
摘要:
32、基本序列化 [Serializable] publicclassMyObject { publicintn1=0; publicintn2=0; publicStringstr=null; } classClass1 { ... 阅读全文
摘要:
28、创建线性梯度 privatevoidForm1_Paint(objectsender,System.Windows.Forms.PaintEventArgse) { LinearGradientBrushlinGrBrush=newLinearGradientBrush( ... 阅读全文
摘要:
24、-在一个区域中剪辑 privatevoidForm1_Paint(objectsender,System.Windows.Forms.PaintEventArgse) { // Create a path that consists of a single polygon. ... 阅读全文