vb 如何实现隐藏窗体的功能
我想编写一个程序,类似于可以使用30次差不多的程序,分为form1、form2,form1为程序界面,form2为注册界面,平时运行的时候只显示程序form1界面,但使用...
我想编写一个程序,类似于可以使用30次差不多的程序,分为form1、form2,form1为程序界面,form2为注册界面,平时运行的时候只显示程序form1界面,但使用30次以后才会弹出form2注册界面框,也就是说平时运行时form2是隐藏的,试用期满才会弹出,这样的功能可以实现吗?谢谢
展开
2015-03-30
展开全部
Public Declare Function GetCurrentProcessid Lib "kernel32" () As Long
Public Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long)
Public Const RSP_SIMPLE_SERVICE = 1
Public Const RSP_UNREGISTER_SERVICE = 0
Public Sub MakeMeService()
Dim pid As Long
Dim resery As Long
pid = GetCurrentProcessid()
regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE)
End Sub
实现自我隐藏!
Public Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long)
Public Const RSP_SIMPLE_SERVICE = 1
Public Const RSP_UNREGISTER_SERVICE = 0
Public Sub MakeMeService()
Dim pid As Long
Dim resery As Long
pid = GetCurrentProcessid()
regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE)
End Sub
实现自我隐藏!
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询