怎么读取别的软件上的控件?
假设现在有A跟B,2个小软件(都是仅有一个form的)A的窗体上有text、Combobox跟chenckbox这三个控件,请问怎么让B读取到搜索到A上面有三个控件,并将三个控件里面的赋值,直接Prirt到form上呢?里面那个命名空间有相关的类呢?刚学VB。NET,还没有入门,请高手教下!
测试一下这个代码编辑器
程序代码:
using System; using System.Collections; using System.Configuration; using System.Data; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; public partial class reg : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { string user = TextBox1.Text.Replace("'",""); string pw = TextBox2.Text.Replace("'",""); string email = TextBox4.Text.Replace("'",""); DataBase db=new DataBase (); bool b= db.adlData("insert into tUser(cUser,cPW,cEmail) values('"+ user +"','"+ pw +"','"+ email +"')"); if (b == true) { Response.Write("<script tpye='javascript'>alert('恭喜你注册成功');window.location.href='login.aspx';</script>"); } else { Response.Write("<script tpye='javascript'>alert('用户名被占用');</script>"); } } }