Results 1 to 4 of 4

Thread: Closing problem form

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2007
    Posts
    5

    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.

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,104

    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

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2007
    Posts
    5

    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?

  4. #4
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    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
  •  



Click Here to Expand Forum to Full Width