我已经创建了这段代码
在 .dll 文件中创建表单并添加控件
TextBox dbname = new TextBox();
dbname.BorderStyle = BorderStyle.Fixed3D;
dbname.Location = new Point(236, 81);
Button Create = new Button();
Create.FlatStyle = FlatStyle.Flat;
Create.FlatAppearance.BorderSize = 0;
Create.Location = new Point(261, 115);
Create.Text = "Create";
Create.Click += new System.EventHandler(this.Create_Click);
如何从文本框中获取文本?
private void Create_Click(object sender , EventArgs e)
{
SaveFileDialog _sfd_ = new SaveFileDialog();
_sfd_.Filter = "Housam Printing |*.HP";
_sfd_.InitialDirectory = AppDomain.CurrentDomain.BaseDirectory;
_sfd_.FileName = dbname.text;
_sfd_.Title = "Database location";
}
POPMUISE
相关分类