By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,950 Members | 1,005 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,950 IT Pros & Developers. It's quick & easy.

Form gets closed when clicked on the form area, C# Windows app

P: 74
Hi,

I m working on a Windows application when I am opening a Windows form on change of date control on parent form.
I am opening that windows form using ShowDialog(). On that form there are 3 countrols, 2 are Infragistics combobox and 1 is User control. When I select a combobox, it opens a drop down but instead selecting the value in the dropdown I click on the form area. It calls the form_Closing method.

I m not sure why it is happening as I need the value on the form to be returned to parent form.

Can anyone tell me why my form is getting closed???

Thanks in advance.
Apr 19 '12 #1
Share this Question
Share on Google+
1 Reply


P: 74
I got this resolved when I added Parent object as parameter while calling ShowDialog() method.

example: obj.ShowDialog(this);
Apr 19 '12 #2

Post your reply

Sign in to post your reply or Sign up for a free account.