Arcobjects Arcmap add in repaint windows form

11-17-2011 11:45 AM
New Contributor

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

0 Kudos
1 Reply
New Contributor

I was creating a second instance of the first form and changing the label text on it.
0 Kudos