Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form closing when it should not.

Status
Not open for further replies.

MrDataGuy

Programmer
Oct 18, 2010
231
0
0
US
Bottom line I have a form that is closing when I do not want it to, and I need some ideas why that is.

Details:

A form (Lets call it the PUI: Pick Up Information) is being called/instantiated from another form as a dialog form. The PUI has a few spinners, a checkbox, a couple of read only textboxes and a bunch of buttons that when clicked only ( well should only ) change the information in the read only textboxes.

When I change the spinner values, click the check box all OK. When I click on any of the buttons the form closes. (BTW I have one button <OK> that when is clicked does issues a Me.Close ). Why/what is happening that is causing the form to close?

Understand that without seeing the whole app you are more then a bit handcuffed.

One other clue. If I do an Application.Run(PUI) in my main program then there is no issue. Only when a PUI.ShowDialog() is used do I see the issue.

I will keep trying things and will report back the root cause if I ever figure it out.

BTW This is VB.net 3.0/2008


Lion Crest Software Services
Anthony L. Testi
President
 
OK Folks hold off with the ideas, it looks like my testing/developing code may be the root issue. Seems like 2 mins after posting a question I find the answer. <Smile>

Lion Crest Software Services
Anthony L. Testi
President
 
After lots of this and that and the other testing, debugging etc. etc. the answer.........

Botton:DialogResult set to >>cancel<<.

Who came into my office and set that??

Arrggghh moving on to next issue.

Lion Crest Software Services
Anthony L. Testi
President
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top