键盘上的printscreen,按一下,屏幕就在剪贴板里了,在新建一个画图粘下来就可以了,你是要这个吗?

解决方案 »

  1.   

    这是一段例子,在form1上加一个picture1Private Declare Function GetDesktopWindow Lib "user32" () 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 Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
    Const SRCCOPY = &HCC0020Private Sub Form_Load()
    Form1.WindowState = 2
    Form1.BorderStyle = 0
    Form1.Left = 0
    Form1.Top = 0
    Form1.Width = Screen.Width
    Form1.Height = Screen.Height
    screenhwnd = GetDesktopWindow()
    screendc = GetDC(screenhwnd)
    rc = BitBlt(Form1.hDC, 0, 0, Form1.ScaleWidth, Form1.ScaleHeight, screendc, 0, 0, SRCCOPY)SavePicture Form1.Image,"C:\1.bmp"'存成bmpEnd Sub
      

  2.   

    一只菜鸟,你可真菜
    我要的是用代码.
    monkey说得对
      

  3.   

    啊明白了,看来,dc还是有用的
    其实,把"Form1.hDC"换成"Picture1.hDC"也可以