Click here to Skip to main content
16,005,826 members
Home / Discussions / C#
   

C#

 
GeneralRe: crtl copy and paste Pin
Jordanwb23-Dec-07 9:29
Jordanwb23-Dec-07 9:29 
GeneralC#:Problem in DataGridView CellMouseClck Event Pin
kssknov21-Dec-07 0:35
kssknov21-Dec-07 0:35 
GeneralRe: C#:Problem in DataGridView CellMouseClck Event Pin
martin_hughes21-Dec-07 1:34
martin_hughes21-Dec-07 1:34 
Generalimage change on mouse over Pin
Eli Nurman21-Dec-07 0:27
Eli Nurman21-Dec-07 0:27 
GeneralRe: image change on mouse over Pin
Stevo Z21-Dec-07 0:57
Stevo Z21-Dec-07 0:57 
Generalsorting gridview columns Pin
eyeseetee21-Dec-07 0:11
eyeseetee21-Dec-07 0:11 
GeneralRe: sorting gridview columns Pin
martin_hughes21-Dec-07 3:04
martin_hughes21-Dec-07 3:04 
Questionsimple code creating problem .........why ? Pin
sindhutiwari20-Dec-07 23:54
sindhutiwari20-Dec-07 23:54 
hi
i am having two forms
form1 is having two functions and a bool variable

code is ::::

public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public bool s = true;
Form2 f2 = new Form2();
private void Form1_Load(object sender, EventArgs e)
{
f2.MdiParent = this;
f2.Show();
}
public void a()
{
MessageBox.Show("u r in a ");

}
public void b()
{
MessageBox.Show("u r in b ");
}
}

the code for form 2 is
:::::::



public partial class Form2 : Form
{
Form1 ff;
public Form2()
{
InitializeComponent();
ff = (Form1)this.MdiParent;
}

private void button1_Click(object sender, EventArgs e)
{
ff.a();
ff.b();
if (ff.s == true)
{
MessageBox.Show("yes");
}
}
}


error is coming at ff.a().. ff.b()...ff.s as object reference not set to an instance of the object ....
plz tell me the problem
n..solution too
regards
sindhu tiwari
its me sid

AnswerRe: simple code creating problem .........why ? Pin
Colin Angus Mackay21-Dec-07 0:20
Colin Angus Mackay21-Dec-07 0:20 
GeneralSystem.FileIOPermission class Pin
Raheem MA20-Dec-07 23:33
Raheem MA20-Dec-07 23:33 
GeneralRe: System.FileIOPermission class Pin
Colin Angus Mackay21-Dec-07 0:06
Colin Angus Mackay21-Dec-07 0:06 
GeneralAdding two projects Pin
Prabhat00320-Dec-07 22:29
Prabhat00320-Dec-07 22:29 
GeneralRe: Adding two projects Pin
Colin Angus Mackay21-Dec-07 0:08
Colin Angus Mackay21-Dec-07 0:08 
GeneralTransfer XML to database Pin
kaluk20-Dec-07 22:24
kaluk20-Dec-07 22:24 
AnswerRe: Transfer XML to database Pin
boersnoes21-Dec-07 3:19
boersnoes21-Dec-07 3:19 
GeneralMdi parent logic .....c#.net Pin
sindhutiwari20-Dec-07 21:58
sindhutiwari20-Dec-07 21:58 
GeneralRe: Mdi parent logic .....c#.net Pin
CKnig20-Dec-07 22:21
CKnig20-Dec-07 22:21 
Generaldisabling gridview Pin
eyeseetee20-Dec-07 21:40
eyeseetee20-Dec-07 21:40 
AnswerRe: disabling gridview Pin
Ujjaval Modi20-Dec-07 21:49
Ujjaval Modi20-Dec-07 21:49 
GeneralRe: disabling gridview Pin
eyeseetee20-Dec-07 22:12
eyeseetee20-Dec-07 22:12 
GeneralRe: disabling gridview [modified] Pin
J4amieC20-Dec-07 22:36
J4amieC20-Dec-07 22:36 
GeneralRe: disabling gridview Pin
eyeseetee20-Dec-07 22:49
eyeseetee20-Dec-07 22:49 
GeneralRe: disabling gridview Pin
DavidNohejl20-Dec-07 22:55
DavidNohejl20-Dec-07 22:55 
GeneralRe: disabling gridview Pin
eyeseetee20-Dec-07 22:57
eyeseetee20-Dec-07 22:57 
GeneralRe: disabling gridview Pin
eyeseetee20-Dec-07 23:03
eyeseetee20-Dec-07 23:03 

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.