摘要:
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.IO;using System.Diagnostics;namespace HYInstall{ public partial class Form1 : Form { string Current = Directory.GetC... 阅读全文
摘要:
usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Text.RegularExpressions;usingSystem.Windows.Forms;usingSystem.Net;namespaceWindowsFormsApplication1{publicpartialclassForm1:Form{publicForm1(){Ini 阅读全文
摘要:
Microsoft.VisualBasic.dll 引用using Microsoft.VisualBasic;String PM = Interaction.InputBox("请输入密码", "输入密码", "", 100, 100); if (PM != "123456") { MessageBox.Show("请输入正确的密码谢谢!!!!!"); return; } 阅读全文
摘要:
private static Form2 f2=null;private static Form3 f3 = null;private void button1_Click(object sender, EventArgs e) { if (f3 != null) { f3.Hide(); } if (f2== null) { f2 = new Form2(); f2.TopLevel = false; f2.Parent = this.panel3; f2.Show(... 阅读全文
摘要:
本次示例效果如下:Form1为父窗体(包含textBox1、button1)Form2为子窗体(包含textBox2、button2)父窗体给子窗体传值==================1.点击Form1的button1 打开Form2 父窗体给子窗体传值 可以调用重载子窗体的构造函数 直接传入相关数值 public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { Form2 frm2 阅读全文
摘要:
记性不好,就写下来。这个问题浪了我不少时间,希望不要再浪费其他人的时间了。1.FrmParent.csprivate void Button1_Click(object sender, EventArgs e) { FrmChild frmChild = new FrmChild(); frmChild .parentFrm = this; frmChild .ShowDialog(); }public void TestFunction(){MessageBox.show("这个是父窗体的函数");}2.FrmChild.csForm parentFrm ;private 阅读全文
摘要:
RowHeadersVisible = false 阅读全文
摘要:
C#使用udl连接数据库示例1、OleDbConnection oleconn = new OleDbConnection();oleconn.ConnectionString = @"File Name ="+Application.StartupPath+"\chis.udl";OleDbCommand olecommand = new OleDbCommand();olecommand.Connection = oleconn;olecommand.CommandText = "select * from mz_patient_mi&qu 阅读全文