I solved my issue , So i want to share the solution here with you . May it helps someone ...
The rearrange of (CreateReg(), SetReg1(), SetReg3() then GetReg1() ) really it didn't fix the problem,
Because in SetReg1() i set the reg value to ("2020-03-01")for the first time only (after my app. open, i go to my admin panel to set the reg date to "2021-03-01") and when i close my app. and open it again, It returns to the same date ("2020-03-01"). Here is the problem and fixed it by made some another modification to my code like this
Private Sub LoginForm19_Load(sender As Object, e As EventArgs) Handles MyBase.Load
CreateReg()
SetReg3()
If Label7.Text > 0 Then
GetReg1()
Else
SetReg1()
End If
End Sub
Sub SetReg3()
NewSubKey3 = Registry.CurrentUser.OpenSubKey( "SOFTWARE\\Microsoft\\SQTClient\\SQLV2017\\Microsoft\\SQLServerAgent\\ClientsProtocol\\SharedMemory", True)
If NewSubKey3 IsNot Nothing Then
Label7.Text = NewSubKey3.GetValue("Version", 0)
Label7.Text += 1
NewSubKey3.SetValue("Version", Val(Label7.Text))
NewSubKey3.Close()
End If
End Sub
And i made SetReg3() also in the Form1_Load to insure that the number that will appear to the label7.text is larger than 1 .
Finally this strategy solved my issue ........................