AfterOpenProject 代码内容如下:
Dim n As Integer = Registry.GetValue("HKEY_CURRENT_USER\Software\MyApp","Count",0)
Dim Code As String = Registry.GetValue("HKEY_CURRENT_USER\Software\MyApp","Register" & ComputerId,"")
Dim Ok As Boolean = False
Vars("内外网") = User.ExtendedValues("登陆方式")
baseMainform.MinimizeBox = True
If Code > "" AndAlso DecryptText(Code,"yang139264","139264yang") = ComputerId Then
Registry.SetValue("HKEY_CURRENT_USER\Software\MyApp","Count",n+1)
Forms("登陆").Open()
InitNotifyIcon()
Else
If n > 350 And n <= 380 Then
Forms("注册窗口").Open()
Else If n > 380 Then
Messagebox.Show("您正在使用的产品已经超出试用次数!")
Syscmd.Project.Exit(False)
Else
Registry.SetValue("HKEY_CURRENT_USER\Software\MyApp","Count",n+1)
Forms("登陆").Open()
InitNotifyIcon()
End If
End If
BaseMainform.IsMdiContainer = True
baseMainform.FormBorderStyle = Windows.Forms.FormBorderStyle.FixedDialog '项目固定大小,不可调整

此主题相关图片如下:snap 2014-08-06 17.45.23.jpg