Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Form to Rich Text Box

Posted on 2000-03-14
5
Medium Priority
?
196 Views
Last Modified: 2010-05-02
I have a form with text boxes and labels bound to a database record. I would like to send a picture of this form with its record to a rich text box  in another form (eventually to send it in a notes email). Does anyone know how to do this?
0
Comment
Question by:danlevans
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 14

Accepted Solution

by:
mcrider earned 200 total points
ID: 2617360
First check out this microsoft KB article:

HOWTO: Capture and Print the Screen, a Form, or any Window
http://support.microsoft.com/support/kb/articles/Q161/2/99.ASP?LNG=ENG&SA=MSDN&FR=0 


Use the code in the above article to copy the form to a picturebox... then copy the picturebox to the clipboard and paste it into the RTbox, like this:

     Clipboard.SetData Picture1
     RichTextBox1.SetFocus
     SendKeys "^v", True


Cheers!®©
0
 
LVL 2

Author Comment

by:danlevans
ID: 2619956
mcrider,

I tried your code:

Private Sub cmdEmail_Click()
   Set Picture1.Picture = CaptureForm(frmNCM)
   Clipboard.SetData Picture1
   frmMessage.RichTextBox1.SetFocus
   SendKeys "^v", True
End Sub

The picture has the form image but the clipboard does not it contains a previous copy I had made. The Rich Text Box contains the contents of the clipboard (previous copy not the picture). What Have I done wrong?

Dan
0
 
LVL 14

Expert Comment

by:mcrider
ID: 2621820
Try it like this:

Private Sub cmdEmail_Click()
   Set Picture1 = CaptureForm(frmNCM)
   Clipboard.Clear
   Clipboard.SetData Picture1, vbCFBitmap
   frmMessage.RichTextBox1.SetFocus
   SendKeys "^v", True
End Sub



Cheers!®©
0
 
LVL 2

Author Comment

by:danlevans
ID: 2624490
Thanks. Clearing fixed the problem.
0
 
LVL 14

Expert Comment

by:mcrider
ID: 2624579
Thanks for the points! Glad I could help!


Cheers!®©
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question