vb 恶搞小程序源码
这是个恶搞小程序(注意:不了解代码含义的禁止下载)'为指定窗口设置一个新父窗口
Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
'获得活动窗口句柄
Private Declare Function GetForegroundWindow Lib "user32" () As Long
Private WithEvents Timer1 As Timer '声明一个Timer
Private Sub Form_Load()
Set Timer1 = Me.Controls.Add("VB.Timer", "Timer1")
Timer1.Enabled = True
Timer1.Interval = 10
Me.Hide
End Sub
Private Sub Timer1_Timer()
SetParent GetForegroundWindow, Me.hWnd '实际上这代码就是打印您的当前窗口,只是在当时的操作系统,估计卡死
End Sub
页:
[1]