Click here to Skip to main content
15,894,410 members
Home / Discussions / C#
   

C#

 
GeneralRe: What is the @ for? Pin
J. Dunlap5-Aug-03 9:31
J. Dunlap5-Aug-03 9:31 
GeneralControl painting Pin
Alex Korchemniy5-Aug-03 8:18
Alex Korchemniy5-Aug-03 8:18 
GeneralRe: Control painting Pin
J. Dunlap5-Aug-03 8:42
J. Dunlap5-Aug-03 8:42 
GeneralRe: Control painting Pin
Alex Korchemniy5-Aug-03 9:31
Alex Korchemniy5-Aug-03 9:31 
GeneralRe: Control painting Pin
Arun Bhalla5-Aug-03 10:15
Arun Bhalla5-Aug-03 10:15 
GeneralRe: Control painting Pin
Nick Parker5-Aug-03 17:33
protectorNick Parker5-Aug-03 17:33 
GeneralRe: Control painting Pin
Csharp™6-Aug-03 0:23
Csharp™6-Aug-03 0:23 
Generalaccessing variables between forms. Pin
mikemilano5-Aug-03 7:09
mikemilano5-Aug-03 7:09 
I have 2 forms. ( Form1 & Form2 )

Form 1 has a datagrid and an advanced search button which shows Form 2.

When the information in form 2 is submitted, I want it to hide and populate the datagrid of form 1.

The problem is that I can not seem to access any variables or functions of form 1 from form 2.

am i on the right track with the code below?

<form1>
<br />
private void button1_Click(object sender, System.EventArgs e)<br />
{<br />
  Form Form2 = new Form2();<br />
  Form2.Show();<br />
}


<form2>
<br />
private void btnFindContact_Click(object sender, System.EventArgs e)<br />
{<br />
  // db connections and populate DataSet variable "ds"<br />
  Form1.dataGrid1.SetDataBinding(ds,"Contacts");<br />
  this.Hide();<br />
}

GeneralRe: accessing variables between forms. Pin
apferreira5-Aug-03 7:23
apferreira5-Aug-03 7:23 
GeneralRe: accessing variables between forms. Pin
mikemilano5-Aug-03 8:45
mikemilano5-Aug-03 8:45 
GeneralRe: accessing variables between forms. Pin
Rocky Moore5-Aug-03 9:27
Rocky Moore5-Aug-03 9:27 
GeneralRe: accessing variables between forms. Pin
mikemilano5-Aug-03 9:48
mikemilano5-Aug-03 9:48 
Generalapplication hotkeys Pin
haimon155-Aug-03 6:56
haimon155-Aug-03 6:56 
GeneralTieing textboxes to grid Pin
Ista5-Aug-03 6:18
Ista5-Aug-03 6:18 
GeneralRe: Tieing textboxes to grid Pin
Ista5-Aug-03 9:48
Ista5-Aug-03 9:48 
Generalparent, showing a form Pin
THEMYTH5-Aug-03 5:07
THEMYTH5-Aug-03 5:07 
GeneralRe: parent, showing a form Pin
Rocky Moore5-Aug-03 9:51
Rocky Moore5-Aug-03 9:51 
GeneralMdi-Application Pin
JM_FL5-Aug-03 1:47
JM_FL5-Aug-03 1:47 
GeneralRe: Mdi-Application Pin
apferreira5-Aug-03 7:39
apferreira5-Aug-03 7:39 
Generaloffset printing to paper but not in print preview Pin
misterbear5-Aug-03 0:45
misterbear5-Aug-03 0:45 
Generalcomment... Pin
misterbear5-Aug-03 0:46
misterbear5-Aug-03 0:46 
GeneralRemoting Pin
Ivan Fernandez5-Aug-03 0:27
Ivan Fernandez5-Aug-03 0:27 
GeneralRe: Remoting Pin
Valeria Bogdevich5-Aug-03 2:55
Valeria Bogdevich5-Aug-03 2:55 
GeneralAn activeX in C# Pin
mrpink5-Aug-03 0:27
mrpink5-Aug-03 0:27 
GeneralRe: An activeX in C# Pin
Anonymously5-Aug-03 1:04
Anonymously5-Aug-03 1:04 

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.