winForm 窗体单例 (底层显示到上层,任务栏显示出来)
以下核心代码public static Form frm;private void button1_Click(object sender, EventArgs e){ if (frm == null || string.IsNullOrEmpty(frm.Text)) { frm = new Form2(); frm.Show(); } else { frm.WindowState = FormWind…
以下核心代码public static Form frm;private void button1_Click(object sender, EventArgs e){ if (frm == null || string.IsNullOrEmpty(frm.Text)) { frm = new Form2(); frm.Show(); } else { frm.WindowState = FormWind…
先给大家看一下效果,如下图ProgressBar控件.net 目前没有带百分比显示的,要我们自己做一个带显示百分比的控件如转载请保留原创地址 http://www.luofenming.com/show.aspx?id=ART2018083000001在这里 长话短说 说重点的以下是自己绘制带百分比的ProgressBar的核心代码usin…
在这里我封装好了一个类 import android.content.Context; import android.widget.Toast;public class ToastUtil {private static Toast mToast;public static void ShowMsg(Context context, String msg,int duration) {if (mToast == null) {mToast = Toast.makeText(contex…
效果自定义控件核心代码/// summary/// 遮罩层/// /summary[Designer("System.Windows.Forms.Design.ParentControlDesigner, System.Design", typeof(IDesigner))]public class MaskLayer : Control{/// summary/// 遮罩层/// /summarypublic MaskLayer(){SetSty…
假如我们之前写了一个方法,性能上或什么不好,想让引导调用者使用新用新的方法,效果如下图核心代码class Program{//原创来自http://www.luofenming.com/show.aspx?id=ART2021111600001static void Main(string[] args){int i1 = M1(1, 3);int i2 = M2(1, 3);}//为了好演示…
先看一下效果,在这里我以TextBox控件为例,其它类型的操作也类似于这样视频讲解地址 https://www.bilibili.com/video/BV1AV4y1M7mR步骤如下(控件名为textBox1)1、注册两个事件,代码如下private void textBox1_DragDrop(object sender, DragEventArgs e){ textBox1.Text…
script document.getElementById('oad').onchange = function () {var select = document.getElementById('oad');//获取选中显示值alert(select.options[select.selectedIndex].innerText);//获取选中值alert(select.value);}/script
视频教程 https://www.bilibili.com/video/BV1F64y1b7nv (如果不会请看我录制的视频教程)显示样例核心源码public class IconfontHelper{public static System.Drawing.Text.PrivateFontCollection PFCC{get{return pfcc ?? LoadFont();}}//提供一个字体系列集合,该集合是…
layUI数据表格显示值与实际值(如1代表男、2代表女,或者1代表超级管理员,2代表普通用户)下面是核心代码, cols: [[ //表头{ type: 'checkbox', fixed: 'left' }, { field: 'ID', title: 'ID', width: 80, sort: true, fixed: 'left' }, { field: 'UserName', title: '用户名'…