自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(15)
  • 资源 (2)
  • 收藏
  • 关注

原创 FRP内网穿透配置

一、FRP下载地址本次测试使用Windows版本:frp_0.35.1_windows_386.ziphttps://github.com/fatedier/frp/releases二、配置cmd文件三、服务器端配置配置文件 frps.ini[common]bind_port = 7000 #与客户端绑定的进行通信的端口vhost_http_port = 6088 #访问客户端web服务自定义的端口号vhost_https_port = 443 #访问

2021-02-15 21:56:23 434

转载 C#WinForm开发之DataGridView 中合并单元格

Windows Forms DataGridView 没有提供合并单元格的功能,要实现合并单元格的功能就要在CellPainting事件中使用Graphics.DrawLine和 Graphics.DrawString 自己来“画”。下面的代码可以对DataGridView第1列内容相同的单元格进行合并: private void dataGridView1_CellPainting(object sender, DataGridViewCellPaintingEventArgs e)

2021-02-04 16:06:09 2198

原创 C# DataGridView合并单元格

private void dataGridView1_CellPainting(object sender, DataGridViewCellPaintingEventArgs e) { if (e.RowIndex >= 0 && e.ColumnIndex >= 0 && e.Value.ToString() != string.Empty) { //if (!s.

2021-02-04 15:53:18 4903 2

原创 C# 引用配置文件app.config

配置文件app.config1.app.config内参数的增加<connectionStrings> <add name="constr" connectionString="Data Source=.;Initial Catalog=****;USER=****;PASSWORD=****"/> </connectionStrings>添加引用System.Configuration获取参数字符串 string connectstr= C

2021-01-11 22:19:34 641

原创 c# 简单的登录界面账号密码登录判断

登录界面账号密码登录判断 SqlConnection cn = new SqlConnection(" Data Source=.\\sqlexpress;Initial Catalog=stuinfo;Integrated Security=True"); string sql = "select count(*) from Login where User_ID=@User_ID and User_Pwd=@User_Pwd";

2020-10-19 20:50:20 3706

原创 C# dataGridView展示数据库查询结果

C# dataGridView展示数据库查询结果 private void browsetc() { //SqlConnection cn = new SqlConnection(sqlText.sql); login frmlg = new login(); string urlIP = "Data Source =" + frmlg.textIP.Text.Trim() + sqlText.sql;

2020-10-11 13:15:42 1585

原创 c# comboBox展示数据库列

comboBox展示数据库列//COMBOBOX展示数据库 private void cmbox() { // SqlConnection con = new SqlConnection(sqlText.sql); login frmlg = new login(); string urlIP = "Data Source =" + frmlg.textIP.Text.Trim() + sqlText.

2020-10-11 13:10:35 748

原创 C# 统计 dataGridView行数

统计 dataGridView行数//dataGridView行数统计label20.Text = dataGridView2.Rows.Count.ToString();

2020-10-10 15:43:38 3289

原创 c# dataGridView 控件显示行号

dataGridView 控件显示行号 private void dataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) { Rectangle rect = new Rectangle(e.RowBounds.Location.X, e.RowBounds.Location.Y, dataGridView1.RowHeadersWidth - 4, e

2020-10-10 15:23:49 550

原创 C#的MessageBox常用代码和效果(带图)

MessageBox常用代码和效果1.单纯显示提示信息 MessageBox.Show("你好!");2.提示信息+标题 MessageBox.Show("你好!","提示");3.提示信息+标题+提示图标 MessageBox.Show("你好!","提示",MessageBoxButtons.OK,MessageBoxIcon.Warning);4.提示信息+标题+提示图标+是否按钮if (MessageBox.Show("你好!", "提示", MessageBoxButt

2020-10-09 15:13:57 475

原创 c#加密和解密base64

using System;using System.Text; namespace Common{/// <summary>/// 实现Base64加密解密/// </summary>public sealed class Base64{/// <summary>/// Base64加密/// </summary>/// <param name="codeName">加密采用的编码方式</param>///

2020-10-08 11:27:56 303

原创 C# textbox限制仅输入数字和小数点

public static void Key_Press(KeyPressEventArgs e, TextBox txt) { //if (e.KeyChar != 8 && !char.IsDigit(e.KeyChar)) //{ // e.Handled = true; //} if (((int)e.KeyChar < 48 || (i

2020-10-08 11:23:23 1316

原创 C# 登录密码框TextBox显示*或者●

登录密码框显示*或者●选中TextBox属性找到TextBox属性PasswordChar,在后面输入对应的*或者●即可调试效果选中TextBox属性找到TextBox属性PasswordChar,在后面输入对应的*或者●即可调试效果

2020-10-05 12:52:47 2040

原创 c# winform登录窗口按enter自动登录设置

键盘按enter自动登录设置1.选择登录窗体属性2.选择AcceptButton ,把AcceptButton 设置成登录按钮,这样敲打回车就会执行登录按钮。

2020-10-05 12:38:53 1214

原创 C#窗体间数据传递

C#窗体间数据传递1.新建窗体应用程序:窗体1,拖入控件;2.新建窗体应用程序:窗体2,拖入label控件;3.新建一个类,类中创建一个静态字段;类中代码:public class opname{public static string name;}4.在窗体1中加入代码,原理是窗体1的值传给新建类静态字段,然后取值时直接从静态字段中取值;窗体1代码:opname.name = textBox1.Text;//窗体1的值传给新建类静态字段Form2 frm2 = new F

2020-10-05 12:27:04 1298

c# 通过IP地址获取主机名称

通过输入计算机设备ip来自动获取计算机名称的一个小工 具 。

2020-10-15

C#窗体间数据传递.rar

C#不通窗体之间textbox值得简单传递,此文件是自己在学习过程中自己测试的文件,代码相对简单,可以达到将窗体一的textbox的值传递到窗体二的lable中,一次类推可以传递到其他控件

2020-10-08

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除