![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
WinForms
文章平均质量分 53
changhu
这个作者很懒,什么都没留下…
展开
-
在WebBroswer中用javascript访问C#方法
<br />本例子演示如何用javascript访问C#代码,也可向C#方法传递参数。<br />首先,创建一个Windws Forms应用程序,并往窗体上加入一个WebBroswer控件,然后修改form的代码如下:<br />namespace WindowsFormsApplication6 { // This first namespace is required for the ComVisible attribute used on the ScriptManager class.翻译 2011-05-10 11:11:00 · 623 阅读 · 0 评论 -
隐藏DataGridView中无数据的列
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Forms; namespace MyProject { public static class ExtensionGridView { public static DataGridView RemoveEmptyColumns(this D翻译 2011-05-10 10:43:00 · 1088 阅读 · 0 评论 -
WinForms中如何让Label自动换行
当Label的文本太长时会超出窗体外从而有部分文本被截断,设置Label自动换行可解决此问题,方法如下: 1、设置Labl的AutoSize属性为false 2、设置Label的长度和宽度为合适大小,或将Label放到一个panel中并将Label的Dock属性设置为Fill。原创 2012-02-29 15:41:44 · 5355 阅读 · 0 评论 -
利用Httplistener实现的HttpServer类
毕设中有一个文件传输的功能模块,所以用Httplistener类写了一个HttpServer类作为一个简单的web服务器,这样客户端下载文件就很简单了。 using System; using System.Net; using System.Text; using System.Threading; using System.IO; using System.Security.Princi原创 2012-03-18 11:17:28 · 6431 阅读 · 2 评论