1、
System.Convert.toInt32("String"); //实现类型的转换
2、
Encoding.ASCII.GetString(byteArray,start,end); //给byte数组加密,Encoding.ASCII.GetBytes()
3、设置label的高度和宽度
先把autoSize:false,然后改size属性
4、给button添加悬浮提示,先拖动一个toolTip到界面上,在窗口load时,添加如下代码
toolTip1.SetToolTip(button1, "开始视频通话");
5、PictureBox显示网上图片
pictureBox1.ImageLocation = @”http://www.baidu.com/img/logo.gif”;
6、webbrowser显示本地文件
this.webBrowser1.Navigate ("file:///C:\\WINDOWS\\Web\\Wallpaper\\Ascent.jpg");
7、通过当前路径得到文件路径
String urlPath =Uri.UriSchemeFile+ Uri.SchemeDelimiter + Path.GetFullPath(Environment.CurrentDirectory+"/index.html");
8、解决多线程访问listView控件的异常问题,只需在form的load事件中加入如下代码:
Control.CheckForIllegalCrossThreadCalls = false;