好好学习,天天向上吧,我只是修改了下if 的逻辑,你本身的其他逻辑也有问题,自己继续改吧,别什么都靠别人
Dim n As Integer
n = GetConfigValue("试用次数",0) '假定保存试用次数的设置名称为Count
Dim Result As DialogResult = messagebox.show("你的剩余试用次数为:" & 15-n & "次! 继续试用吗?","提示",MessageBoxButtons.YesNo,MessageBoxIcon.Question)
If Result = DialogResult.Yes Then
MessageBox.Show("您选择了继续试用.","提示")
If n > 15 Then
Messagebox.Show("您正在使用的产品已经超出试用次数,如需继续使用,请与开发者联系!")
Syscmd.Project.Exit()
Else
n = n + 1
SaveConfigValue("试用次数",n)
End If
Else
MessageBox.Show("您选择了不继续,单击确定退出!","提示",MessageBoxButtons.OK)
End If
[此贴子已经被作者于2015/3/16 16:38:52编辑过]