Click here to Skip to main content
15,896,154 members
Home / Discussions / C#
   

C#

 
GeneralRe: .net Variable Naming Conventions Pin
Steven Campbell19-Oct-04 13:22
Steven Campbell19-Oct-04 13:22 
GeneralRe: .net Variable Naming Conventions Pin
Jayman91119-Oct-04 13:28
Jayman91119-Oct-04 13:28 
GeneralAccessing form controls in code Pin
isittheweekendyet19-Oct-04 12:59
isittheweekendyet19-Oct-04 12:59 
GeneralRe: Accessing form controls in code Pin
Anonymous19-Oct-04 13:25
Anonymous19-Oct-04 13:25 
GeneralRe: Accessing form controls in code Pin
Nick Parker19-Oct-04 13:26
protectorNick Parker19-Oct-04 13:26 
GeneralRe: Accessing form controls in code Pin
isittheweekendyet19-Oct-04 14:34
isittheweekendyet19-Oct-04 14:34 
GeneralRe: Accessing form controls in code Pin
Nick Parker19-Oct-04 15:12
protectorNick Parker19-Oct-04 15:12 
GeneralRe: Accessing form controls in code Pin
isittheweekendyet20-Oct-04 0:19
isittheweekendyet20-Oct-04 0:19 
I am accessing the controls as follows (continuing with your example):

public class test : System.Windows.Forms.Form
{
	Button b;
	Label l;
	Client myClient = new Client();

	public test()
	{
		l = new Label();
		this.Controls.Add(l);
		b = new Button();
		b.Location = new Point(20, 20);
		b.Click += new EventHandler(bClick);
	
		this.Controls.Add(b);
	}
	public static void Main()
	{
		Application.Run(new test());
	}
	private void bLoadClientClick(object sender, EventArgs e)
	{
        	myClient.LoadClient();
		myClient.DisplayClient();
         }
}

public class Client
{
	string strName = "";
	string strAddress = "";
	string strTelephone = "";

	public void DisplayClient()
	{
		txtName.Text = strName;
		txtAddress.Text = strAddress;
		txtTelephone.Text = strTelephone;
	}

	public bool LoadClient()
	{
		...
		...
	}
}


That type of thing.

Thanks
GeneralBest practices with password storage/use Pin
econner19-Oct-04 12:01
econner19-Oct-04 12:01 
GeneralRe: Best practices with password storage/use Pin
Nick Parker19-Oct-04 12:52
protectorNick Parker19-Oct-04 12:52 
GeneralRe: Best practices with password storage/use Pin
Steven Campbell19-Oct-04 13:20
Steven Campbell19-Oct-04 13:20 
Generalinsert picture in listbox Pin
hudhud19-Oct-04 10:50
hudhud19-Oct-04 10:50 
GeneralRe: insert picture in listbox Pin
Nick Parker19-Oct-04 15:59
protectorNick Parker19-Oct-04 15:59 
GeneralCompare lines in two large txt files Pin
sverre.andersen19-Oct-04 10:39
sverre.andersen19-Oct-04 10:39 
GeneralRe: Compare lines in two large txt files Pin
Nick Parker19-Oct-04 13:16
protectorNick Parker19-Oct-04 13:16 
GeneralQuestion about Interop with a DLL written in C++ Pin
kmansari19-Oct-04 10:23
kmansari19-Oct-04 10:23 
GeneralRe: Question about Interop with a DLL written in C++ Pin
Heath Stewart19-Oct-04 16:02
protectorHeath Stewart19-Oct-04 16:02 
GeneralRe: Question about Interop with a DLL written in C++ Pin
kmansari20-Oct-04 10:02
kmansari20-Oct-04 10:02 
GeneralRe: Question about Interop with a DLL written in C++ Pin
kmansari20-Oct-04 10:24
kmansari20-Oct-04 10:24 
GeneralRe: Question about Interop with a DLL written in C++ Pin
Heath Stewart20-Oct-04 13:37
protectorHeath Stewart20-Oct-04 13:37 
Generalmessaging in C# Pin
ppp00119-Oct-04 10:01
ppp00119-Oct-04 10:01 
GeneralRe: messaging in C# Pin
Heath Stewart19-Oct-04 15:46
protectorHeath Stewart19-Oct-04 15:46 
GeneralThreading -- Performance Pin
petst19-Oct-04 9:42
petst19-Oct-04 9:42 
GeneralRe: Threading -- Performance Pin
Salil Khedkar19-Oct-04 20:47
Salil Khedkar19-Oct-04 20:47 
GeneralRe: Threading -- Performance Pin
petst20-Oct-04 4:28
petst20-Oct-04 4:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.