473,382 Members | 1,387 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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

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
1 1392
I got this resolved when I added Parent object as parameter while calling ShowDialog() method.

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

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

Similar topics

5
by: Lyn | last post by:
Hi, I hope someone can help. I have a main form which mostly fills the Access window. In the bottom half of this form I have a tab control to display various types of data related to the main...
6
by: Gary Miller | last post by:
Does anyone know how to detect a modeless form on closing by the form that invoked the modeless form? form.Show();
4
by: Michael Gorbach | last post by:
Iv got a little bit of a threading problem. Iv got a form which handles events fired by an object running on another thread (the event handlers are executed on a thread differnet from the form's...
21
by: SamSpade | last post by:
I declare a variable X of type myForm then instantiate myForm saving a reference in the variable X, and then do X.Show. If I need to know if the form has been shown yet, I check X against...
4
by: Baz | last post by:
Hi. I'm new to this VB.Net mullarkey, and I must say it is proving to be a very trying experience. Here is the latest in a long line of problems: The Scenario ========= I am building an...
3
by: Harry_Crow | last post by:
I wanted to change the Non client area height. This was not possible in the existing Form TitleBar. So I set the FormBorderStyle= None and I calculated and introduced the Non Client area myself. So...
1
by: registerhere | last post by:
Hi, I was working with acrojavascript when i came acroos it. I have a pdf form. A global variable t=1 is initialized. Just before the form is closed, it calls a function dat increments its...
6
by: SAL | last post by:
Hi, VS2005 post I'm opening a window using the following syntax: Protected Sub lbEstValue_Click(ByVal sender As Object, ByVal e As System.EventArgs)...
0
by: vb6 student | last post by:
hey! Im using vb6 and access to create a search form. A flexigrid reterives data from database. There is one column named images in which address of different pictures are shown as hyperlink. The...
1
by: David Daikeler | last post by:
I have a table with items in it. I'd like the user to scan a bar code, have a form appear listing some of the information from this table and a picture of the item. This will stay static for 30...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.