注释:form上有Command1,command2两个Button并事先设定form之BorderStyle=0
OptionExplicit
PrivateDeclareFunctionGetWindowLongLib"user32"Alias"GetWindowLongA"(ByValhwndAsLong,ByValnIndexAsLong)AsLong
PrivateDeclareFunctionSetWindowLongLib"user32"Alias"SetWindowLongA"(ByValhwndAsLong,ByValnIndexAsLong,ByValdwNewLongAsLong)AsLong
ConstGWL_EXSTYLE=(-20)
ConstWS_EX_TRANSPARENT=&H20&
PrivatePreValueAsLong
PrivateSubCommand2_Click()注释:还原变成不透明
CallSetWindowLong(Me.hwnd,GWL_EXSTYLE,PreValue)
Me.Hide
Me.Show