你看看你的MediaPlayer(我指windows自带的播放器程序),有截图功能吗?
当然,没有,如果该控件有这种方法,那么MSDN应该说了。所以,你不用在控件上想办法了。
不过在C里面可以。呵呵

解决方案 »

  1.   

    MediaPlayer好象不能截图,如果能的话请赐教.
      

  2.   

    eithur(阿恺) 在C里有,你就说出来啊。
      

  3.   

    给你一个函数,看懂了就行#If Win32 ThenPublic Function CaptureWindow(ByVal hWndSrc As Long, _
        ByVal Client As Boolean, ByVal LeftSrc As Long, _
        ByVal TopSrc As Long, ByVal WidthSrc As Long, _
        ByVal HeightSrc As Long) As PictureDim hDCMemory As LongDim hBmp As LongDim hBmpPrev As LongDim r As LongDim hDCSrc As LongDim hPal As LongDim hPalPrev As LongDim RasterCapsScrn As LongDim HasPaletteScrn As LongDim PaletteSizeScrn As Long#ElseIf Win16 ThenPublic Function CaptureWindow(ByVal hWndSrc As Integer, _
        ByVal Client As Boolean, ByVal LeftSrc As Integer, _
        ByVal TopSrc As Integer, ByVal WidthSrc As Long, _
        ByVal HeightSrc As Long) As PictureDim hDCMemory As IntegerDim hBmp As IntegerDim hBmpPrev As IntegerDim r As IntegerDim hDCSrc As IntegerDim hPal As IntegerDim hPalPrev As IntegerDim RasterCapsScrn As IntegerDim HasPaletteScrn As IntegerDim PaletteSizeScrn As Integer#End IfDim LogPal As LOGPALETTE' Depending on the value of Client get the proper device contextIf Client ThenhDCSrc = GetDC(hWndSrc) ' Get device context for Client areaElsehDCSrc = GetWindowDC(hWndSrc) ' Get device context for entire windowEnd If' Create a memory device context for the copy processhDCMemory = CreateCompatibleDC(hDCSrc)' Create a bitmap and place it in the memory DChBmp = CreateCompatibleBitmap(hDCSrc, WidthSrc, HeightSrc)hBmpPrev = SelectObject(hDCMemory, hBmp)' Get screen propertiesRasterCapsScrn = GetDeviceCaps(hDCSrc, RASTERCAPS) 'Raster capabilitiesHasPaletteScrn = RasterCapsScrn And RC_PALETTE 'Palette supportPaletteSizeScrn = GetDeviceCaps(hDCSrc, SIZEPALETTE) 'Size of palette' If the screen has a palette make a copy and realize itIf HasPaletteScrn And (PaletteSizeScrn = 256) Then' Create a copy of the system paletteLogPal.palVersion = &H300LogPal.palNumEntries = 256r = GetSystemPaletteEntries(hDCSrc, 0, 256, LogPal.palPalEntry(0))hPal = CreatePalette(LogPal)' Select the new palette into the memory DC and realize ithPalPrev = SelectPalette(hDCMemory, hPal, 0)r = RealizePalette(hDCMemory)End If' Copy the on-screen image into the memory DCr = BitBlt(hDCMemory, 0, 0, WidthSrc, HeightSrc, hDCSrc, _
        LeftSrc, TopSrc, vbSrcCopy)' Remove the new copy of the the on-screen imagehBmp = SelectObject(hDCMemory, hBmpPrev)' If the screen has a palette get back the palette that was selected' in previouslyIf HasPaletteScrn And (PaletteSizeScrn = 256) ThenhPal = SelectPalette(hDCMemory, hPalPrev, 0)End If' Release the device context resources back to the systemr = DeleteDC(hDCMemory)r = ReleaseDC(hWndSrc, hDCSrc)' Call CreateBitmapPicture to create a picture object from the bitmap' and palette handles. Then return the resulting picture object.Set CaptureWindow = CreateBitmapPicture(hBmp, hPal)End Function