DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 13 of 13

Thread: Save Screen Capture to a file

  1. #1
    Jones Guest

    Save Screen Capture to a file


    So if below is my screen capture procedure , then how should I code the SavePicture
    statement in order to save it into a file ?

    Public Sub MyCapture(ByVal mode%)
    Dim IsWindows98%
    Dim altscan%
    Dim dl&
    Dim snapparam%
    altscan% = MapVirtualKey(VK_MENU, 0)

    Screen.MousePointer = vbHourglass
    If mode Then
    keybd_event VK_MENU, altscan, 0, 0
    ' It seems necessary to let this key get processed before
    ' taking the snapshot.
    End If

    ' Why does this work? Who knows!
    If mode = 0 And IsWindows98 Then snapparam = 1

    DoEvents ' These seem necessary to make it reliable

    ' Take the snapshot
    keybd_event VK_SNAPSHOT, snapparam, 0, 0

    DoEvents


    ' If mode Then keybd_event VK_MENU, altscan, KEYEVENTF_KEYUP, 0

    'cmdCaptureAll.Enabled = True
    'cmdCaptureActive.Enabled = True
    keybd_event VK_MENU, 0, KEYEVENTF_KEYUP, 0 ' release alt
    keybd_event VK_SNAPSHOT, 0, KEYEVENTF_KEYUP, 0 ' release
    Screen.MousePointer = vbDefault

    End Sub

    ' In order to capture active screen , u just call by typing'capture 1'



  2. #2
    Randy Birch Guest

    Re: Save Screen Capture to a file


    On Local Error GoTo command_error
    Image1.Picture = Clipboard.GetData(vbCFBitmap)

    Call SavePicture(Image1, "c:\printscreentest.bmp")
    Clipboard.Clear
    On Local Error GoTo 0

    Alternatively, you could use this alternate code:

    Private Sub GrabScreen()

    Dim hWndDesk As Long
    Dim hDCDesk As Long

    Dim LeftDesk As Long
    Dim TopDesk As Long
    Dim WidthDesk As Long
    Dim HeightDesk As Long

    'setup the screen coordinates
    LeftDesk = 0
    TopDesk = 0
    WidthDesk = Screen.Width \ Screen.TwipsPerPixelX
    HeightDesk = Screen.Height \ Screen.TwipsPerPixelY

    'get the desktop handle and display context
    hWndDesk = GetDesktopWindow()
    hDCDesk = GetWindowDC(hWndDesk)

    'Copy the desktop to the pixbox hDC
    Picture1.AutoRedraw = True

    If BitBlt(Picture1.hdc, 0, 0, _
    WidthDesk, HeightDesk, _
    hDCDesk, LeftDesk, _
    TopDesk, vbSrcCopy) = 1 Then

    Picture1.AutoRedraw = False

    'copy the picture from the drawing
    'canvas to the persistent bitmap
    Picture1.Picture = Picture1.Image

    'and save
    Call SavePicture(Picture1, "c:\pstest.bmp")

    End If

    Call ReleaseDC(hWndDesk, hDCDesk)

    End Sub
    --

    Randy Birch
    MVP Visual Basic

    Take the vb.net poll at:
    http://www.mvps.org/vbnet/
    http://www.mvps.org/ccrp/



    "Jones" <eng70640@nus.edu.sg> wrote in message
    news:3a3bc660$1@news.devx.com...
    :
    : So if below is my screen capture procedure , then how should I code the
    SavePicture
    : statement in order to save it into a file ?
    :
    : Public Sub MyCapture(ByVal mode%)
    : Dim IsWindows98%
    : Dim altscan%
    : Dim dl&
    : Dim snapparam%
    : altscan% = MapVirtualKey(VK_MENU, 0)
    :
    : Screen.MousePointer = vbHourglass
    : If mode Then
    : keybd_event VK_MENU, altscan, 0, 0
    : ' It seems necessary to let this key get processed before
    : ' taking the snapshot.
    : End If
    :
    : ' Why does this work? Who knows!
    : If mode = 0 And IsWindows98 Then snapparam = 1
    :
    : DoEvents ' These seem necessary to make it reliable
    :
    : ' Take the snapshot
    : keybd_event VK_SNAPSHOT, snapparam, 0, 0
    :
    : DoEvents
    :
    :
    : ' If mode Then keybd_event VK_MENU, altscan, KEYEVENTF_KEYUP, 0
    :
    : 'cmdCaptureAll.Enabled = True
    : 'cmdCaptureActive.Enabled = True
    : keybd_event VK_MENU, 0, KEYEVENTF_KEYUP, 0 ' release alt
    : keybd_event VK_SNAPSHOT, 0, KEYEVENTF_KEYUP, 0 ' release
    : Screen.MousePointer = vbDefault
    :
    : End Sub
    :
    : ' In order to capture active screen , u just call by typing'capture 1'
    :
    :



  3. #3
    Randy Birch Guest

    Re: Save Screen Capture to a file


    On Local Error GoTo command_error
    Image1.Picture = Clipboard.GetData(vbCFBitmap)

    Call SavePicture(Image1, "c:\printscreentest.bmp")
    Clipboard.Clear
    On Local Error GoTo 0

    Alternatively, you could use this alternate code:

    Private Sub GrabScreen()

    Dim hWndDesk As Long
    Dim hDCDesk As Long

    Dim LeftDesk As Long
    Dim TopDesk As Long
    Dim WidthDesk As Long
    Dim HeightDesk As Long

    'setup the screen coordinates
    LeftDesk = 0
    TopDesk = 0
    WidthDesk = Screen.Width \ Screen.TwipsPerPixelX
    HeightDesk = Screen.Height \ Screen.TwipsPerPixelY

    'get the desktop handle and display context
    hWndDesk = GetDesktopWindow()
    hDCDesk = GetWindowDC(hWndDesk)

    'Copy the desktop to the pixbox hDC
    Picture1.AutoRedraw = True

    If BitBlt(Picture1.hdc, 0, 0, _
    WidthDesk, HeightDesk, _
    hDCDesk, LeftDesk, _
    TopDesk, vbSrcCopy) = 1 Then

    Picture1.AutoRedraw = False

    'copy the picture from the drawing
    'canvas to the persistent bitmap
    Picture1.Picture = Picture1.Image

    'and save
    Call SavePicture(Picture1, "c:\pstest.bmp")

    End If

    Call ReleaseDC(hWndDesk, hDCDesk)

    End Sub
    --

    Randy Birch
    MVP Visual Basic

    Take the vb.net poll at:
    http://www.mvps.org/vbnet/
    http://www.mvps.org/ccrp/



    "Jones" <eng70640@nus.edu.sg> wrote in message
    news:3a3bc660$1@news.devx.com...
    :
    : So if below is my screen capture procedure , then how should I code the
    SavePicture
    : statement in order to save it into a file ?
    :
    : Public Sub MyCapture(ByVal mode%)
    : Dim IsWindows98%
    : Dim altscan%
    : Dim dl&
    : Dim snapparam%
    : altscan% = MapVirtualKey(VK_MENU, 0)
    :
    : Screen.MousePointer = vbHourglass
    : If mode Then
    : keybd_event VK_MENU, altscan, 0, 0
    : ' It seems necessary to let this key get processed before
    : ' taking the snapshot.
    : End If
    :
    : ' Why does this work? Who knows!
    : If mode = 0 And IsWindows98 Then snapparam = 1
    :
    : DoEvents ' These seem necessary to make it reliable
    :
    : ' Take the snapshot
    : keybd_event VK_SNAPSHOT, snapparam, 0, 0
    :
    : DoEvents
    :
    :
    : ' If mode Then keybd_event VK_MENU, altscan, KEYEVENTF_KEYUP, 0
    :
    : 'cmdCaptureAll.Enabled = True
    : 'cmdCaptureActive.Enabled = True
    : keybd_event VK_MENU, 0, KEYEVENTF_KEYUP, 0 ' release alt
    : keybd_event VK_SNAPSHOT, 0, KEYEVENTF_KEYUP, 0 ' release
    : Screen.MousePointer = vbDefault
    :
    : End Sub
    :
    : ' In order to capture active screen , u just call by typing'capture 1'
    :
    :



  4. #4
    Jones Guest

    Re: Save Screen Capture to a file


    Does anyone know of a code which specifically captures the active window of
    the desktop ?
    "Randy Birch" <rgb@mvps.org> wrote:
    >
    > On Local Error GoTo command_error
    > Image1.Picture = Clipboard.GetData(vbCFBitmap)
    >
    > Call SavePicture(Image1, "c:\printscreentest.bmp")
    > Clipboard.Clear
    > On Local Error GoTo 0
    >
    >Alternatively, you could use this alternate code:
    >
    >Private Sub GrabScreen()
    >
    > Dim hWndDesk As Long
    > Dim hDCDesk As Long
    >
    > Dim LeftDesk As Long
    > Dim TopDesk As Long
    > Dim WidthDesk As Long
    > Dim HeightDesk As Long
    >
    > 'setup the screen coordinates
    > LeftDesk = 0
    > TopDesk = 0
    > WidthDesk = Screen.Width \ Screen.TwipsPerPixelX
    > HeightDesk = Screen.Height \ Screen.TwipsPerPixelY
    >
    > 'get the desktop handle and display context
    > hWndDesk = GetDesktopWindow()
    > hDCDesk = GetWindowDC(hWndDesk)
    >
    > 'Copy the desktop to the pixbox hDC
    > Picture1.AutoRedraw = True
    >
    > If BitBlt(Picture1.hdc, 0, 0, _
    > WidthDesk, HeightDesk, _
    > hDCDesk, LeftDesk, _
    > TopDesk, vbSrcCopy) = 1 Then
    >
    > Picture1.AutoRedraw = False
    >
    > 'copy the picture from the drawing
    > 'canvas to the persistent bitmap
    > Picture1.Picture = Picture1.Image
    >
    > 'and save
    > Call SavePicture(Picture1, "c:\pstest.bmp")
    >
    > End If
    >
    > Call ReleaseDC(hWndDesk, hDCDesk)
    >
    >End Sub
    >--
    >
    >Randy Birch
    >MVP Visual Basic
    >
    >Take the vb.net poll at:
    >http://www.mvps.org/vbnet/
    >http://www.mvps.org/ccrp/
    >
    >
    >
    >"Jones" <eng70640@nus.edu.sg> wrote in message
    >news:3a3bc660$1@news.devx.com...
    >:
    >: So if below is my screen capture procedure , then how should I code the
    >SavePicture
    >: statement in order to save it into a file ?
    >:
    >: Public Sub MyCapture(ByVal mode%)
    >: Dim IsWindows98%
    >: Dim altscan%
    >: Dim dl&
    >: Dim snapparam%
    >: altscan% = MapVirtualKey(VK_MENU, 0)
    >:
    >: Screen.MousePointer = vbHourglass
    >: If mode Then
    >: keybd_event VK_MENU, altscan, 0, 0
    >: ' It seems necessary to let this key get processed before
    >: ' taking the snapshot.
    >: End If
    >:
    >: ' Why does this work? Who knows!
    >: If mode = 0 And IsWindows98 Then snapparam = 1
    >:
    >: DoEvents ' These seem necessary to make it reliable
    >:
    >: ' Take the snapshot
    >: keybd_event VK_SNAPSHOT, snapparam, 0, 0
    >:
    >: DoEvents
    >:
    >:
    >: ' If mode Then keybd_event VK_MENU, altscan, KEYEVENTF_KEYUP, 0
    >:
    >: 'cmdCaptureAll.Enabled = True
    >: 'cmdCaptureActive.Enabled = True
    >: keybd_event VK_MENU, 0, KEYEVENTF_KEYUP, 0 ' release alt
    >: keybd_event VK_SNAPSHOT, 0, KEYEVENTF_KEYUP, 0 ' release
    >: Screen.MousePointer = vbDefault
    >:
    >: End Sub
    >:
    >: ' In order to capture active screen , u just call by typing'capture 1'
    >:
    >:
    >
    >



  5. #5
    Jones Guest

    Re: Save Screen Capture to a file


    Does anyone know of a code which specifically captures the active window of
    the desktop ?
    "Randy Birch" <rgb@mvps.org> wrote:
    >
    > On Local Error GoTo command_error
    > Image1.Picture = Clipboard.GetData(vbCFBitmap)
    >
    > Call SavePicture(Image1, "c:\printscreentest.bmp")
    > Clipboard.Clear
    > On Local Error GoTo 0
    >
    >Alternatively, you could use this alternate code:
    >
    >Private Sub GrabScreen()
    >
    > Dim hWndDesk As Long
    > Dim hDCDesk As Long
    >
    > Dim LeftDesk As Long
    > Dim TopDesk As Long
    > Dim WidthDesk As Long
    > Dim HeightDesk As Long
    >
    > 'setup the screen coordinates
    > LeftDesk = 0
    > TopDesk = 0
    > WidthDesk = Screen.Width \ Screen.TwipsPerPixelX
    > HeightDesk = Screen.Height \ Screen.TwipsPerPixelY
    >
    > 'get the desktop handle and display context
    > hWndDesk = GetDesktopWindow()
    > hDCDesk = GetWindowDC(hWndDesk)
    >
    > 'Copy the desktop to the pixbox hDC
    > Picture1.AutoRedraw = True
    >
    > If BitBlt(Picture1.hdc, 0, 0, _
    > WidthDesk, HeightDesk, _
    > hDCDesk, LeftDesk, _
    > TopDesk, vbSrcCopy) = 1 Then
    >
    > Picture1.AutoRedraw = False
    >
    > 'copy the picture from the drawing
    > 'canvas to the persistent bitmap
    > Picture1.Picture = Picture1.Image
    >
    > 'and save
    > Call SavePicture(Picture1, "c:\pstest.bmp")
    >
    > End If
    >
    > Call ReleaseDC(hWndDesk, hDCDesk)
    >
    >End Sub
    >--
    >
    >Randy Birch
    >MVP Visual Basic
    >
    >Take the vb.net poll at:
    >http://www.mvps.org/vbnet/
    >http://www.mvps.org/ccrp/
    >
    >
    >
    >"Jones" <eng70640@nus.edu.sg> wrote in message
    >news:3a3bc660$1@news.devx.com...
    >:
    >: So if below is my screen capture procedure , then how should I code the
    >SavePicture
    >: statement in order to save it into a file ?
    >:
    >: Public Sub MyCapture(ByVal mode%)
    >: Dim IsWindows98%
    >: Dim altscan%
    >: Dim dl&
    >: Dim snapparam%
    >: altscan% = MapVirtualKey(VK_MENU, 0)
    >:
    >: Screen.MousePointer = vbHourglass
    >: If mode Then
    >: keybd_event VK_MENU, altscan, 0, 0
    >: ' It seems necessary to let this key get processed before
    >: ' taking the snapshot.
    >: End If
    >:
    >: ' Why does this work? Who knows!
    >: If mode = 0 And IsWindows98 Then snapparam = 1
    >:
    >: DoEvents ' These seem necessary to make it reliable
    >:
    >: ' Take the snapshot
    >: keybd_event VK_SNAPSHOT, snapparam, 0, 0
    >:
    >: DoEvents
    >:
    >:
    >: ' If mode Then keybd_event VK_MENU, altscan, KEYEVENTF_KEYUP, 0
    >:
    >: 'cmdCaptureAll.Enabled = True
    >: 'cmdCaptureActive.Enabled = True
    >: keybd_event VK_MENU, 0, KEYEVENTF_KEYUP, 0 ' release alt
    >: keybd_event VK_SNAPSHOT, 0, KEYEVENTF_KEYUP, 0 ' release
    >: Screen.MousePointer = vbDefault
    >:
    >: End Sub
    >:
    >: ' In order to capture active screen , u just call by typing'capture 1'
    >:
    >:
    >
    >



  6. #6
    Ron Phillips Guest

    Re: Save Screen Capture to a file


    You should be able to use the same code as below, but instead of using
    "hDCDesk = GetWindowDC(hWndDesk)" to get the desktop handle, use the
    API call GetActiveWindow()

    On 16 Dec 2000 23:20:49 -0800, "Jones" <eng70640@nus.edu.sg> wrote:
    >
    >Does anyone know of a code which specifically captures the active window of
    >the desktop ?
    >"Randy Birch" <rgb@mvps.org> wrote:
    >>
    >> On Local Error GoTo command_error
    >> Image1.Picture = Clipboard.GetData(vbCFBitmap)
    >>
    >> Call SavePicture(Image1, "c:\printscreentest.bmp")
    >> Clipboard.Clear
    >> On Local Error GoTo 0
    >>
    >>Alternatively, you could use this alternate code:
    >>
    >>Private Sub GrabScreen()
    >>
    >> Dim hWndDesk As Long
    >> Dim hDCDesk As Long
    >>
    >> Dim LeftDesk As Long
    >> Dim TopDesk As Long
    >> Dim WidthDesk As Long
    >> Dim HeightDesk As Long
    >>
    >> 'setup the screen coordinates
    >> LeftDesk = 0
    >> TopDesk = 0
    >> WidthDesk = Screen.Width \ Screen.TwipsPerPixelX
    >> HeightDesk = Screen.Height \ Screen.TwipsPerPixelY
    >>
    >> 'get the desktop handle and display context
    >> hWndDesk = GetDesktopWindow()
    >> hDCDesk = GetWindowDC(hWndDesk)
    >>
    >> 'Copy the desktop to the pixbox hDC
    >> Picture1.AutoRedraw = True
    >>
    >> If BitBlt(Picture1.hdc, 0, 0, _
    >> WidthDesk, HeightDesk, _
    >> hDCDesk, LeftDesk, _
    >> TopDesk, vbSrcCopy) = 1 Then
    >>
    >> Picture1.AutoRedraw = False
    >>
    >> 'copy the picture from the drawing
    >> 'canvas to the persistent bitmap
    >> Picture1.Picture = Picture1.Image
    >>
    >> 'and save
    >> Call SavePicture(Picture1, "c:\pstest.bmp")
    >>
    >> End If
    >>
    >> Call ReleaseDC(hWndDesk, hDCDesk)
    >>
    >>End Sub
    >>--
    >>
    >>Randy Birch
    >>MVP Visual Basic
    >>
    >>Take the vb.net poll at:
    >>http://www.mvps.org/vbnet/
    >>http://www.mvps.org/ccrp/
    >>
    >>
    >>
    >>"Jones" <eng70640@nus.edu.sg> wrote in message
    >>news:3a3bc660$1@news.devx.com...
    >>:
    >>: So if below is my screen capture procedure , then how should I code the
    >>SavePicture
    >>: statement in order to save it into a file ?
    >>:
    >>: Public Sub MyCapture(ByVal mode%)
    >>: Dim IsWindows98%
    >>: Dim altscan%
    >>: Dim dl&
    >>: Dim snapparam%
    >>: altscan% = MapVirtualKey(VK_MENU, 0)
    >>:
    >>: Screen.MousePointer = vbHourglass
    >>: If mode Then
    >>: keybd_event VK_MENU, altscan, 0, 0
    >>: ' It seems necessary to let this key get processed before
    >>: ' taking the snapshot.
    >>: End If
    >>:
    >>: ' Why does this work? Who knows!
    >>: If mode = 0 And IsWindows98 Then snapparam = 1
    >>:
    >>: DoEvents ' These seem necessary to make it reliable
    >>:
    >>: ' Take the snapshot
    >>: keybd_event VK_SNAPSHOT, snapparam, 0, 0
    >>:
    >>: DoEvents
    >>:
    >>:
    >>: ' If mode Then keybd_event VK_MENU, altscan, KEYEVENTF_KEYUP, 0
    >>:
    >>: 'cmdCaptureAll.Enabled = True
    >>: 'cmdCaptureActive.Enabled = True
    >>: keybd_event VK_MENU, 0, KEYEVENTF_KEYUP, 0 ' release alt
    >>: keybd_event VK_SNAPSHOT, 0, KEYEVENTF_KEYUP, 0 ' release
    >>: Screen.MousePointer = vbDefault
    >>:
    >>: End Sub
    >>:
    >>: ' In order to capture active screen , u just call by typing'capture 1'
    >>:
    >>:
    >>
    >>

    >



  7. #7
    Ron Phillips Guest

    Re: Save Screen Capture to a file


    You should be able to use the same code as below, but instead of using
    "hDCDesk = GetWindowDC(hWndDesk)" to get the desktop handle, use the
    API call GetActiveWindow()

    On 16 Dec 2000 23:20:49 -0800, "Jones" <eng70640@nus.edu.sg> wrote:
    >
    >Does anyone know of a code which specifically captures the active window of
    >the desktop ?
    >"Randy Birch" <rgb@mvps.org> wrote:
    >>
    >> On Local Error GoTo command_error
    >> Image1.Picture = Clipboard.GetData(vbCFBitmap)
    >>
    >> Call SavePicture(Image1, "c:\printscreentest.bmp")
    >> Clipboard.Clear
    >> On Local Error GoTo 0
    >>
    >>Alternatively, you could use this alternate code:
    >>
    >>Private Sub GrabScreen()
    >>
    >> Dim hWndDesk As Long
    >> Dim hDCDesk As Long
    >>
    >> Dim LeftDesk As Long
    >> Dim TopDesk As Long
    >> Dim WidthDesk As Long
    >> Dim HeightDesk As Long
    >>
    >> 'setup the screen coordinates
    >> LeftDesk = 0
    >> TopDesk = 0
    >> WidthDesk = Screen.Width \ Screen.TwipsPerPixelX
    >> HeightDesk = Screen.Height \ Screen.TwipsPerPixelY
    >>
    >> 'get the desktop handle and display context
    >> hWndDesk = GetDesktopWindow()
    >> hDCDesk = GetWindowDC(hWndDesk)
    >>
    >> 'Copy the desktop to the pixbox hDC
    >> Picture1.AutoRedraw = True
    >>
    >> If BitBlt(Picture1.hdc, 0, 0, _
    >> WidthDesk, HeightDesk, _
    >> hDCDesk, LeftDesk, _
    >> TopDesk, vbSrcCopy) = 1 Then
    >>
    >> Picture1.AutoRedraw = False
    >>
    >> 'copy the picture from the drawing
    >> 'canvas to the persistent bitmap
    >> Picture1.Picture = Picture1.Image
    >>
    >> 'and save
    >> Call SavePicture(Picture1, "c:\pstest.bmp")
    >>
    >> End If
    >>
    >> Call ReleaseDC(hWndDesk, hDCDesk)
    >>
    >>End Sub
    >>--
    >>
    >>Randy Birch
    >>MVP Visual Basic
    >>
    >>Take the vb.net poll at:
    >>http://www.mvps.org/vbnet/
    >>http://www.mvps.org/ccrp/
    >>
    >>
    >>
    >>"Jones" <eng70640@nus.edu.sg> wrote in message
    >>news:3a3bc660$1@news.devx.com...
    >>:
    >>: So if below is my screen capture procedure , then how should I code the
    >>SavePicture
    >>: statement in order to save it into a file ?
    >>:
    >>: Public Sub MyCapture(ByVal mode%)
    >>: Dim IsWindows98%
    >>: Dim altscan%
    >>: Dim dl&
    >>: Dim snapparam%
    >>: altscan% = MapVirtualKey(VK_MENU, 0)
    >>:
    >>: Screen.MousePointer = vbHourglass
    >>: If mode Then
    >>: keybd_event VK_MENU, altscan, 0, 0
    >>: ' It seems necessary to let this key get processed before
    >>: ' taking the snapshot.
    >>: End If
    >>:
    >>: ' Why does this work? Who knows!
    >>: If mode = 0 And IsWindows98 Then snapparam = 1
    >>:
    >>: DoEvents ' These seem necessary to make it reliable
    >>:
    >>: ' Take the snapshot
    >>: keybd_event VK_SNAPSHOT, snapparam, 0, 0
    >>:
    >>: DoEvents
    >>:
    >>:
    >>: ' If mode Then keybd_event VK_MENU, altscan, KEYEVENTF_KEYUP, 0
    >>:
    >>: 'cmdCaptureAll.Enabled = True
    >>: 'cmdCaptureActive.Enabled = True
    >>: keybd_event VK_MENU, 0, KEYEVENTF_KEYUP, 0 ' release alt
    >>: keybd_event VK_SNAPSHOT, 0, KEYEVENTF_KEYUP, 0 ' release
    >>: Screen.MousePointer = vbDefault
    >>:
    >>: End Sub
    >>:
    >>: ' In order to capture active screen , u just call by typing'capture 1'
    >>:
    >>:
    >>
    >>

    >



  8. #8
    Ron Phillips Guest

    Re: Save Screen Capture to a file

    On Sun, 17 Dec 2000 07:28:56 GMT, rphillips71@hotmail.com (Ron
    Phillips) wrote:

    Well.. I copied the wrong line. The API returns the handle to the
    window, not the handle to the DC.. sorry about that.

    hWndDesk = GetDesktopWindow()

    to..

    hActiveWindow = GetActiveWindow()

    >
    >You should be able to use the same code as below, but instead of using
    >"hDCDesk = GetWindowDC(hWndDesk)" to get the desktop handle, use the
    >API call GetActiveWindow()
    >
    >On 16 Dec 2000 23:20:49 -0800, "Jones" <eng70640@nus.edu.sg> wrote:
    >>
    >>Does anyone know of a code which specifically captures the active window of
    >>the desktop ?
    >>"Randy Birch" <rgb@mvps.org> wrote:
    >>>
    >>> On Local Error GoTo command_error
    >>> Image1.Picture = Clipboard.GetData(vbCFBitmap)
    >>>
    >>> Call SavePicture(Image1, "c:\printscreentest.bmp")
    >>> Clipboard.Clear
    >>> On Local Error GoTo 0
    >>>
    >>>Alternatively, you could use this alternate code:
    >>>
    >>>Private Sub GrabScreen()
    >>>
    >>> Dim hWndDesk As Long
    >>> Dim hDCDesk As Long
    >>>
    >>> Dim LeftDesk As Long
    >>> Dim TopDesk As Long
    >>> Dim WidthDesk As Long
    >>> Dim HeightDesk As Long
    >>>
    >>> 'setup the screen coordinates
    >>> LeftDesk = 0
    >>> TopDesk = 0
    >>> WidthDesk = Screen.Width \ Screen.TwipsPerPixelX
    >>> HeightDesk = Screen.Height \ Screen.TwipsPerPixelY
    >>>
    >>> 'get the desktop handle and display context
    >>> hWndDesk = GetDesktopWindow()
    >>> hDCDesk = GetWindowDC(hWndDesk)
    >>>
    >>> 'Copy the desktop to the pixbox hDC
    >>> Picture1.AutoRedraw = True
    >>>
    >>> If BitBlt(Picture1.hdc, 0, 0, _
    >>> WidthDesk, HeightDesk, _
    >>> hDCDesk, LeftDesk, _
    >>> TopDesk, vbSrcCopy) = 1 Then
    >>>
    >>> Picture1.AutoRedraw = False
    >>>
    >>> 'copy the picture from the drawing
    >>> 'canvas to the persistent bitmap
    >>> Picture1.Picture = Picture1.Image
    >>>
    >>> 'and save
    >>> Call SavePicture(Picture1, "c:\pstest.bmp")
    >>>
    >>> End If
    >>>
    >>> Call ReleaseDC(hWndDesk, hDCDesk)
    >>>
    >>>End Sub
    >>>--
    >>>
    >>>Randy Birch
    >>>MVP Visual Basic
    >>>
    >>>Take the vb.net poll at:
    >>>http://www.mvps.org/vbnet/
    >>>http://www.mvps.org/ccrp/
    >>>
    >>>
    >>>
    >>>"Jones" <eng70640@nus.edu.sg> wrote in message
    >>>news:3a3bc660$1@news.devx.com...
    >>>:
    >>>: So if below is my screen capture procedure , then how should I code the
    >>>SavePicture
    >>>: statement in order to save it into a file ?
    >>>:
    >>>: Public Sub MyCapture(ByVal mode%)
    >>>: Dim IsWindows98%
    >>>: Dim altscan%
    >>>: Dim dl&
    >>>: Dim snapparam%
    >>>: altscan% = MapVirtualKey(VK_MENU, 0)
    >>>:
    >>>: Screen.MousePointer = vbHourglass
    >>>: If mode Then
    >>>: keybd_event VK_MENU, altscan, 0, 0
    >>>: ' It seems necessary to let this key get processed before
    >>>: ' taking the snapshot.
    >>>: End If
    >>>:
    >>>: ' Why does this work? Who knows!
    >>>: If mode = 0 And IsWindows98 Then snapparam = 1
    >>>:
    >>>: DoEvents ' These seem necessary to make it reliable
    >>>:
    >>>: ' Take the snapshot
    >>>: keybd_event VK_SNAPSHOT, snapparam, 0, 0
    >>>:
    >>>: DoEvents
    >>>:
    >>>:
    >>>: ' If mode Then keybd_event VK_MENU, altscan, KEYEVENTF_KEYUP, 0
    >>>:
    >>>: 'cmdCaptureAll.Enabled = True
    >>>: 'cmdCaptureActive.Enabled = True
    >>>: keybd_event VK_MENU, 0, KEYEVENTF_KEYUP, 0 ' release alt
    >>>: keybd_event VK_SNAPSHOT, 0, KEYEVENTF_KEYUP, 0 ' release
    >>>: Screen.MousePointer = vbDefault
    >>>:
    >>>: End Sub
    >>>:
    >>>: ' In order to capture active screen , u just call by typing'capture 1'
    >>>:
    >>>:
    >>>
    >>>

    >>

    >



  9. #9
    Ron Phillips Guest

    Re: Save Screen Capture to a file

    On Sun, 17 Dec 2000 07:28:56 GMT, rphillips71@hotmail.com (Ron
    Phillips) wrote:

    Well.. I copied the wrong line. The API returns the handle to the
    window, not the handle to the DC.. sorry about that.

    hWndDesk = GetDesktopWindow()

    to..

    hActiveWindow = GetActiveWindow()

    >
    >You should be able to use the same code as below, but instead of using
    >"hDCDesk = GetWindowDC(hWndDesk)" to get the desktop handle, use the
    >API call GetActiveWindow()
    >
    >On 16 Dec 2000 23:20:49 -0800, "Jones" <eng70640@nus.edu.sg> wrote:
    >>
    >>Does anyone know of a code which specifically captures the active window of
    >>the desktop ?
    >>"Randy Birch" <rgb@mvps.org> wrote:
    >>>
    >>> On Local Error GoTo command_error
    >>> Image1.Picture = Clipboard.GetData(vbCFBitmap)
    >>>
    >>> Call SavePicture(Image1, "c:\printscreentest.bmp")
    >>> Clipboard.Clear
    >>> On Local Error GoTo 0
    >>>
    >>>Alternatively, you could use this alternate code:
    >>>
    >>>Private Sub GrabScreen()
    >>>
    >>> Dim hWndDesk As Long
    >>> Dim hDCDesk As Long
    >>>
    >>> Dim LeftDesk As Long
    >>> Dim TopDesk As Long
    >>> Dim WidthDesk As Long
    >>> Dim HeightDesk As Long
    >>>
    >>> 'setup the screen coordinates
    >>> LeftDesk = 0
    >>> TopDesk = 0
    >>> WidthDesk = Screen.Width \ Screen.TwipsPerPixelX
    >>> HeightDesk = Screen.Height \ Screen.TwipsPerPixelY
    >>>
    >>> 'get the desktop handle and display context
    >>> hWndDesk = GetDesktopWindow()
    >>> hDCDesk = GetWindowDC(hWndDesk)
    >>>
    >>> 'Copy the desktop to the pixbox hDC
    >>> Picture1.AutoRedraw = True
    >>>
    >>> If BitBlt(Picture1.hdc, 0, 0, _
    >>> WidthDesk, HeightDesk, _
    >>> hDCDesk, LeftDesk, _
    >>> TopDesk, vbSrcCopy) = 1 Then
    >>>
    >>> Picture1.AutoRedraw = False
    >>>
    >>> 'copy the picture from the drawing
    >>> 'canvas to the persistent bitmap
    >>> Picture1.Picture = Picture1.Image
    >>>
    >>> 'and save
    >>> Call SavePicture(Picture1, "c:\pstest.bmp")
    >>>
    >>> End If
    >>>
    >>> Call ReleaseDC(hWndDesk, hDCDesk)
    >>>
    >>>End Sub
    >>>--
    >>>
    >>>Randy Birch
    >>>MVP Visual Basic
    >>>
    >>>Take the vb.net poll at:
    >>>http://www.mvps.org/vbnet/
    >>>http://www.mvps.org/ccrp/
    >>>
    >>>
    >>>
    >>>"Jones" <eng70640@nus.edu.sg> wrote in message
    >>>news:3a3bc660$1@news.devx.com...
    >>>:
    >>>: So if below is my screen capture procedure , then how should I code the
    >>>SavePicture
    >>>: statement in order to save it into a file ?
    >>>:
    >>>: Public Sub MyCapture(ByVal mode%)
    >>>: Dim IsWindows98%
    >>>: Dim altscan%
    >>>: Dim dl&
    >>>: Dim snapparam%
    >>>: altscan% = MapVirtualKey(VK_MENU, 0)
    >>>:
    >>>: Screen.MousePointer = vbHourglass
    >>>: If mode Then
    >>>: keybd_event VK_MENU, altscan, 0, 0
    >>>: ' It seems necessary to let this key get processed before
    >>>: ' taking the snapshot.
    >>>: End If
    >>>:
    >>>: ' Why does this work? Who knows!
    >>>: If mode = 0 And IsWindows98 Then snapparam = 1
    >>>:
    >>>: DoEvents ' These seem necessary to make it reliable
    >>>:
    >>>: ' Take the snapshot
    >>>: keybd_event VK_SNAPSHOT, snapparam, 0, 0
    >>>:
    >>>: DoEvents
    >>>:
    >>>:
    >>>: ' If mode Then keybd_event VK_MENU, altscan, KEYEVENTF_KEYUP, 0
    >>>:
    >>>: 'cmdCaptureAll.Enabled = True
    >>>: 'cmdCaptureActive.Enabled = True
    >>>: keybd_event VK_MENU, 0, KEYEVENTF_KEYUP, 0 ' release alt
    >>>: keybd_event VK_SNAPSHOT, 0, KEYEVENTF_KEYUP, 0 ' release
    >>>: Screen.MousePointer = vbDefault
    >>>:
    >>>: End Sub
    >>>:
    >>>: ' In order to capture active screen , u just call by typing'capture 1'
    >>>:
    >>>:
    >>>
    >>>

    >>

    >



  10. #10
    Randy Birch Guest

    Re: Save Screen Capture to a file

    use hWndActive = GetForegroundWindow(). Then use GetWindowRect to get its
    size, and pass 0 0 as

    The msdn notes a slight difference in GetForegroundWindow and
    GetActiveWindow ...

    GetForegroundWindow function returns a handle to the foreground window (the
    window with which the user is currently working).

    GetActiveWindow function retrieves the window handle to the active window
    attached to the calling thread's message queue.


    Private Sub Command3_Click()

    MsgBox "Two seconds after you press OK to close this dialog, the
    currently active window will be printed into the picturebox."

    'delay activation for two seconds
    Dim delay As Date

    delay = DateAdd("s", 2, Now)

    Do Until Now > delay
    DoEvents
    Loop

    Dim hWndActive As Long
    Dim hDCActive As Long
    Dim LeftActive As Long
    Dim TopActive As Long
    Dim WidthActive As Long
    Dim HeightActive As Long
    Dim RectActive As RECT

    'Get the handle to the foreground window and it's size
    hWndActive = GetForegroundWindow()
    Call GetWindowRect(hWndActive, RectActive)

    'get the desktop handle and display context
    hDCActive = GetWindowDC(hWndActive)

    'determine the coordinates of the active window
    LeftActive = 0
    TopActive = 0
    WidthActive = RectActive.Right - RectActive.Left
    HeightActive = RectActive.Bottom - RectActive.Top

    'Copy the desktop to the pixbox hDC
    Call BitBlt(Picture1.hdc, 0, 0, WidthActive, HeightActive, hDCActive,
    LeftActive, TopActive, vbSrcCopy)
    Call ReleaseDC(hWndActive, hDCActive)

    End Sub


    --

    Randy Birch
    MVP Visual Basic

    Take the vb.net poll at:
    http://www.mvps.org/vbnet/
    http://www.mvps.org/ccrp/



    "Ron Phillips" <rphillips71@hotmail.com> wrote in message
    news:3a3c6b5d.52654732@news.devx.com...
    : On Sun, 17 Dec 2000 07:28:56 GMT, rphillips71@hotmail.com (Ron
    : Phillips) wrote:
    :
    : Well.. I copied the wrong line. The API returns the handle to the
    : window, not the handle to the DC.. sorry about that.
    :
    : hWndDesk = GetDesktopWindow()
    :
    : to..
    :
    : hActiveWindow = GetActiveWindow()
    :
    : >
    : >You should be able to use the same code as below, but instead of using
    : >"hDCDesk = GetWindowDC(hWndDesk)" to get the desktop handle, use the
    : >API call GetActiveWindow()
    : >
    : >On 16 Dec 2000 23:20:49 -0800, "Jones" <eng70640@nus.edu.sg> wrote:
    : >>
    : >>Does anyone know of a code which specifically captures the active window
    of
    : >>the desktop ?
    : >>"Randy Birch" <rgb@mvps.org> wrote:
    : >>>
    : >>> On Local Error GoTo command_error
    : >>> Image1.Picture = Clipboard.GetData(vbCFBitmap)
    : >>>
    : >>> Call SavePicture(Image1, "c:\printscreentest.bmp")
    : >>> Clipboard.Clear
    : >>> On Local Error GoTo 0
    : >>>
    : >>>Alternatively, you could use this alternate code:
    : >>>
    : >>>Private Sub GrabScreen()
    : >>>
    : >>> Dim hWndDesk As Long
    : >>> Dim hDCDesk As Long
    : >>>
    : >>> Dim LeftDesk As Long
    : >>> Dim TopDesk As Long
    : >>> Dim WidthDesk As Long
    : >>> Dim HeightDesk As Long
    : >>>
    : >>> 'setup the screen coordinates
    : >>> LeftDesk = 0
    : >>> TopDesk = 0
    : >>> WidthDesk = Screen.Width \ Screen.TwipsPerPixelX
    : >>> HeightDesk = Screen.Height \ Screen.TwipsPerPixelY
    : >>>
    : >>> 'get the desktop handle and display context
    : >>> hWndDesk = GetDesktopWindow()
    : >>> hDCDesk = GetWindowDC(hWndDesk)
    : >>>
    : >>> 'Copy the desktop to the pixbox hDC
    : >>> Picture1.AutoRedraw = True
    : >>>
    : >>> If BitBlt(Picture1.hdc, 0, 0, _
    : >>> WidthDesk, HeightDesk, _
    : >>> hDCDesk, LeftDesk, _
    : >>> TopDesk, vbSrcCopy) = 1 Then
    : >>>
    : >>> Picture1.AutoRedraw = False
    : >>>
    : >>> 'copy the picture from the drawing
    : >>> 'canvas to the persistent bitmap
    : >>> Picture1.Picture = Picture1.Image
    : >>>
    : >>> 'and save
    : >>> Call SavePicture(Picture1, "c:\pstest.bmp")
    : >>>
    : >>> End If
    : >>>
    : >>> Call ReleaseDC(hWndDesk, hDCDesk)
    : >>>
    : >>>End Sub
    : >>>--
    : >>>
    : >>>Randy Birch
    : >>>MVP Visual Basic
    : >>>
    : >>>Take the vb.net poll at:
    : >>>http://www.mvps.org/vbnet/
    : >>>http://www.mvps.org/ccrp/
    : >>>
    : >>>
    : >>>
    : >>>"Jones" <eng70640@nus.edu.sg> wrote in message
    : >>>news:3a3bc660$1@news.devx.com...
    : >>>:
    : >>>: So if below is my screen capture procedure , then how should I code
    the
    : >>>SavePicture
    : >>>: statement in order to save it into a file ?
    : >>>:
    : >>>: Public Sub MyCapture(ByVal mode%)
    : >>>: Dim IsWindows98%
    : >>>: Dim altscan%
    : >>>: Dim dl&
    : >>>: Dim snapparam%
    : >>>: altscan% = MapVirtualKey(VK_MENU, 0)
    : >>>:
    : >>>: Screen.MousePointer = vbHourglass
    : >>>: If mode Then
    : >>>: keybd_event VK_MENU, altscan, 0, 0
    : >>>: ' It seems necessary to let this key get processed before
    : >>>: ' taking the snapshot.
    : >>>: End If
    : >>>:
    : >>>: ' Why does this work? Who knows!
    : >>>: If mode = 0 And IsWindows98 Then snapparam = 1
    : >>>:
    : >>>: DoEvents ' These seem necessary to make it reliable
    : >>>:
    : >>>: ' Take the snapshot
    : >>>: keybd_event VK_SNAPSHOT, snapparam, 0, 0
    : >>>:
    : >>>: DoEvents
    : >>>:
    : >>>:
    : >>>: ' If mode Then keybd_event VK_MENU, altscan, KEYEVENTF_KEYUP, 0
    : >>>:
    : >>>: 'cmdCaptureAll.Enabled = True
    : >>>: 'cmdCaptureActive.Enabled = True
    : >>>: keybd_event VK_MENU, 0, KEYEVENTF_KEYUP, 0 ' release alt
    : >>>: keybd_event VK_SNAPSHOT, 0, KEYEVENTF_KEYUP, 0 ' release
    : >>>: Screen.MousePointer = vbDefault
    : >>>:
    : >>>: End Sub
    : >>>:
    : >>>: ' In order to capture active screen , u just call by typing'capture
    1'
    : >>>:
    : >>>:
    : >>>
    : >>>
    : >>
    : >
    :



  11. #11
    Randy Birch Guest

    Re: Save Screen Capture to a file

    use hWndActive = GetForegroundWindow(). Then use GetWindowRect to get its
    size, and pass 0 0 as

    The msdn notes a slight difference in GetForegroundWindow and
    GetActiveWindow ...

    GetForegroundWindow function returns a handle to the foreground window (the
    window with which the user is currently working).

    GetActiveWindow function retrieves the window handle to the active window
    attached to the calling thread's message queue.


    Private Sub Command3_Click()

    MsgBox "Two seconds after you press OK to close this dialog, the
    currently active window will be printed into the picturebox."

    'delay activation for two seconds
    Dim delay As Date

    delay = DateAdd("s", 2, Now)

    Do Until Now > delay
    DoEvents
    Loop

    Dim hWndActive As Long
    Dim hDCActive As Long
    Dim LeftActive As Long
    Dim TopActive As Long
    Dim WidthActive As Long
    Dim HeightActive As Long
    Dim RectActive As RECT

    'Get the handle to the foreground window and it's size
    hWndActive = GetForegroundWindow()
    Call GetWindowRect(hWndActive, RectActive)

    'get the desktop handle and display context
    hDCActive = GetWindowDC(hWndActive)

    'determine the coordinates of the active window
    LeftActive = 0
    TopActive = 0
    WidthActive = RectActive.Right - RectActive.Left
    HeightActive = RectActive.Bottom - RectActive.Top

    'Copy the desktop to the pixbox hDC
    Call BitBlt(Picture1.hdc, 0, 0, WidthActive, HeightActive, hDCActive,
    LeftActive, TopActive, vbSrcCopy)
    Call ReleaseDC(hWndActive, hDCActive)

    End Sub


    --

    Randy Birch
    MVP Visual Basic

    Take the vb.net poll at:
    http://www.mvps.org/vbnet/
    http://www.mvps.org/ccrp/



    "Ron Phillips" <rphillips71@hotmail.com> wrote in message
    news:3a3c6b5d.52654732@news.devx.com...
    : On Sun, 17 Dec 2000 07:28:56 GMT, rphillips71@hotmail.com (Ron
    : Phillips) wrote:
    :
    : Well.. I copied the wrong line. The API returns the handle to the
    : window, not the handle to the DC.. sorry about that.
    :
    : hWndDesk = GetDesktopWindow()
    :
    : to..
    :
    : hActiveWindow = GetActiveWindow()
    :
    : >
    : >You should be able to use the same code as below, but instead of using
    : >"hDCDesk = GetWindowDC(hWndDesk)" to get the desktop handle, use the
    : >API call GetActiveWindow()
    : >
    : >On 16 Dec 2000 23:20:49 -0800, "Jones" <eng70640@nus.edu.sg> wrote:
    : >>
    : >>Does anyone know of a code which specifically captures the active window
    of
    : >>the desktop ?
    : >>"Randy Birch" <rgb@mvps.org> wrote:
    : >>>
    : >>> On Local Error GoTo command_error
    : >>> Image1.Picture = Clipboard.GetData(vbCFBitmap)
    : >>>
    : >>> Call SavePicture(Image1, "c:\printscreentest.bmp")
    : >>> Clipboard.Clear
    : >>> On Local Error GoTo 0
    : >>>
    : >>>Alternatively, you could use this alternate code:
    : >>>
    : >>>Private Sub GrabScreen()
    : >>>
    : >>> Dim hWndDesk As Long
    : >>> Dim hDCDesk As Long
    : >>>
    : >>> Dim LeftDesk As Long
    : >>> Dim TopDesk As Long
    : >>> Dim WidthDesk As Long
    : >>> Dim HeightDesk As Long
    : >>>
    : >>> 'setup the screen coordinates
    : >>> LeftDesk = 0
    : >>> TopDesk = 0
    : >>> WidthDesk = Screen.Width \ Screen.TwipsPerPixelX
    : >>> HeightDesk = Screen.Height \ Screen.TwipsPerPixelY
    : >>>
    : >>> 'get the desktop handle and display context
    : >>> hWndDesk = GetDesktopWindow()
    : >>> hDCDesk = GetWindowDC(hWndDesk)
    : >>>
    : >>> 'Copy the desktop to the pixbox hDC
    : >>> Picture1.AutoRedraw = True
    : >>>
    : >>> If BitBlt(Picture1.hdc, 0, 0, _
    : >>> WidthDesk, HeightDesk, _
    : >>> hDCDesk, LeftDesk, _
    : >>> TopDesk, vbSrcCopy) = 1 Then
    : >>>
    : >>> Picture1.AutoRedraw = False
    : >>>
    : >>> 'copy the picture from the drawing
    : >>> 'canvas to the persistent bitmap
    : >>> Picture1.Picture = Picture1.Image
    : >>>
    : >>> 'and save
    : >>> Call SavePicture(Picture1, "c:\pstest.bmp")
    : >>>
    : >>> End If
    : >>>
    : >>> Call ReleaseDC(hWndDesk, hDCDesk)
    : >>>
    : >>>End Sub
    : >>>--
    : >>>
    : >>>Randy Birch
    : >>>MVP Visual Basic
    : >>>
    : >>>Take the vb.net poll at:
    : >>>http://www.mvps.org/vbnet/
    : >>>http://www.mvps.org/ccrp/
    : >>>
    : >>>
    : >>>
    : >>>"Jones" <eng70640@nus.edu.sg> wrote in message
    : >>>news:3a3bc660$1@news.devx.com...
    : >>>:
    : >>>: So if below is my screen capture procedure , then how should I code
    the
    : >>>SavePicture
    : >>>: statement in order to save it into a file ?
    : >>>:
    : >>>: Public Sub MyCapture(ByVal mode%)
    : >>>: Dim IsWindows98%
    : >>>: Dim altscan%
    : >>>: Dim dl&
    : >>>: Dim snapparam%
    : >>>: altscan% = MapVirtualKey(VK_MENU, 0)
    : >>>:
    : >>>: Screen.MousePointer = vbHourglass
    : >>>: If mode Then
    : >>>: keybd_event VK_MENU, altscan, 0, 0
    : >>>: ' It seems necessary to let this key get processed before
    : >>>: ' taking the snapshot.
    : >>>: End If
    : >>>:
    : >>>: ' Why does this work? Who knows!
    : >>>: If mode = 0 And IsWindows98 Then snapparam = 1
    : >>>:
    : >>>: DoEvents ' These seem necessary to make it reliable
    : >>>:
    : >>>: ' Take the snapshot
    : >>>: keybd_event VK_SNAPSHOT, snapparam, 0, 0
    : >>>:
    : >>>: DoEvents
    : >>>:
    : >>>:
    : >>>: ' If mode Then keybd_event VK_MENU, altscan, KEYEVENTF_KEYUP, 0
    : >>>:
    : >>>: 'cmdCaptureAll.Enabled = True
    : >>>: 'cmdCaptureActive.Enabled = True
    : >>>: keybd_event VK_MENU, 0, KEYEVENTF_KEYUP, 0 ' release alt
    : >>>: keybd_event VK_SNAPSHOT, 0, KEYEVENTF_KEYUP, 0 ' release
    : >>>: Screen.MousePointer = vbDefault
    : >>>:
    : >>>: End Sub
    : >>>:
    : >>>: ' In order to capture active screen , u just call by typing'capture
    1'
    : >>>:
    : >>>:
    : >>>
    : >>>
    : >>
    : >
    :



  12. #12
    Karl E. Peterson Guest

    Re: Save Screen Capture to a file

    Jones --

    > Does anyone know of a code which specifically captures the active window of
    > the desktop ?


    HOWTO: Capture and Print the Screen, a Form, or any Window, ID: Q161299
    http://support.microsoft.com/support.../q161/2/99.asp

    Later... Karl
    --
    http://www.mvps.org/vb



  13. #13
    Karl E. Peterson Guest

    Re: Save Screen Capture to a file

    Jones --

    > Does anyone know of a code which specifically captures the active window of
    > the desktop ?


    HOWTO: Capture and Print the Screen, a Form, or any Window, ID: Q161299
    http://support.microsoft.com/support.../q161/2/99.asp

    Later... Karl
    --
    http://www.mvps.org/vb



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center