GIlgledson Posted February 9, 2016 at 10:57 AM Report Share #593290 Posted February 9, 2016 at 10:57 AM Bom dia galera, eu estou com uma duvida de como alterar a propriedade de uma elemento no formulário principal a partir de um evento no usercontrol, agradeço desde já a ajuda. eu estou tentando fazer da seguinte maneira segue o codigo. Form1 form = new Form1(); Label tex = (Label)form.Controls["label1"]; tex.Text = textBox1.Text; Link to comment Share on other sites More sharing options...
kerplunkboy Posted February 16, 2016 at 08:55 PM Report Share #593601 Posted February 16, 2016 at 08:55 PM (edited) Experimente: ((Label)form.Controls["label1"]).Text = textBox1.Text; Edited February 16, 2016 at 09:16 PM by thoga31 GeSHi Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now