A
Andrew Mueller
Hello,
I am having issues (probably related to my VB background) using C# and
changing the properties of my form's controls from a separate class within
the solution. Here is some of my code:
namespace ArchiveDataExport{
public class Form1 : System.Windows.Forms.Form{
public System.Windows.Forms.GroupBox gp1;
public System.Windows.Forms.Textbox txtServerName;
Public Form1()
{
InitializeComponent();
}
......
All the stuff generated for cleaning up resources
......
All the code to 'do stuff' when I press buttons, etc..
-------- Separate Class Object within solution -----------
namespace ArchiveDataExport
Public Class Historian{
te
string strSQLConnection = "Provider=SQLOLEDB; Data Source = " +
ArchiveDataExport.Form1.txtServerName.Text
}
Of course, this is abbreviated... But the point is that I need to use the
Text property of the txtServerName textbox object for concatenation..
Thanks in advance,
Andrew Mueller
I am having issues (probably related to my VB background) using C# and
changing the properties of my form's controls from a separate class within
the solution. Here is some of my code:
namespace ArchiveDataExport{
public class Form1 : System.Windows.Forms.Form{
public System.Windows.Forms.GroupBox gp1;
public System.Windows.Forms.Textbox txtServerName;
Public Form1()
{
InitializeComponent();
}
......
All the stuff generated for cleaning up resources
......
All the code to 'do stuff' when I press buttons, etc..
-------- Separate Class Object within solution -----------
namespace ArchiveDataExport
Public Class Historian{
te
string strSQLConnection = "Provider=SQLOLEDB; Data Source = " +
ArchiveDataExport.Form1.txtServerName.Text
}
Of course, this is abbreviated... But the point is that I need to use the
Text property of the txtServerName textbox object for concatenation..
Thanks in advance,
Andrew Mueller