|
-
Dec 15th, 2010, 09:18 AM
#1
Thread Starter
Lively Member
How to add a picture in a RTB
Hello everyone,
I am making a program that collects data from the user and then it prints it in a RTB. I can succesfully do this but I want to add a picture in the beggining of the RTB and I don't know to do it. I have the picture in the resources of the project. Can anyone help me?
MOBO: Asrock X58 Extreme
CPU : Core i7 950 @ 3.07Ghz
Ram : 8GB
Hard Drive : 1.5 TB (1 TB, 500GB)
Graphics : ATI Radeon HD 5670
Dual Boot : Windows XP Home, Windows 7 Ultimate x64
       
_____________________
If a reply has helped you, please consider rating it. 
-
Dec 15th, 2010, 09:38 AM
#2
Re: How to add a picture in a RTB
try this:
vb Code:
Clipboard.SetImage(My.Resources.[resourceName])
RichTextBox1.Paste()
Last edited by .paul.; Dec 15th, 2010 at 09:44 AM.
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Dec 15th, 2010, 10:02 AM
#3
Thread Starter
Lively Member
Re: How to add a picture in a RTB
I tried doing this but it doesn't work. I tried renaming my picture(with no gaps and no .bmp) but it still didn't work.
MOBO: Asrock X58 Extreme
CPU : Core i7 950 @ 3.07Ghz
Ram : 8GB
Hard Drive : 1.5 TB (1 TB, 500GB)
Graphics : ATI Radeon HD 5670
Dual Boot : Windows XP Home, Windows 7 Ultimate x64
       
_____________________
If a reply has helped you, please consider rating it. 
-
Dec 15th, 2010, 10:08 AM
#4
Re: How to add a picture in a RTB
Pauls code works for me:
Code:
Clipboard.SetImage(My.Resources.Image1) 'Image1 is Image1.jpg in my resources
RichTextBox1.Paste()
-
Dec 15th, 2010, 10:09 AM
#5
Re: How to add a picture in a RTB
did you add the picture to my.resources?
Project-->Properties-->Resources-->Add Resource
if not you'll need to create a new bitmap + then put that on the clipboard before pasting
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
Tags for this Thread
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
|