【发布时间】:2020-04-22 13:13:59
【问题描述】:
昨天,我花了很多时间搜索连接Mysql WEB database 和C# windows form application 的教程,我尝试了很多代码并观看了大约 10 个类似的教程但没有任何帮助,我的意思是它对我没有帮助,因为它没有连接类型我需要...
我想连接这个数据库: Databsae image by lightshot
在这段代码中:
using MySql.Data.MySqlClient;
using System;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
namespace CS_Enginer
{
public partial class login : Form
{
public login()
{
InitializeComponent();
}
private void textBox1_Enter(object sender, EventArgs e)
{
if (textBox1.Text == "Username")
{
textBox1.Text = "";
textBox1.ForeColor = Color.DimGray;
}
}
private void textBox1_Leave(object sender, EventArgs e)
{
if (textBox1.Text == "")
{
textBox1.Text = "Username";
textBox1.ForeColor = Color.DimGray;
}
}
private void textBox2_Enter(object sender, EventArgs e)
{
if (textBox2.Text == "Password")
{
textBox2.Text = "";
textBox2.ForeColor = Color.DimGray;
textBox2.UseSystemPasswordChar = true;
}
}
private void textBox2_Leave(object sender, EventArgs e)
{
if (textBox2.Text == "")
{
textBox2.Text = "Password";
textBox2.ForeColor = Color.DimGray;
textBox2.UseSystemPasswordChar = false;
}
}
private void button2_Click(object sender, EventArgs e)
{
}
private void button3_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void button4_Click(object sender, EventArgs e)
{
this.WindowState = FormWindowState.Minimized;
}
private void login_MouseDown(object sender, MouseEventArgs e)
{
}
private void login_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
}
}
}
我知道我不应该发布图片,但我不知道如何解释...对此感到抱歉,提前致谢!!!
【问题讨论】:
-
我在 c# windows 窗体应用程序中创建登录系统,我想连接网络数据库以获取我发送的图像..
-
看病现在给你发图片,等一下 :) prnt.sc/s3zosr prnt.sc/s3zp5r
-
我说我看了很多教程,但我不明白,我试过的一切都不起作用......