10 2014 档案

C#捕获全局异常
摘要:using System; using System.Collections.Generic; using System.Windows.Forms; using System.IO; namespace GobalException { static class Program { /// ... 阅读全文

posted @ 2014-10-30 12:58 连一粝 阅读(264) 评论(0) 推荐(0)

unity3d 嵌入 winform程序中 src路径设置问题
摘要:AxUnityWebPlayerAXLib.AxUnityWebPlayer _Unity = axUnityWebPlayer1; Controls.Add(_Unity); ((System.ComponentModel.ISupportInitialize)(_Unity)).EndIn... 阅读全文

posted @ 2014-10-22 14:28 连一粝 阅读(712) 评论(0) 推荐(0)

C# WinForm程序中使用Unity3D控件
摘要:很多的用户还是比较习惯WinForm或者WPF中的UI形式,于是在网上搜了一下WinForm和Unity3D如何集成,结果不是非常令人满意,绝大多数的回答是“No Way”,也有人给出了使用WebBrowser控件的形式,说实话这种还算是比较靠谱的,以前也这么干过类似的事情;后来搜到一篇帖子说是可以... 阅读全文

posted @ 2014-10-22 14:26 连一粝 阅读(1334) 评论(0) 推荐(0)

MSComm32.ocx控件的使用(串口通信)
摘要:1.注册MSComm32控件,网上下载这个控件,然后把它拷贝到到C:\Windows\system32文件夹下,我装的是64位的Win7系统,是在C:\Windows\sysWOW64文件夹下,然后打开cmd,写入代码 regsvr32 C:\Windows\system32\MSComm32.oc... 阅读全文

posted @ 2014-10-20 19:26 连一粝 阅读(1795) 评论(0) 推荐(0)

C#中程序启动窗口没有注册类
摘要:没有注册类 (异常来自 HRESULT:0x80040154 (REGDB_E_CLASSNOTREG))解决方法:出现这个问题主要是因为32位操作系统和64位操作系统存在兼容性问题。解决方案:1、鼠标右击解决方案,点击属性按钮调出属性窗口。2、点击配置标签,把平台改为X86。3、如果上图的位置没有... 阅读全文

posted @ 2014-10-11 09:32 连一粝 阅读(1993) 评论(0) 推荐(0)

C#拖动无边框窗体(窗体上有容器遮挡)
摘要:[DllImport("user32.dll")]publicstaticexternboolReleaseCapture();[DllImport("user32.dll")]publicstaticexternboolSendMessage(IntPtrhwnd,intwMsg,intwPara... 阅读全文

posted @ 2014-10-09 14:49 连一粝 阅读(300) 评论(0) 推荐(0)

C# 无边框窗体边框阴影效果的简单实现
摘要:private const int CS_DropSHADOW = 0x20000; private const int GCL_STYLE = (-26); [DllImport("user32.dll", CharSet = CharSet.Auto)] public static ext... 阅读全文

posted @ 2014-10-09 13:40 连一粝 阅读(614) 评论(0) 推荐(0)

C# 无边框异型窗体制作
摘要:我是一个C#的初学者 只要涉及到windows窗体编程 都希望窗体的外观比较好看 不是系统默认的那样对于C# 更改窗体外观感觉并不那么轻松 更改窗体外观涉及到使用GDI+ 我所知道的有两种方法:有系统边框的窗体 处理窗体的Paint方法,在paint方法中 参数e.Graphics属性将返回一个对象... 阅读全文

posted @ 2014-10-09 11:26 连一粝 阅读(438) 评论(0) 推荐(0)

1. DataGridView设置字体、行高、列宽、单列居中
摘要:DataGridView表格内容的列宽、行高、字体的设置,设置某一列居中。一般地,会将行高设为统一的,列宽根据不同情况设定。[csharp] view plaincopyprint?//调整字体dataGridView1.Font=newFont("宋体",11);//调整行高//dataGridV... 阅读全文

posted @ 2014-10-07 14:09 连一粝

导航