|
-
Jun 19th, 2002, 05:06 PM
#1
Thread Starter
PowerPoster
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.
-
Jun 19th, 2002, 06:32 PM
#2
Junior Member
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
-
Jun 20th, 2002, 05:00 AM
#3
Thread Starter
PowerPoster
thanks.
what is "capturescreen" ? I cannot find anything about it in on-line help
-
Jun 20th, 2002, 05:04 AM
#4
Thread Starter
PowerPoster
never mind ... I found it
-
Jun 20th, 2002, 07:57 AM
#5
Thread Starter
PowerPoster
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|