Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2002
    Location
    Leicester - UK
    Posts
    820

    Unanswered: automaticly do print screen

    i've been asked to knock out a database that logs screen dumps (no problem) and automaticly gets them (big problem)

    how do you automated or simulate taking a snapshot of the screen and put it in a database?
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

  2. #2
    Join Date
    Nov 2002
    Posts
    150

    Re: automaticly do print screen

    Some event needs to fire off this method. You will also need a field in a table that is of the OLE Object type. I used a command button:

    Private Sub Command4_Click()
    SendKeys "{PRTSC}", True
    Me.Image.SetFocus
    SendKeys "%EP", True
    End Sub

  3. #3
    Join Date
    Oct 2002
    Location
    Leicester - UK
    Posts
    820

    Re: automaticly do print screen

    Originally posted by FirstAndGoal4
    Some event needs to fire off this method. You will also need a field in a table that is of the OLE Object type. I used a command button:

    Private Sub Command4_Click()
    SendKeys "{PRTSC}", True
    Me.Image.SetFocus
    SendKeys "%EP", True
    End Sub
    and that will do the same as pressing print screen key and pasting the pic into an access data field

    will this work in a vb exe to a access database?
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

  4. #4
    Join Date
    Nov 2002
    Posts
    150

    Re: automaticly do print screen

    Originally posted by m.timoney
    and that will do the same as pressing print screen key and pasting the pic into an access data field

    will this work in a vb exe to a access database?
    You will need to find the VB equivalent to SendKeys to get it to work.

  5. #5
    Join Date
    Nov 2002
    Location
    San Francisco
    Posts
    251
    Use ScreenCatcherControl - it's freeware!

    http://www.oldowl.com/bindata/ScreenCatcher.zip


    small sample:

    PrintScreen "C:\mypicture.jpg"



    Sub PrintScreen(strSaveAs As String)
    Dim objPrintScreen As Object

    Set objPrintScreen = CreateObject("ScreenCatcherControl.ScreenCatcher")
    objPrintScreen.ProgressiveCompression = True
    objPrintScreen.GrayScale = False
    objPrintScreen.OnlyActiveWindow = True
    objPrintScreen.CompressionRate = 50
    objPrintScreen.GrabIntoThisFile strSaveAs
    End Sub



    jiri

  6. #6
    Join Date
    Oct 2002
    Location
    Leicester - UK
    Posts
    820
    thx that seems to work, though for some reason if i manualy inclues the SCC componant VB6 crashes every time i try to uses it or look at project properties
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

  7. #7
    Join Date
    Nov 2002
    Location
    San Francisco
    Posts
    251
    I always used CREATEOBJECT

    you can also take that OCX from your PC and easily register it on other PC - use regsvr32.exe

    I think it can be good solution for you, cauze you can select really low q. of the picture, so you will save lot of space....



    jiri

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •