|
-
Mar 13th, 2007, 11:47 AM
#1
Thread Starter
New Member
Closing problem form
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.
-
Mar 13th, 2007, 07:48 PM
#2
Re: Closing problem form
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?
My usual boring signature: Nothing
 
-
Mar 14th, 2007, 03:39 AM
#3
Thread Starter
New Member
Re: Closing problem form
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?
-
Mar 14th, 2007, 09:08 AM
#4
Frenzied Member
Re: Closing problem form
Try taking out the 'If apriform Is Nothing Then '
Pete
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|