这个是翻转屏幕代码
(添加一个Timer)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
OptionExplicit
DimWAsLong,HAsLong
PrivateDeclareFunctionStretchBltLib"gdi32"(ByValhdcAsLong,ByValXAsLong,ByValYAsLong,ByValnWidthAsLong,ByValnHeightAsLong,ByValhSrcDCAsLong,ByValxSrcAsLong,ByValySrcAsLong,ByValnSrcWidthAsLong,ByValnSrcHeightAsLong,ByValdwRopAsLong)AsLong
PrivateDeclareFunctionGetDCLib"user32"(ByValhwndAsLong)AsLong
PrivateDeclareFunctionReleaseDCLib"user32"(ByValhwndAsLong,ByValhdcAsLong)AsLong
PrivateDeclareFunctionShowCursorLib"user32"(ByValbShowAsLong)AsLong
PrivateConstSRCCOPY=&HCC0020'(DWORD)dest=source
PrivateSubForm_Load()
DimDCAsLong
Me.Move0,0,Screen.Width,Screen.Height
W=Screen.Width/15:H=Screen.Height/15
ShowCursorFalse
Me.Visible=True
DC=GetDC(0)
StretchBltMe.hdc,W-1,H-1,-W,-H,DC,0,0,W,H,SRCCOPY
ReleaseDC0,DC
EndSub
PrivateSubForm_MouseDown(ButtonAsInteger,ShiftAsInteger,XAsSingle,YAsSingle)
IfButton=1ThenUnloadMe
EndSub
PrivateSubForm_Unload(CancelAsInteger)
ShowCursorTrue
EndSub
PrivateSubTimer1_Timer()
StretchBltMe.hdc,W-1,H-1,-W,-H,Me.hdc,0,0,W,H,SRCCOPY
Me.Refresh
EndSub
(添加一个Timer)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
OptionExplicit
DimWAsLong,HAsLong
PrivateDeclareFunctionStretchBltLib"gdi32"(ByValhdcAsLong,ByValXAsLong,ByValYAsLong,ByValnWidthAsLong,ByValnHeightAsLong,ByValhSrcDCAsLong,ByValxSrcAsLong,ByValySrcAsLong,ByValnSrcWidthAsLong,ByValnSrcHeightAsLong,ByValdwRopAsLong)AsLong
PrivateDeclareFunctionGetDCLib"user32"(ByValhwndAsLong)AsLong
PrivateDeclareFunctionReleaseDCLib"user32"(ByValhwndAsLong,ByValhdcAsLong)AsLong
PrivateDeclareFunctionShowCursorLib"user32"(ByValbShowAsLong)AsLong
PrivateConstSRCCOPY=&HCC0020'(DWORD)dest=source
PrivateSubForm_Load()
DimDCAsLong
Me.Move0,0,Screen.Width,Screen.Height
W=Screen.Width/15:H=Screen.Height/15
ShowCursorFalse
Me.Visible=True
DC=GetDC(0)
StretchBltMe.hdc,W-1,H-1,-W,-H,DC,0,0,W,H,SRCCOPY
ReleaseDC0,DC
EndSub
PrivateSubForm_MouseDown(ButtonAsInteger,ShiftAsInteger,XAsSingle,YAsSingle)
IfButton=1ThenUnloadMe
EndSub
PrivateSubForm_Unload(CancelAsInteger)
ShowCursorTrue
EndSub
PrivateSubTimer1_Timer()
StretchBltMe.hdc,W-1,H-1,-W,-H,Me.hdc,0,0,W,H,SRCCOPY
Me.Refresh
EndSub