Click here to Skip to main content
15,892,005 members
Home / Discussions / C#
   

C#

 
GeneralRe: if someone could help me identify the problem please. Pin
Curtis Schlak.23-Jul-09 18:02
Curtis Schlak.23-Jul-09 18:02 
GeneralRe: if someone could help me identify the problem please. Pin
Adam R Harris23-Jul-09 7:50
Adam R Harris23-Jul-09 7:50 
GeneralRe: if someone could help me identify the problem please. Pin
Luc Pattyn3-Sep-09 5:17
sitebuilderLuc Pattyn3-Sep-09 5:17 
AnswerRe: if someone could help me identify the problem please. Pin
PIEBALDconsult23-Jul-09 7:49
mvePIEBALDconsult23-Jul-09 7:49 
AnswerRe: if someone could help me identify the problem please. Pin
DinoRondelly23-Jul-09 8:32
DinoRondelly23-Jul-09 8:32 
GeneralRe: if someone could help me identify the problem please. Pin
PIEBALDconsult23-Jul-09 12:45
mvePIEBALDconsult23-Jul-09 12:45 
QuestionHow to inject code to assembly (inject new class)? Pin
hdv21223-Jul-09 7:14
hdv21223-Jul-09 7:14 
QuestionPass data between two child forms Pin
Saamir23-Jul-09 6:56
Saamir23-Jul-09 6:56 
Hi guys!
Please help, I am trying to pass data from form1 to form2 using a datagridview cell click event (passing data from datagridview1 in form1 to datagridview2 in form2)

It is working fine if I open form1 and then form2, if I open form2 before form1 then it doesn't because it can't capture instance of form1 to access it.

Here is what I am doing presently:
in Parent (MDI), I have a public form instance for form1, I use that when I open form1 and then pass that instance to form2 when I open it.

This is what I am doing:

In Parent:
public frmGrid1 frm1;
....
//Form1 click event in parent
frm1 = new frmGrid1(m_ADBCnn, 1, notWorkedToolStripMenuItem.Text);
frm1.MdiParent = this;
frm1.Show();
....
//Form2 click event in parent
frm2 = new frmGrid2(frm1,m_ADBCnn,1,presentToolStripMenuItem.Text);
frm2.Show();
frm2.MdiParent = this;


I then assign frm1 in the constructor of form2 as follows:

private frmGrid1 frm1;
public frmGrid2(frmGrid1 f1)
{
try
{
InitializeComponent();
frm1 = f1;
}
catch (Exception ex)
{
MessageBox.Show("Failed on initialization: " + ex.Message);
}
}

Again, this works if I open form1 before form2. How can I retrieve frm1 from frm2 if it is null?


Please help

Sameer

AnswerRe: Pass data between two child forms Pin
musefan23-Jul-09 7:00
musefan23-Jul-09 7:00 
GeneralRe: Pass data between two child forms Pin
Saamir23-Jul-09 7:14
Saamir23-Jul-09 7:14 
GeneralRe: Pass data between two child forms Pin
Saamir23-Jul-09 7:25
Saamir23-Jul-09 7:25 
AnswerRe: Pass data between two child forms Pin
Giorgi Dalakishvili23-Jul-09 7:45
mentorGiorgi Dalakishvili23-Jul-09 7:45 
QuestionProblem with overriding minimization of Form with Wndproc Pin
ThomasManz23-Jul-09 6:16
ThomasManz23-Jul-09 6:16 
AnswerRe: Problem with overriding minimization of Form with Wndproc Pin
musefan23-Jul-09 6:57
musefan23-Jul-09 6:57 
GeneralRe: Problem with overriding minimization of Form with Wndproc Pin
ThomasManz29-Jul-09 10:09
ThomasManz29-Jul-09 10:09 
QuestionThrowing exception while Copying a file from a system to a shared location in another system Pin
cdewzrd23-Jul-09 4:35
cdewzrd23-Jul-09 4:35 
AnswerRe: Throwing exception while Copying a file from a system to a shared location in another system Pin
DoctorMick23-Jul-09 5:19
DoctorMick23-Jul-09 5:19 
QuestionButtons look different with DirectX Pin
Jordanwb23-Jul-09 4:30
Jordanwb23-Jul-09 4:30 
AnswerRe: Buttons look different with DirectX Pin
Nagy Vilmos23-Jul-09 6:32
professionalNagy Vilmos23-Jul-09 6:32 
QuestionXML Deserialisation to an inherited class type based on an XML attribute Pin
Clive D. Pottinger23-Jul-09 4:17
Clive D. Pottinger23-Jul-09 4:17 
AnswerRe: XML Deserialisation to an inherited class type based on an XML attribute Pin
Muhammad Mazhar23-Jul-09 4:50
Muhammad Mazhar23-Jul-09 4:50 
GeneralRe: XML Deserialisation to an inherited class type based on an XML attribute Pin
Clive D. Pottinger23-Jul-09 5:30
Clive D. Pottinger23-Jul-09 5:30 
AnswerRe: XML Deserialisation to an inherited class type based on an XML attribute [modified] Pin
Clive D. Pottinger23-Jul-09 5:57
Clive D. Pottinger23-Jul-09 5:57 
Questionread registry value from XML file and find it into the the registry?????can anybody help me. Pin
janeeta23-Jul-09 4:07
janeeta23-Jul-09 4:07 
QuestionProcess Enumeration loop Pin
Haydn01223-Jul-09 4:06
Haydn01223-Jul-09 4:06 

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.