Results 1 to 5 of 5

Thread: [RESOLVED] Form hangs under Vista 64 bits

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2009
    Posts
    73

    Resolved [RESOLVED] Form hangs under Vista 64 bits

    Hi:

    I have detected a problem running my application under Vista 64 bits OS.

    My application is developed using VB.NT 2008 and compiled as x86

    I have a main form. In this form there is an option to open other form. TThis second form must return a few values to the main form. When the user click on this 2nd form, to return values, this form hangs up (2nd form hangs up)

    But for what I could have known, it continues executing the rest of code that exists after to open form. I want to say that the form dialog (2nd form) is not closed (hangs up) but it the code continues being executed, because I have seen that inserts the data in the database.

    The application not returns any error and any exception.

    frmWaiting (form displayed when call thread)

    Code:
    This forms contains progressbar
    main form
    Code:
     Dim ThreadVentas As System.Threading.Thread
    
     Private Sub ClosePb()
            Try
                If Me.InvokeRequired Then
                    Me.Invoke(New ClosePbDelegate(AddressOf ClosePb))
                Else
                    If Not frmPb Is Nothing Then
                        frmPb.Close()
                        frmPb = Nothing
                    End If
                    Me.loadData(condicio, condicio2)
                End If
            Catch ex As Exception
    
            End Try
        End Sub
    
    Private Sub btGenDocVtas_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs)
           Try
                ThreadVentas = New System.Threading.Thread(AddressOf savedata)
                ThreadVentas.Start()
                frmPb = New frmWaiting
                frmPb.ShowDialog()
                Me.cmbBase.Focus()
            Catch ex As Exception
                gSaveError(Me.Name, ex.ToString)
            End Try
        End Sub
    
    private sub SaveData()
    
     Dim f As New frmxxxx
        Try
          If f.ShowDialog = Windows.Forms.DialogResult.OK Then
            serie = f.f_serie
            doc = f.fdoc      
          Else
            If Not f Is Nothing Then
              f.Dispose()
              f = Nothing
            End If
            Exit Sub
          End If
        Catch ex As Exception    
          gSaveError(Me.Name, ex.ToString)
        Finally
          If Not f Is Nothing Then
            f.Dispose()
            f = Nothing
          End If
        End Try
    'From here there are code to insert data in the database
    ......
    .....
    
    End Sub
    frmXXXX (2nd form)

    Code:
    Dim dtseries As DataTable
    -------
    
      Public ReadOnly Property fserie() As String
        Get
          Return Me.cmbDocVtas.SelectedItem
        End Get
      End Property
      Public ReadOnly Property fdoc() As Boolean
        Get
          Return Me.chkAp.Checked
        End Get
      End Property
    
    
    Private Sub frmXXXX_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
     Me.dtseries = Nothing
    End Sub
    
    Private Sub btOk_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btOk.Click
       Me.DialogResult = DialogResult.OK
    End Sub



    There is something that and it works differently in systems of 64 bits? There is incorrect code? on other computers it works well,


    Regards
    Last edited by yaeko; Jul 9th, 2010 at 04:09 AM.

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