- 'décarations API
- Private Declare Function GetDesktopWindow Lib "user32" () As Long
- Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
- Private Declare Function StretchBlt Lib "gdi32" _
- (ByVal hdc As Long, _
- ByVal x As Long, _
- ByVal y As Long, _
- ByVal nWidth As Long, _
- ByVal nHeight As Long, _
- ByVal hSrcDC As Long, _
- ByVal xSrc As Long, _
- ByVal ySrc As Long, _
- ByVal nSrcWidth As Long, _
- ByVal nSrcHeight As Long, _
- ByVal dwRop As Long) As Long
-
-
- Private Sub Form_Load()
- Form1.AutoRedraw = True
- Form1.ScaleMode = vbPixels
- a = GetDesktopWindow()
- b = GetDC(a)
- StretchBlt Form1.hdc, 0, 0, Screen.Width, Screen.Height, b, 0, _
- Screen.Height, Screen.Width, -Screen.Height, vbSrcCopy
- End Sub
'décarations API
Private Declare Function GetDesktopWindow Lib "user32" () As Long
Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function StretchBlt Lib "gdi32" _
(ByVal hdc As Long, _
ByVal x As Long, _
ByVal y As Long, _
ByVal nWidth As Long, _
ByVal nHeight As Long, _
ByVal hSrcDC As Long, _
ByVal xSrc As Long, _
ByVal ySrc As Long, _
ByVal nSrcWidth As Long, _
ByVal nSrcHeight As Long, _
ByVal dwRop As Long) As Long
Private Sub Form_Load()
Form1.AutoRedraw = True
Form1.ScaleMode = vbPixels
a = GetDesktopWindow()
b = GetDC(a)
StretchBlt Form1.hdc, 0, 0, Screen.Width, Screen.Height, b, 0, _
Screen.Height, Screen.Width, -Screen.Height, vbSrcCopy
End Sub