随笔分类 -  winform

摘要:可以使用 FiddlerCore4 版本 4.6.2.0(在nuget网站下载可以拦截http/https请求(https 需要安装证书 可以多级代理(在 FiddlerApplication_BeforeRequest 中设置 oSession["X-OverrideGateway"] = “IP 阅读全文
posted @ 2023-01-28 17:12 212的s 阅读(853) 评论(0) 推荐(0) 编辑
摘要:移动鼠标到你想要的位置,然后进行点击,某些时候是很有用的 using System; using System.Drawing; using System.Runtime.InteropServices; using System.Windows.Forms; private void button 阅读全文
posted @ 2023-01-09 11:25 212的s 阅读(1287) 评论(0) 推荐(0) 编辑
摘要:实现方式: 1.读取剪切板内容 2.处理string,拼接sql 3.把结果写入剪切板 阅读全文
posted @ 2022-04-26 09:44 212的s 阅读(136) 评论(0) 推荐(0) 编辑
摘要:界面 2023年5月29日 最新版支持图片粘贴显示(使用RichTextBox,粘贴板,RichTextBox.Rtf 来实现 sql server 创建表 USE [test] GO /****** Object: Table [dbo].[tb_data] Script Date: 2022/4 阅读全文
posted @ 2022-04-06 15:16 212的s 阅读(177) 评论(0) 推荐(0) 编辑
摘要:效果图 public class MyCheckedListBox : CheckedListBox { //普通字体 static Font Font1 = new Font(new FontFamily("宋体"), 12, FontStyle.Regular); //中间有横线 static 阅读全文
posted @ 2022-02-08 16:19 212的s 阅读(609) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System. 阅读全文
posted @ 2022-02-08 12:12 212的s 阅读(66) 评论(0) 推荐(0) 编辑
摘要://可以放到timer里执行 private void button2_Click(object sender, EventArgs e) { string mainTitle = System.Configuration.ConfigurationManager.AppSettings["main 阅读全文
posted @ 2022-01-19 11:00 212的s 阅读(787) 评论(2) 推荐(0) 编辑
摘要:网上搜到很多理论,没有实际的例子,自己尝试写一写 .Net Framework 4.5 VS 2017 WinForm 项目 using System; using System.Collections.Generic; using System.ComponentModel; using Syst 阅读全文
posted @ 2022-01-13 11:45 212的s 阅读(28) 评论(0) 推荐(0) 编辑
摘要:/// <summary> /// 设置行距 /// </summary> /// <param name="ctl">控件</param> /// <param name="dyLineSpacing">间距,初始值至少大于(font.size+1)*30</param> public stati 阅读全文
posted @ 2022-01-13 11:26 212的s 阅读(448) 评论(0) 推荐(0) 编辑
摘要://行高至少大于20 public static void SetComboBoxLineHeight(ComboBox list, int itemHeight) { list.DropDownStyle = ComboBoxStyle.DropDownList; list.ItemHeight 阅读全文
posted @ 2022-01-13 11:26 212的s 阅读(138) 评论(0) 推荐(0) 编辑
摘要:示例代码 using System; using System.Collections.Generic; using System.Drawing; using System.Windows.Forms; public static class ControlDrag { static Dictio 阅读全文
posted @ 2021-12-06 17:33 212的s 阅读(449) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Collections.Generic; using System.Drawing; using System.IO; using System.Linq; using System.Runtime.Serialization; using Sy 阅读全文
posted @ 2021-11-15 14:15 212的s 阅读(836) 评论(0) 推荐(0) 编辑
摘要://引用IWshRuntimeLibrary COM组件-Windows Script Host Object Model /// <summary> /// 创建快捷方式的类 /// </summary> /// <remarks></remarks> public class ShortCutH 阅读全文
posted @ 2021-11-12 16:06 212的s 阅读(302) 评论(0) 推荐(0) 编辑
摘要:class WindowHookerManager { static WindowHooker hooker = new WindowHooker(); public static void SetAllFormIcon() { hooker.OnHookControl += (o, e) => { 阅读全文
posted @ 2021-11-12 16:05 212的s 阅读(504) 评论(0) 推荐(0) 编辑
摘要:ps:提高了编程效率,而且相当好用,自己随时可以添加新的扩展 public static class CommomExtentions { public static bool IsNullOrEmpty(this string str) { return string.IsNullOrEmpty( 阅读全文
posted @ 2021-11-12 16:04 212的s 阅读(28) 评论(0) 推荐(0) 编辑
摘要:Bitmap b = new Bitmap(Server.MapPath(ppath)); Stream ms = new MemoryStream(); b.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg); 原文: https://www.cnb 阅读全文
posted @ 2021-11-12 16:02 212的s 阅读(308) 评论(0) 推荐(0) 编辑
摘要:this.dataGridView1.BindingContext[this.dataGridView1.DataSource].Position = 5 阅读全文
posted @ 2021-11-12 16:01 212的s 阅读(768) 评论(0) 推荐(1) 编辑
摘要:public Image GetHttpImage(string url) { var client = new HttpClient(); var uri = new Uri(Uri.EscapeUriString(url)); byte[] urlContents = client.GetByt 阅读全文
posted @ 2021-11-12 15:57 212的s 阅读(1070) 评论(0) 推荐(0) 编辑
摘要://设置左上角到中心点 g.TranslateTransform(int.Parse(x), int.Parse(y)); //旋转角度 g.RotateTransform(int.Parse("90")); //还原左上角 g.TranslateTransform(-int.Parse(x),- 阅读全文
posted @ 2021-11-12 15:56 212的s 阅读(309) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示