Last post Dec 04, 2008 06:09 AM by srikanthsundaram
Dec 04, 2008 02:31 AM|Geetha Naidu C. P.|LINK
I am working on windows CE 5.0 device application. Let me explain you what i am trying to achieve in this.
I have two forms in this project, now i need to close first form when a button click event occurs at the same time load the other form.
Can anybody help me in resolving this issue.
Dec 04, 2008 03:43 AM|srikanthsundaram|LINK
all you have to do is, in the button click event hide the first form and display the form you want to show. the code is given below
private void Button_Click(object sender, EventArgs e)
Hope this helps you out... Pls let me know if it works or not... Happy coding...
Dec 04, 2008 04:02 AM|Geetha Naidu C. P.|LINK
This works fine but if i try to close the first form the application will be stopped. Is there any way where in i can close the exsiting one and load the new form.
Thanks and Regards,
Dec 04, 2008 05:09 AM|srikanthsundaram|LINK
1) Dont use the Form.Close() method which is available.. Use Hide() method..
2) Check if you've written Application.Exit() anywhere in you button_click() method... If you've written that, just comment it or erase it...
3) If you still dont find the solution just post the code... I'll look at it and try to tell you....
Dec 04, 2008 05:27 AM|Geetha Naidu C. P.|LINK
Thanks for your help srikanth. Right now i am working with Hide and Show method of the form control. I just wanted to know whether form.close() and form.load() method will help me in achieving it. Anyways thanksfor it again
Dec 04, 2008 06:09 AM|srikanthsundaram|LINK
Just try giving form.load("formname") as a parameter... That one thing I know abt the load() method... I've not worked much with close() and load() methods... thnx for asking... Have a nice day...