摘要: using System.Management; private static string GetInfo() { string cpuInfo = "";//cpu序列号 ManagementClass cimobject = new ManagementClass("Win32_Process 阅读全文
posted @ 2023-12-18 17:01 四月柳巷 阅读(29) 评论(0) 推荐(0) 编辑
摘要: static void Main(string[] args) { double a = 20.6; int b = Convert.ToInt32(a);//5舍6入 int d = (int)double.Parse(a.ToString());//(int)这种转换直接舍弃小数 double 阅读全文
posted @ 2023-12-18 17:00 四月柳巷 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 其实,只要通过设置button的属性,就可以实现button的背景色为透明: 1、将button的backcolor属性设置为Transparent,该属性在web选项的第一个; 2、将button的FlatStyle属性设置为Flat。 3、如果还想将button的边框线去掉,在button的Fl 阅读全文
posted @ 2023-12-18 16:59 四月柳巷 阅读(1016) 评论(0) 推荐(0) 编辑
摘要: 在有的电脑上发现,使用Windows Media Player组件播放视频导致程序闪退。 发现是显卡问题,独立显卡换成集成显卡 解决: 打开显卡控制面板->管理3D设置->集成图形->应用 阅读全文
posted @ 2023-12-18 16:59 四月柳巷 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 传统定义变量是已经知道变量的类型,如: int a = 1; string b = “qwer”; 用Var类型预先不用知道变量的类型;根据你给变量赋值来判定变量属于什么类型;如 var a =1; 则a是整型,var a = “qwer”;则a是字符型,但使用Var类型要注意: 1:必须在定义时初 阅读全文
posted @ 2023-12-18 16:58 四月柳巷 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 1:https://jingyan.baidu.com/album/dca1fa6f479469f1a4405292.html?picindex=7 2:https://help.aliyun.com/knowledge_detail/40920.html (534 Policy requires 阅读全文
posted @ 2023-12-18 16:58 四月柳巷 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 方法1:CheckForIllegalCrossThreadCalls = false;//忽略对跨线程调用的检测(不建议) 方法2:使用委托 例: this.Invoke((EventHandler)delegate { button1.Visible = true; }); 方法3:使用线程Th 阅读全文
posted @ 2023-12-18 16:52 四月柳巷 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 1.添加web引用:找到服务的url(网址) 输入好url后点击添加引用 注意:.asmx链接引用时是添加web引用 ?wsdl链接引用时添加service引用 2.代码调用 WebReference.WebService1 webtest = new WebReference.WebService 阅读全文
posted @ 2023-12-18 16:50 四月柳巷 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 两个属性: 1 BackgroundImageLayout = Stretch 2 SizeMode = StretchImage 阅读全文
posted @ 2023-12-18 16:43 四月柳巷 阅读(36) 评论(0) 推荐(0) 编辑
摘要: 第一种:substring 截取字符串的第几位到第几位 if (tool[0].Substring(0, 1) == "D") 第二种:split 利用多个字符来分隔字符串 string str = "GTAZB_JiangjBen_123"; string[] sArray = str.Split 阅读全文
posted @ 2023-12-18 16:43 四月柳巷 阅读(74) 评论(0) 推荐(0) 编辑