随笔分类 - WinForm
摘要:一:项目结构 二:核心代码 using Timer = System.Windows.Forms.Timer; namespace Shutdown { public partial class MainForm : Form { // 拖拽状态和高度 private bool dragging =
阅读全文
摘要:看到这个手写模拟器想到的动态加载字体。 界面: 源码: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; usin
阅读全文
摘要:1.可能需要:WMDC驱动 (需要重启) https://junipersys.com/data/support/WMDC-fixes-for-Win10.msi 2.可能需要:注册DLL WIN+R => CMD => for %1 in (%windir%\system32\*.dll) do
阅读全文
摘要:大致效果: 素材: 步骤1:添加角色(PictureBox,可以换图片作为不同角色) 步骤2:实现角色通过按键移动,这里可以用钩子,也可以通过Winfrom自带的KeyDown 来实现(操作起来不够丝滑) 步骤3:设计怪物(添加一个自定义控件,方便管理),你可以设计怪物分类,比如:精英怪、BOSS之
阅读全文
摘要:public class ControlComputer { /// <summary> /// 重启当前程序 /// </summary> public static void ReStartApplicationSelf() { System.Diagnostics.Process.Start(
阅读全文
摘要:声明根节点 private TreeNode root1; private TreeNode root2; private TreeNode root3; private TreeNode root4; public Form1() { InitializeComponent(); Load +=
阅读全文
摘要:1.重写 protected override void WndProc(ref Message m) { if (m.Msg == 163 && this.ClientRectangle.Contains(this.PointToClient(new Point(m.LParam.ToInt32(
阅读全文
摘要:public partial class FrmMain : Form { public FrmMain() { InitializeComponent(); } private void 退出系统ToolStripMenuItem_Click(object sender, EventArgs e)
阅读全文
摘要:初始化: public DataTable1() { InitializeComponent(); Init(); } private void Init() { dt = new DataTable("cart"); DataColumn dc1 = new DataColumn("prizena
阅读全文
摘要:实现控制 6个线程,分别对应6个窗口。每关闭一个子窗口,则自动开启一个新窗口(保证固定线程的数量) 父窗口 public partial class Form1 : Form { int a; public Form1() { InitializeComponent(); a = 0; } Thre
阅读全文
摘要:侧边栏右键: 新增/修改: 下载地址:https://files-cdn.cnblogs.com/files/Zingu/Release.rar
阅读全文
摘要:int a = 0; string[] kc = new string[40] { "private","protected","public","namespace","class","object","if","else", "while","switch","case","using","ev
阅读全文
摘要:using MySql.Data.MySqlClient;using System; using System.Data; using System.Threading; using System.Windows.Forms; namespace DataGirdView{ public parti
阅读全文
摘要:界面 后台代码 using Newtonsoft.Json;using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using S
阅读全文
浙公网安备 33010602011771号