saipo

Arcobjects Arcmap add in repaint windows form

Discussion created by saipo on Nov 17, 2011
Latest reply on Nov 17, 2011 by saipo
Hi,

I'm developing a an arcmap addin.  Press a button on the arcmap gui and display a windows
form (not a dockable window).  The user press a button on the form to display a second windows form.  This all works as expected.  The user then does something on the second form which should
change some label text on the original form. 

The label text is not changing on the fist form.  I can msgbox the label text and it is correct but the new text is not displayed. 

Can someone point out how to repaint, refresh the original form.  It just happens in a windows application, but is there something different with an add in?

Arcmap version 10 visual studio 2010.

This is code on the second form that changes the label text on the first form.

Dim frmmain As frm_main = New frm_main() ' fisrt form
frmmain.lbl_conn_status.Text = "CONNECTED UAT"
frmmain.lbl_conn_status.BackColor = Drawing.Color.Green

Thanks

Outcomes