- 博客(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#窗体间数据传递.rar
2020-10-08
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人