B
barryal
Guest
I get the following (see picture below)when I run my app.
The app is a TTS app used to listen to prepared text so authors can hear typos, Contunity, etc. I am a would be author who has the misfortune of thinking faster than I type.
This app starts of by checking the registry for its values.
Having found none it will create the necessary registry entries.
having found the required registry values does the following
1. Displays a main menu where user can run the processes needed.
Key notes:
Ret_cde is the return code and is being used to determine which the getvalue failed (doesnt exist) so that the appropriate setvalue (1, 2, or 3) can be run (by the module vblgrtns1). It is defined as ret_cde as single=nothing. It is reset to 1 of the first getvalue fails, 2 if the second fails and 3 if the third fails. If none fail, all the values exist and ret_cde is set to zero (all values are present in hkey_current_user\Software\vbleditr).
What is happening is the main module-vbleditr is failing with this error almost as soon as it starts. It executes the first getvalue, which in this instance doesnt exist.
Ive run this successfully this module over a dozen times while I built out the rest of the app. The entire app has be running successfully for the last week. The problem began yesterday when I inadvertently deleted or changed something. I have no backup because I no longer have source safe. I thought of adding the code for get_new_values in the vblgrtns1 routine but the app doesnt get to there if anything in this main module fails.
What I dont understand is why this is happening. Can any one help? Please! the actual code is:
Imports System
Imports System.IO
Imports System.Speech.Synthesis
Imports System.Speech.Synthesis.SpeechSynthesizer
Imports System.IO.FileStream
Public Class vbleditr
Private Sub vbleditr_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Dim sourceValue As Object = Nothing
sourceValue = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\SOFTWARE\vbeditr", "Source", Nothing)
MsgBox("The value is " & CStr(sourceValue))
Select sourceValue
Case Is = Nothing
ret_cde = 1 ------------------------------ This is where I get the error.
get_new_values()
End Select
Dim targetValue As Object = Nothing
targetValue = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\SOFTWARE\vbeditr", "Source", Nothing)
MsgBox("The value is " & CStr(targetValue))
Select Case targetValue
Case Is = Nothing
ret_cde = 2
get_new_values()
End Select
Dim voicevalue As Object = Nothing
voicevalue = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\SOFTWARE\vbeditr", "Source", Nothing)
MsgBox("The value is " & CStr(voicevalue))
Select Case voicevalue
Case Is = Nothing
ret_cde = 1
get_new_values()
End Select
Select Case ret_cde
Case Is = 0
GoTo CONTINUE_ON
End Select
CONTINUE_ON:
End Sub
Continue reading...
The app is a TTS app used to listen to prepared text so authors can hear typos, Contunity, etc. I am a would be author who has the misfortune of thinking faster than I type.
This app starts of by checking the registry for its values.
Having found none it will create the necessary registry entries.
having found the required registry values does the following
1. Displays a main menu where user can run the processes needed.
Key notes:
Ret_cde is the return code and is being used to determine which the getvalue failed (doesnt exist) so that the appropriate setvalue (1, 2, or 3) can be run (by the module vblgrtns1). It is defined as ret_cde as single=nothing. It is reset to 1 of the first getvalue fails, 2 if the second fails and 3 if the third fails. If none fail, all the values exist and ret_cde is set to zero (all values are present in hkey_current_user\Software\vbleditr).
What is happening is the main module-vbleditr is failing with this error almost as soon as it starts. It executes the first getvalue, which in this instance doesnt exist.
Ive run this successfully this module over a dozen times while I built out the rest of the app. The entire app has be running successfully for the last week. The problem began yesterday when I inadvertently deleted or changed something. I have no backup because I no longer have source safe. I thought of adding the code for get_new_values in the vblgrtns1 routine but the app doesnt get to there if anything in this main module fails.
What I dont understand is why this is happening. Can any one help? Please! the actual code is:
Imports System
Imports System.IO
Imports System.Speech.Synthesis
Imports System.Speech.Synthesis.SpeechSynthesizer
Imports System.IO.FileStream
Public Class vbleditr
Private Sub vbleditr_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Dim sourceValue As Object = Nothing
sourceValue = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\SOFTWARE\vbeditr", "Source", Nothing)
MsgBox("The value is " & CStr(sourceValue))
Select sourceValue
Case Is = Nothing
ret_cde = 1 ------------------------------ This is where I get the error.
get_new_values()
End Select
Dim targetValue As Object = Nothing
targetValue = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\SOFTWARE\vbeditr", "Source", Nothing)
MsgBox("The value is " & CStr(targetValue))
Select Case targetValue
Case Is = Nothing
ret_cde = 2
get_new_values()
End Select
Dim voicevalue As Object = Nothing
voicevalue = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\SOFTWARE\vbeditr", "Source", Nothing)
MsgBox("The value is " & CStr(voicevalue))
Select Case voicevalue
Case Is = Nothing
ret_cde = 1
get_new_values()
End Select
Select Case ret_cde
Case Is = 0
GoTo CONTINUE_ON
End Select
CONTINUE_ON:
End Sub

Continue reading...