截取屏幕图像 
Private Declare Function CreateCompatibleBitmap Lib "gdi32" (ByVal hdc As Long, ByVal nWidth As Long, ByVal nHeight As Long) As Long 
Private Declare Function SelectObject Lib "gdi32" (ByVal hdc As Long, ByVal hObject As Long) As Long Private Sub Form_Load() 
Dim hBitmap As Integer 
Me.AutoRedraw = True 
hBitmap = CreateCompatibleBitmap(Me.hdc, 0, 0) 
SelectObject Me.hdc, hBitmap 
End Sub 

解决方案 »

  1.   

    我有,
    要的话,跟我联系
    [email protected]
      

  2.   

    Private Declare Function GetWindowDC Lib "user32" (ByVal hwnd As Long) As Long
    Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC 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 dwRop As Long) As Long
    Private Const SRCCOPY = &HCC0020Private Sub Command1_Click()
        Form1.Hide
        DoEvents
        BitBlt Form1.hDC, 0, 0, Screen.Width / Screen.TwipsPerPixelX, Screen.Height / Screen.TwipsPerPixelY, GetWindowDC(0), 0, 0, SRCCOPY
        SavePicture Form1.Image, "c:\abc.bmp"
        Form1.Cls
        Form1.Show
    End SubPrivate Sub Command2_Click()
        Unload Me
    End Sub