I have aplication with 2 forms (form1, form2). First form opens the second(form2). When form2 is closed i need to activate gotfocus event on form1. I've tried something like this:
C# |
Sry for my bad english and pls help if u can
C# |
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Kirtan PatelRank #292 · 8.6K reputationPosted Dec 11, 2009, 9:26 PM EST
GotFocus() and LostFocus() only works with Controls ..
For Form you need to use Activated() and Deactivated() event.
Sam HobbsRank #107 · 20.5K reputationPosted Dec 11, 2009, 3:28 PM EST
- Set the event handler for the event
- Set the focus to a specific field
- Without moving the focus, do the processing that would be done when the control gets focus
I am sorry, but it is very unclear which of the three that you are asking about.Hiren SoniRank #694 · 3.5K reputationPosted Dec 11, 2009, 3:54 PM EST
Hiren SoniRank #694 · 3.5K reputationPosted Dec 11, 2009, 4:30 PM EST
Kliment Janceski5 reputationPosted Dec 11, 2009, 5:59 PM EST
Hiren SoniRank #694 · 3.5K reputationPosted Dec 11, 2009, 6:03 PM EST