陈程的技术博客

  • 关于作者
winform
.NET

winform 绘制无边框拉伸功能,被覆盖边界也可拉伸

#region 控制无边框拉伸 private ResizeDirect _direct; private bool _resizeing; private Point _resizeStart; private Point _resizePos; private Size _resizeSize; const int WM_LBUTTONDOWN = 513; const int WM_MOUSEMOVE = 512; public bool PreFilterMessage(ref Message m) { i…

2020年3月6日 0条评论 553点热度 0人点赞 博主 阅读全文
.NET

winform 绘制无边框四周阴影

public partial class Form1 : Form { [DllImport("Gdi32.dll", EntryPoint = "CreateRoundRectRgn")] private static extern IntPtr CreateRoundRectRgn ( int nLeftRect, // x-coordinate of upper-left corner int nTopRect, // y-coordinate of upper-left corner int nRightR…

2020年3月6日 0条评论 631点热度 0人点赞 博主 阅读全文
.NET

设置保持winform显示,不会因为分辨率和屏幕大小而变化

在winform的Program.cs文件中设置如下代码: static class Program { [System.Runtime.InteropServices.DllImport("user32.dll")] private static extern bool SetProcessDPIAware(); /// <summary> /// 应用程序的主入口点。 /// </summary> [STAThread] static void Main() { if (Environm…

2019年11月18日 0条评论 550点热度 0人点赞 博主 阅读全文
.NET

解决winform界面刷新闪烁问题的多种方案

第一: 设置初始化启用默认双缓冲并提供无闪烁的图形呈现: this.DoubleBuffered = true;//设置本窗体 SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true); // 禁止擦除背景. SetStyle(ControlStyles.DoubleBuffer, true); // 双缓冲 第二: 底层重绘每次会清除画布,然后再全部重新绘制,这才是导致闪烁最主要的原因。于…

2019年6月18日 0条评论 761点热度 0人点赞 博主 阅读全文
.NET

tableLayoutPanel刷新控件值导致控件闪烁的解决方案

/// <summary> /// 设置Label的值 /// </summary> /// <param name="label">label</param> /// <param name="value"></param> private void SetLabelValue(Label label, string value) { tableLayoutPanel3.SuspendLayout(); this.Invoke(new Act…

2019年5月5日 0条评论 584点热度 0人点赞 博主 阅读全文
.NET

主程序ui线程异常处理方案和只允许同时运行一个进程的方法

using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace ScreenShowManage { static class Program { //static Boolean createdNew; ////同步基元变…

2018年4月8日 0条评论 747点热度 0人点赞 博主 阅读全文
.NET

一个异常重启winform程序

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace ReStartMan…

2018年4月8日 0条评论 589点热度 0人点赞 博主 阅读全文
.NET

在winform窗体上创建一个可以在主窗体上拖动拉伸的panel控件

using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace ScreenShowManage { /// <summary&g…

2018年4月8日 0条评论 566点热度 0人点赞 博主 阅读全文
.NET

C#获取音乐相关信息和相关问题解决

如图。 winform中需要获取音乐的相关信息,使用系统的shell32.dll这个dll库,开始的时候作者直接引用了系统自带的这个库,结果报错 一直不能解决,“System.InvalidCastException:“无法将类型为“System.__ComObject”的 COM 对象强制转换为接口类型“Shell32.Shell”。” 后来查过资料发现,是因为 系统自带的shell32.dll这个库是1.0版本的 太落后了,自己又到网上下了个1.2版本的,提供在这里给大家下载。 Interop.Shell32.…

2017年11月15日 0条评论 759点热度 0人点赞 博主 阅读全文
.NET

使用C#+Jumony开发网络爬虫并对数据做相关分析

使用C# + Jumony开发网络爬虫 现在开发网络爬虫大部分都用python,发现用C#来写爬虫太少,我自己尝试用C#写了一个定向爬虫,在这里我向大家介绍它,目前已经把它开源到github上了,想要深入了解的朋友直戳下面的链接: [https://github.com/zuiyuewentian/Reptile.git] 首先介绍下该爬虫的设计模型: 1.定义相关的网站入口,爬取内容页,爬取规则 2.使用多线程,从不同的网站入口开始爬取网站的URL链接 3.获取URL链接加入到待爬取链接的集合中 4.从待爬取的U…

2016年9月6日 0条评论 709点热度 0人点赞 博主 阅读全文
1234
分类
  • .NET (65)
  • docker (3)
  • linux (12)
  • python (20)
  • web (14)
  • 小程序 (4)
  • 数据库 (2)
  • 未分类 (4)
  • 杂七杂八 (10)
标签聚合
nginx python C# winform js centos linux DevExpress
最新 热点 随机
最新 热点 随机
.NET开发手册标准参考 招募兼职前端开发 Centos安装dotnet6环境 VS上切换分支,vs编译运行出现bug,A fatal error was encountered彻底解决方案 用C#封装一个线程安全的缓存器,达到目标定时定量更新入库 C#通过特性的方式去校验指定数据是否为空
DevExpress控件-使用ToolTipController控件 python 批量剪切图片指定区域 使用C#把汉字转化为拼音(完整版-GB2312汉字都能转化成功) sqlserver 查询数据库名 表名 字段名 字段类型等 微信小程序 音频播放功能createInnerAudioContext C# 采用Automation控制自动化操作第三方软件

COPYRIGHT © 2021 陈程的技术博客. ALL RIGHTS RESERVED.

THEME KRATOS MADE BY VTROIS