![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
小技巧
drainstory
这个作者很懒,什么都没留下…
展开
-
【C#】 打开文件浏览窗口
private void openFileDialogBTN_Click(o b j e c t sender, System.EventArgs e){ OpenFileDialog openFileDialog=new OpenFileDialog(); openFileDialog.InitialDirectory="c:\\";转载 2015-01-07 10:21:25 · 1345 阅读 · 0 评论 -
【C#】遍历本机IPV4地址
在遍历本机IPV4地址时通常前几个地址都是IPV6的地址,所以要将IPV6地址过滤掉 foreach (IPAddress myIPAddress in Dns.GetHostAddresses(Dns.GetHostName())) { if (myIPAddress.IsIPv6LinkL原创 2014-12-23 09:21:27 · 473 阅读 · 0 评论 -
【C#】读取注册表
首先需要判断是否为64位操作系统,64位操作系统运行Build32位程序的话需要在注册表WOW6432根节点下读取注册表内容,32位则直接在SOFTWARE下面读取即可原创 2014-12-23 09:18:29 · 457 阅读 · 0 评论 -
[C++] 忽略警告 + 读取注册表
[C++] 忽略警告 + 读取注册表原创 2014-12-26 11:40:27 · 656 阅读 · 0 评论 -
【C#】 char[]与string之间的转换
string 转换成 Char[] string ss = "abcdefg"; char[] cc = ss.ToCharArray();Char[] 转换成string string s = new string(cc);此外,byte[] 与 string 之间的装换 byte[] bb = Encoding.UTF8.GetBytes(ss); str转载 2014-12-27 14:54:28 · 421 阅读 · 0 评论 -
【C#】 vs2010启动调试、停止调试非常慢
使用vs2010,感觉速度越来越慢。今天终于不能忍受了,决定解决这个问题。在网上搜寻了好久,也没找到一个好的解决方法。最后,在凑巧的情况下 重新设置了vs2010的环境(在vs2010命令提示符下,执行devenv.exe /resetuserdata),居然解决了这个问题,速度跑的很好。网上有人说是由于vs2010缓存内数据越来越多,影响了速度,可能吧,我也没去验 证这个。 装了vs助转载 2015-01-21 11:00:53 · 4350 阅读 · 0 评论 -
(WPF) 半透明窗体
//Window 中 AllowsTransparency="True"转载 2015-01-04 11:42:27 · 3136 阅读 · 2 评论 -
(WPF) Grid渐入渐出效果
//渐入 DoubleAnimation dLoginFadeIn = new DoubleAnimation(0, 1, new Duration(TimeSpan.FromSeconds(1))); this.Grid_Login.BeginAnimation(UIElement.OpacityProperty, dLoginFadeIn);原创 2015-01-04 11:32:44 · 2830 阅读 · 0 评论 -
(转)MFC 访问剪切板
MFC剪切板应用将数据COPY到剪切板原理:1:OpenClipboard() 打开剪切板2:EmptyClipboard() 清空剪切板,让当前进程拥有剪切板3:GlobalAlloc() 分配全局堆内存4:GlobalLock() 锁定内存并返回内存首地址5:strcpy() 给内存赋值6:GlobalUnlock() 解锁内存7:SetClipboardD转载 2015-04-14 13:18:22 · 386 阅读 · 0 评论