Click here to Skip to main content
15,911,762 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hello there,

When I click a button, it shows a camera viewing screen. on that form's load event, it tries to connect to a camera on a serial port. I have no camera attached, so it shows a customized error, and then should close the form and show Form1.

The problem is that Form1 never shows, and I've debugged, to find that the Form_Formclosing event never fires, although the handle is correct.

Please don't tell me there's corruption as the project is huge and I don't want to rewrite it

-ricky
Posted
Comments
Sriram Bala 29-Sep-13 9:14am    
Hi,
Post your source code this will help us to have look and see we can provide any solution.
Sriram.B
[no name] 29-Sep-13 9:36am    
Thanks for your interest- there is so much code that I don't know what to post- I've hosted my project here so please download and run to see what I mean- you have to OK the msgboxs until the main form shows, then click the button at the bottom that says "View live video". then a few msgboxs later, the whole project will close.
http://www1.datafilehost.com/d/d1af6ee6
Sergey Alexandrovich Kryukov 29-Sep-13 10:25am    
"So much code"? It simply means that you are wasting your time. You either need to find a problem by yourself, or get help. To get help, you would need to do some work. Typically, you could try to write scaled-down version of your code, strip it down until you get a really small sample yet manifesting the problem. Chances are, it would help you to locate the problem by yourself. If not, your sample would be good for showing here.

There is no such thing as miracle. There can be too many ways to screw up things. We don't know which one did you use.

—SA

1 solution

The form does not show until the Form_Load event is complete. To show it earlier in the Form_Load event, place Me.Show in the Form_Load event at the location where you want the form to be displayed.
 
Share this answer
 
v4
Comments
[no name] 29-Sep-13 9:25am    
please see my other comment

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900