|
-
May 11th, 2007, 03:17 AM
#1
Thread Starter
Junior Member
form.show problem
i have to make a pocket aplication
i read from an xml file and i modify some data
private void button1_Click(object sender, EventArgs e)
{
System.Data.DataSet DSet = new DataSet();
DSet.ReadXml("Employee.xml");
dataGrid1.DataSource = DSet.Tables[0];
}
private void button2_Click(object sender, EventArgs e)
{
Form1 Form2 = new Form1();
Form2.Show();//using ShowDialog is teh same
Form2.Activate();
the problem is i cant switch to form2 where i have a textbox and a buton
and if you can please tell me how i can insert the value in the dataset
Sr for so many questions but i'm a rookie with C#
Last edited by King Abadon; May 11th, 2007 at 03:38 AM.
-
May 11th, 2007, 03:34 AM
#2
Re: form.show problem
I don't use C# much but Maybe?
-
May 11th, 2007, 04:51 AM
#3
Re: form.show problem
The code for initializing Form2 and showing it would be
Code:
Form2 newForm= new Form2();
newForm.Show();
newForm.Activate();
Use [code] source code here[/code] tags when you post source code.
My Articles
-
May 11th, 2007, 02:36 PM
#4
Re: form.show problem
 Originally Posted by Shuja Ali
The code for initializing Form2 and showing it would be
Code:
Form2 newForm= new Form2();
newForm.Show();
newForm.Activate();
That'd be right if there was a Form2 class.
And by the way, you don't have to use newForm.Activate(); because it's called from the inside of Form.Show()
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|