can't view graphs

  • Thread starter Thread starter chigo
  • Start date Start date
C

chigo

i have to view a graph in form 2 when i press a button in
form 1 .... but..the graph is printed on form 1 itself
though all the coding is done in form 2 .. how do i solve
this problem ??
thnx
c
 
this looks like the OnPaint is reacting to Form1 and not Form2.

private void Something_Paint(object sender,
System.Windows.Forms.PaintEventArgs e)
{
System.Windows.Forms.Forms m_Form = (System.Windows.Forms.Form) sender;
string s_Output = m_Form.Name;
if (m_Form == Form1)
{
// Stop Debbuger;
Form2.Invalidate(); // Don't know if this will work with Forms, but with
a Panel the Paint event should be called.
}
if (m_Form == Form2)
{
// Stop Debbuger;
}
}

Try this and see what s_Output has as a starter.

Mark Johnson, Berlin Germany
(e-mail address removed)
 
hi mark... thnx for the help ... i was just missing the
form.refresh().. after i used that it woked perfectly
well ..
thnx anyways
amit
-----Original Message-----
this looks like the OnPaint is reacting to Form1 and not Form2.

private void Something_Paint(object sender,
System.Windows.Forms.PaintEventArgs e)
{
System.Windows.Forms.Forms m_Form =
(System.Windows.Forms.Form) sender;
 
hi alex,
i was not using the form.refresh() ,ethod ..
after i used it .. it worked fine ..
ne ways thanx for ur interest
regards
a
 
Back
Top