想利用VB编程实现屏幕变暗的效果(像关闭Win95时的效果),只要按下面的步骤来做:
1.在Form1中加入两个CommandButton和一个PictureBox.
2.在Form1的代码窗口中添加以下代码:
PrivateTypeRECT
LeftAsLong
TopAsLong
RightAsLong
BottomAsLong
EndType
PrivateDeclareFunctionGetDCLib"user32"(ByValhwndAsLong)AsLong
PrivateDeclareFunctionReleaseDCLib"user32"(ByValhwndAsLong,ByValhdcAsLong)AsLong
PrivateDeclareFunctionCreatePatternBrushLib"gdi32"(ByValhBitmapAsLong)AsLong
PrivateDeclareFunctionPatBltLib"gdi32"(ByValhdcAsLong,ByValxAsLong,ByValyAsLong,ByValnWidthAsLo...[ 查看全文 ]