- 博客(8)
- 收藏
- 关注
原创 使用Datagridview显示图片列
DataGridViewImageColumn Imange = newDataGridViewImageColumn();Imange.HeaderText = “照片”;Imange.Image = this.pictureBox1.Image;//把PictureBox上的图片赋值给图像列Imange.ImageLayout = DataGridViewImageCellLayout....
2019-03-29 14:24:39 2987
原创 合理使用Label的backgroundImage的属性
public Panel SetInpanel(string Pinyin,string Zi,int WidthPanel){Panel PanelOut = new Panel();int HeigetPanel = WidthPanel * 3 / 2;PanelOut.Height = HeigetPanel;PanelOut.Width = WidthPanel;Label ...
2019-03-19 08:24:54 603
转载 判断程序是否正在运行
2016年05月07日 15:50:35 贝爷_野外求生 阅读数:3273http://www.aspku.com/kaifa/cjc/131414.html一、引言最近发现很多人在论坛中问到如何防止程序被多次运行的问题的,如:http://social.msdn.microsoft.com/Forums/zh-CN/6398fb10-ecc2-4c03-ab25-d03544f5fcc9...
2019-03-18 16:52:00 3255
原创 关于多线程 异步执行 Ui
/注意:耗时的代码不能放在 this.BeginInvoke(new MethodInvoker(() => 耗时代码 }));否则没有产生异步的效果。//BeginInvoke中只能放置操作控件的代码。BeginInvoke将子线程线程通过委托抛向UI主线程。在创建窗口句柄之前,不能在控件上调用 Invoke 或 BeginInvoke 解决办法。以下显示为多线程通过委托来修改 UI控件上的值。
2019-03-16 16:52:51 348
转载 关于winform的重绘
一个控件 应该什么时候绘制 主要有两个一个是 系统来确定 这个控件需要绘制 比如 最小化后在最大化 那么此时 系统会发出WM_PAINT 消息来告知控件 你需要重绘了另一个就是 人为的调用this.Invalidate()或者this.Invalidate(Rectangle)来自己触发一次重绘对于第一种 那是系统自身的一种行为 不管你是什么控件系统自带的还是自己写的 对于一些操作必然是要...
2019-03-14 19:42:43 1949
转载 C# WINFORM开发闪烁自适应的问题
在进行最大化的界面过程中,会引发到界面空间闪烁问题1.界面自适应代码 在Form类文件中全局变量X,Yprivate float X;private float Y;具体的控件自适应方法private void setTag(Control cons){foreach (Control con in cons.Controls){con.Tag = con.Width + “:...
2019-03-10 21:55:01 606
原创 获取网关Ip C#
namespace GetGatMac{public class GetMac{string SetIp;public string GetMacString(string Gat = null){string MacOut;string Ip = Gat == null ? GetNetIp() : GetGatIp();string postfix = string.Form...
2019-03-05 19:06:33 865
原创 同比例formResize方法
using System;using System.Collections.Generic;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace WindowsFormsApp1{public class FormResize{ public List<controlRect> oldCtrls = new List<control
2019-03-05 19:01:31 663
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人