2020年5月19日 星期二

vb.net REG試用版功能 [Beta system Demo]


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
    Private Sub Demo()

        If blnChk = False Then

            Dim regKey As RegistryKey

            regKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\\SmallGCOk", True)

            Dim strKey As String = regKey.GetValue("AADate")

            If strKey = "" Then

                regKey.SetValue("AADate", Date.Today.ToString("yyyy/MM/dd"))

            Else

                Dim dteTemp As Date

                Try


                    dteTemp = Date.Parse(strKey)


                    If (dteTemp.DayOfYear + 30) < Date.Today.DayOfYear Then

                        msgerr("30天的試用期已過,請聯絡SmallGCOk,購買正版")

                    End If

                Catch ex As Exception


                End Try

            End If

        End If


    End Sub

沒有留言:

張貼留言