- 博客(27)
- 收藏
- 关注
原创 C# GC垃圾自动回收(陷阱)
测试类代码: public class Demo : IDisposable { ~Demo() { MessageBox.Show("释放非托管资源"); } public void Dispose() {
2014-11-19 22:13:00 3548
原创 C# Hex(16进制转换算法)
static string Byte2Hex(byte wbyte) { string ret = null; var arr = "0123456789ABCDEF"; var len = arr.Length; ret += arr[wbyte / len].ToStrin
2014-10-04 22:43:14 1495
原创 VB Google Translation
REM Form1.vbImports System.IOImports System.NetImports System.TextPublic Class Form1 Private spVoice As SpVoice Private Function GoogleTranslate(ByVal [Text] As String) As String
2014-08-23 00:02:35 1203
原创 C# 枚举进程模块
// namespace eMod{ using System; using IO = System.IO; using System.Collections.Generic; using System.Text; using System.Diagnostics; using System.Runtime.InteropServ
2014-07-17 19:18:48 3006
原创 C# VBRegExp10
namespace Active{ using System; using System.Reflection; using System.Collections.Generic; public class RegExp { object ComObject; Type ComType; void Inint()
2014-07-12 02:37:01 663
原创 C# PicBtn Control 图形按钮
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Runtime.InteropService
2014-06-28 14:12:37 716
原创 C# 取活动网卡IP地址
private List IPActiveAddress { get { var IPAddressCollection = new List(0); var Collection = Dns.GetHostAddresses(Dns.GetHostName());
2014-06-24 17:12:07 1052
原创 C# 读HTTP文件(API)
此代码可以解决很多不必要的问题,上次的XMLHTTP读文件的方式,容易出现在没网时出现错误,所以另发一个using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using Sys
2014-06-16 21:58:32 1698
原创 C# 位运算
位与6 & 3 0000 0110&0000 0011 相同取真、不同取假0000 0010位或6 | 3 110|011----- 一真得真 111异或6 ^ 3 110^011----- 相同取假、不同取真 101取反 ~6 = -7; // 反转二进制右移6 >> 1 = 3 110
2014-06-15 22:38:10 530
原创 C+/CLR/C# 十到十六进制文本
C++ char* Byte2Hex(unsigned char Byte) { char _s[] = { '0', '1', '2','3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; char* _ret = new char[0x2]; _ret[0x0] = _s[Byte /
2014-06-15 22:04:16 518
原创 C# 网页放大缩小(WebBrowser && AxWebBrowser)
Net / WebBrowser var HTMLDocument = webBrowser1.Document; HTMLDocument.Body.Style = "ZOOM:0.5"; // 缩小
2014-06-15 18:00:37 7918
原创 C# 遍历XML节点到TreeView
private void Form1_Load(object sender, EventArgs e) { this.SuspendLayout(); var treeView1 = new TreeView(); treeView1.Dock = DockStyle.Fill;
2014-06-15 17:26:44 947
原创 C# 寻找文件(FindNextFile)
[Serializable, StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto), BestFitMapping(false)] struct WIN32_FIND_DATA { public int dwFileAttributes; publi
2014-06-15 13:26:23 1172
原创 C# 模拟按键
最近发现个有趣的问题,我们如何向一个程序发送 按键指令?嗯,我稍微总结了下,大概有如下几种: 1:System.Windows.Forms.SendKeys. Send / SendWait示例: SendKeys.SendWait("^{A}"); // 模拟键:CTRL + A组合键: Ctrl = ^ Shift = +
2014-06-15 12:52:36 2483
原创 C# INI Profile 操作
using System;using System.Collections.Generic;using System.Text;using System.Runtime.InteropServices;namespace students{ public abstract class Profile { [DllImportAttribute("kern
2014-06-15 12:09:38 800
原创 C# 通过HWND获取IE的IWebBrowser2接口
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Runtime.InteropService
2014-06-14 17:31:00 1956
原创 C# Net/Win32 内存操作
using System;using System.Collections.Generic;using System.Text;using System.Runtime.InteropServices;namespace std{ public partial class Memory : Object { [DllImportAttribute("k
2014-06-14 17:07:42 1023
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人