M
m.bonelli
Guest
Hello to everybody.
I am not a skilled programmer, but I use VB.net when I develop the SW for the test of company hardware boards.
Generally I find replies and solutions from the internet community at my problems met during the drafting of the code.
This time is different, the SW works fine on the most of computers but when I tried to run it on a couple of different Lenovo notebooks the program stops at the run time with the message "cannot execute the program". Also my laptop is Lenovo and it works fine.
All the pc have Windows 7 installed and at least .NET Framework 4.6.1. The pre-requisite is .NET Framework 4.6
The VB instruction line where the SW stops is a stupid simple assignment...
The variable is declared in a module and it is global
Public bIsBatTest as Boolean = False 'assignment would not be necessary, False is the default value
Then the code is:
Private Sub rdBtn1_CheckedChanged(sender As Object, e As EventArgs) Handles rdBtn1.CheckedChanged
grpCHG.Visible = False
grpDATA.Visible = False
rdBtn1.Font = New Font(rdBtn1.Font, FontStyle.Bold)
rdBtn2.Font = New Font(rdBtn2.Font, FontStyle.Regular)
bIsBatTest = False 'this is the instruction where SW stops at runtime
cmdNEW.Text = My.Resources.sNEWBRD
End Sub
To be sure I have put MsgBox just before and after: the msg before is shown, then the program stops.
If I comment the line, SW runs until next assignment bIsBatTest = .....
What's wrong in the code or, like I guess, in the 2 pc where the issue appears?
Thanks a lot for any help
Maurizio
Continue reading...
I am not a skilled programmer, but I use VB.net when I develop the SW for the test of company hardware boards.
Generally I find replies and solutions from the internet community at my problems met during the drafting of the code.
This time is different, the SW works fine on the most of computers but when I tried to run it on a couple of different Lenovo notebooks the program stops at the run time with the message "cannot execute the program". Also my laptop is Lenovo and it works fine.
All the pc have Windows 7 installed and at least .NET Framework 4.6.1. The pre-requisite is .NET Framework 4.6
The VB instruction line where the SW stops is a stupid simple assignment...
The variable is declared in a module and it is global
Public bIsBatTest as Boolean = False 'assignment would not be necessary, False is the default value
Then the code is:
Private Sub rdBtn1_CheckedChanged(sender As Object, e As EventArgs) Handles rdBtn1.CheckedChanged
grpCHG.Visible = False
grpDATA.Visible = False
rdBtn1.Font = New Font(rdBtn1.Font, FontStyle.Bold)
rdBtn2.Font = New Font(rdBtn2.Font, FontStyle.Regular)
bIsBatTest = False 'this is the instruction where SW stops at runtime
cmdNEW.Text = My.Resources.sNEWBRD
End Sub
To be sure I have put MsgBox just before and after: the msg before is shown, then the program stops.
If I comment the line, SW runs until next assignment bIsBatTest = .....
What's wrong in the code or, like I guess, in the 2 pc where the issue appears?
Thanks a lot for any help
Maurizio
Continue reading...