From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

My software is not closing (freezing at screen)

I am struggling with a problem tha happens with only specific computers (i don't know the rule). When the user try to close the software it doesn't close and it still freezes at screen. The user have to close it by the task manager. Impressively, like a magic, when the folder name of the software is changed the problem stops, but when the computer is restarted its happens again. With the code below, i can reproduce the problem on one of the computeres where it happens.

 

Public Class Form1

    Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As FormClosingEventArgs) Handles Me.FormClosing
        End
    End Sub

    Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim Lst() As String = DaqSystem.Local.Devices
    End Sub
End Class

 

Using Visual Studio 2010 and NI-DAQmx 16.0.0

0 Kudos
Message 1 of 3
(2,197 Views)

Ok, let me check if I understood.

 

This code session above is the part of your code you've identified as root cause of the freezing, right? 

 

Then how have you found it out? 

 

Sorry, I'm not proficiency in VB and I did not understand the usage of the first "end" after Handles Me.FormClosing. From my understanding the next End sub should be the closing syntax word, isn't it?

 

Public Class Form1

    Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As FormClosingEventArgs) Handles Me.FormClosing
        End
    End Sub

    Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim Lst() As String = DaqSystem.Local.Devices
    End Sub
End Class

 

Plínio Costa
Senior Techinical Support Engineer
National Instruments Brazil



0 Kudos
Message 2 of 3
(2,162 Views)

This is the full code. I created another empty project and add this code. I suppose that is a behavior of my Operational System and not an error of NI-Daq.

 

The END is one attempt to forces software to close. 

0 Kudos
Message 3 of 3
(2,155 Views)