谁能告诉我这个挂机的代码?
答案:1 悬赏:60 手机版
解决时间 2021-05-17 06:09
- 提问者网友:龅牙恐龙妹
- 2021-05-17 01:33
就是那个花
最佳答案
- 五星知识达人网友:掌灯师
- 2021-05-17 01:42
1.建立一个新项目,将其命名为DEMO3.vbp。 2.在Form1窗体的声明中加入以下代码:Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByRef lpvParam As Any, ByVal fuWinIni As Long) As LongConst SPI_SCREENSAVERRUNNING = 97 3. 在Form1窗口的Command1_Click中加入以下代码:Private Sub Command1_Click()Dim r As IntegerDim p As BooleanIf Command1.Caption = "屏蔽" Thenr = SystemParametersInfo(SPI_SCREENSAVERRUNNING, True, p, 0)Command1.Caption = "有效"Elser = SystemParametersInfo(SPI_SCREENSAVERRUNNING, False, p, 0)Command1.Caption = "屏蔽"End IfEnd Sub 4. 在Form1窗体的Form_Unload中加入以下代码:Form1_Unload()Dim r As IntegerDim p As Booleanr = SystemParametersInfo(SPI_SCREENSAVERRUNNING, False, p, 0)
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯