Results 1 to 5 of 5

Thread: capture form & put into RTF file (GOT IT)

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Aug 2001
    Location
    new jersey
    Posts
    2,904

    capture form & put into RTF file (GOT IT)

    I'm an experienced VB programmer, but now need to do something I have no idea how to do, which is capture a form and save it in (or as) an RTF file.

    I can accomplish exactly what I want from the desktop by (1) giving the form the focus and then (2) doing alt-printscreen to capture it, then (3) saving it into a fresh Wordpad and then (4) saving the wordpad as an RTF file.

    I'd like to accomplish the equivalent from code at runtime.

    Any help will be appreciated, as I have not a clue how to go about this.
    Last edited by phinds; Jun 20th, 2002 at 07:57 AM.

  2. #2
    Junior Member
    Join Date
    May 2001
    Posts
    18
    hi .. i cannot give the full soution of ur pblm. but this might help u...
    i am capturing a current screen to a picture box and sending to the printer... here is the code for that


    Set Picture1.Picture = CaptureScreen()
    Printer.Orientation = vbPRORLandscape
    PrintPictureToFitPage Printer, Picture1.Picture
    Printer.EndDoc


    Here Picture1 is a object of PictureBox

    if u find the soln let me know

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Aug 2001
    Location
    new jersey
    Posts
    2,904
    thanks.

    what is "capturescreen" ? I cannot find anything about it in on-line help

  4. #4

    Thread Starter
    PowerPoster
    Join Date
    Aug 2001
    Location
    new jersey
    Posts
    2,904
    never mind ... I found it

  5. #5

    Thread Starter
    PowerPoster
    Join Date
    Aug 2001
    Location
    new jersey
    Posts
    2,904
    got it:


    Private Sub cmdSave_Click()
    '
    ' capture the image
    '
    Set frmGraph.Picture1.Picture = CaptureForm(frmGraph)
    '
    ' send captured image to clipboard
    '
    Clipboard.Clear
    Clipboard.SetData frmGraph.Picture1.Picture
    End Sub

Posting Permissions

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



Click Here to Expand Forum to Full Width