Click to See Complete Forum and Search --> : Closing problem form
vgsoft2004
Mar 13th, 2007, 11:47 AM
Hello.
I open a form using the code on pocket HP rx1950 window mobile 5
visual basic. net 2003
Dim apriform As form1
If apriform Is Nothing Then apriform = New form1
apriform.ShowDialog()
apriform.Dispose()
apriform = Nothing
Sometimes, in the moment in which I try to close form the open, the pocketpc crash total,
visualizing the form in closing to half and the form main to half.
Someone knows like resolving the problem? Thank you.
Shaggy Hiker
Mar 13th, 2007, 07:48 PM
What is happening when you dispose the form? Is there any code running? Is the crash happening when you are in Debug mode such that you can step through the code and figure out which line it is occuring on?
Also, you say that this "sometimes" happens. That could prove to be a tough problem to diagnose. Have you been able to figure out under which circumstances this happens? Perhaps you had done a certain sequence of events, or it only happens if you have been running thr prog for a looong time, or some such?
vgsoft2004
Mar 14th, 2007, 03:39 AM
It is a software that it transmits given with the control winsock to a software on PC. The transmission works always good.
When the pda it receives a particular data, active the code of opening of the form1.
This code is into form main:
Dim apriform As form1
If apriform Is Nothing Then apriform = New form1
apriform.ShowDialog()
apriform.Dispose()
apriform = Nothing
In the form1 they are recorded given tightens in text cases and listbox.
When the form1 is closed with key OK, it is returned to the code of the form main ............
apriform.ShowDialog()
apriform.Dispose()
apriform = Nothing
....
Now there is the code transmitting
After the closing transmitting to the PC the new data
The problem is:
"apriform=nothing" that it would not have to be used after me.dispose?
petevick
Mar 14th, 2007, 09:08 AM
Try taking out the 'If apriform Is Nothing Then '
Pete
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.