Click here to Skip to main content
15,904,951 members
Home / Discussions / C#
   

C#

 
GeneralRe: Dynamic Controls. Pin
Razvan Dimescu17-Apr-08 19:58
Razvan Dimescu17-Apr-08 19:58 
GeneralRe: Dynamic Controls. Pin
Nouman Bhatti17-Apr-08 21:10
Nouman Bhatti17-Apr-08 21:10 
GeneralOpenFileDialog then open image Pin
zidan91117-Apr-08 18:34
zidan91117-Apr-08 18:34 
GeneralRe: OpenFileDialog then open image Pin
Christian Graus17-Apr-08 19:39
protectorChristian Graus17-Apr-08 19:39 
GeneralRe: OpenFileDialog then open image Pin
Vikram A Punathambekar17-Apr-08 20:19
Vikram A Punathambekar17-Apr-08 20:19 
QuestionHide data column instead of remove column in dataset Pin
cocoonwls17-Apr-08 18:26
cocoonwls17-Apr-08 18:26 
GeneralRe: Hide data column instead of remove column in dataset Pin
darkelv17-Apr-08 19:54
darkelv17-Apr-08 19:54 
GeneralRe: Hide data column instead of remove column in dataset Pin
Nouman Bhatti17-Apr-08 21:14
Nouman Bhatti17-Apr-08 21:14 
GeneralRe: Hide data column instead of remove column in dataset Pin
cocoonwls17-Apr-08 21:34
cocoonwls17-Apr-08 21:34 
Questionhow to handle click event of DataGridViewLinkColumn in DataGridView - C# Windows project Pin
NarVish17-Apr-08 18:23
NarVish17-Apr-08 18:23 
AnswerRe: how to handle click event of DataGridViewLinkColumn in DataGridView - C# Windows project Pin
Razvan Dimescu17-Apr-08 20:10
Razvan Dimescu17-Apr-08 20:10 
AnswerRe: how to handle click event of DataGridViewLinkColumn in DataGridView - C# Windows project Pin
tamojit Mondal6-Jan-10 21:53
tamojit Mondal6-Jan-10 21:53 
GeneralHelp in C # Pin
zidan91117-Apr-08 18:20
zidan91117-Apr-08 18:20 
GeneralRe: Help in C # Pin
Christian Graus17-Apr-08 19:41
protectorChristian Graus17-Apr-08 19:41 
GeneralRe: Help in C # Pin
Rob Smiley18-Apr-08 10:35
Rob Smiley18-Apr-08 10:35 
QuestionHow to check whether Datetime value is null Pin
YAI17-Apr-08 18:11
YAI17-Apr-08 18:11 
AnswerRe: How to check whether Datetime value is null Pin
Christian Graus17-Apr-08 19:42
protectorChristian Graus17-Apr-08 19:42 
GeneralRe: How to check whether Datetime value is null Pin
YAI17-Apr-08 20:48
YAI17-Apr-08 20:48 
AnswerRe: How to check whether Datetime value is null Pin
Luc Pattyn17-Apr-08 21:11
sitebuilderLuc Pattyn17-Apr-08 21:11 
GeneralNullReferenceException when using Delegate Pin
cocoonwls17-Apr-08 15:30
cocoonwls17-Apr-08 15:30 
Hi all,
In my application, i have few delegate and it is work well,but one of the delegate prompt me the error below when using delegate to pass data from frmA to frmB:

NullReferenceException was unhandled
Object reference not set to an instance of an object.


Below is the sample coding:

formA:
public openForm callbackOpenForm;
public DisplayProgramNameDate callbackProName;
public openExistingProgram callbackExistProgram;

public formA{}

private void btnOpen_open_Click(object sender, EventArgs e)
{
    callbackProName(cboProgram_open.Text, Convert.ToString(DateTime.Now));
    callbackOpenForm("ProgramSetting");
    callbackExistProgram();  <----------------------error on this delegate
    this.Hide();
}


formB:
public formB{
          formA fA = new formA();
          fA.callbackExistProgram += new openExistingProgram(this.callbackExistProgramFn);
        }

        private void callbackExistProgramFn()
        {
            sqlconn.DbConnection();
            ds = sqlconn.SelectSQL("ProgramSetting", "PS_Program_Name", singleton.ProName);
        }


class Delegate:
//create new drawing area at main
public delegate void CreatePictureBox(Boolean b);
//display pro name in statusstrip at main
public delegate void DisplayProgramNameDate(String sName, String sDate);
//call to open form
public delegate void openForm(String sName);
//Open a program
public delegate void openExistingProgram();

can anyone help me on this? Sigh | :sigh:


thanks in advance
cocoon
GeneralRe: NullReferenceException when using Delegate Pin
Christian Graus17-Apr-08 15:37
protectorChristian Graus17-Apr-08 15:37 
GeneralRe: NullReferenceException when using Delegate Pin
cocoonwls17-Apr-08 16:12
cocoonwls17-Apr-08 16:12 
GeneralRe: NullReferenceException when using Delegate Pin
Christian Graus17-Apr-08 16:22
protectorChristian Graus17-Apr-08 16:22 
GeneralMadness? IDisposable and template/factory methods Pin
Roger Alsing17-Apr-08 12:44
Roger Alsing17-Apr-08 12:44 
QuestionI am getting 0x00000096 type messages. Pin
dougins17-Apr-08 11:45
dougins17-Apr-08 11:45 

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.