954,551 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

rich textbox

i have develop a winsock chat and am trying to add a smiley or an emotion to the rich textbox.
can anyone help me out
plzzzzzzzzzzzzzzz

jeffrey4u
Newbie Poster
20 posts since Nov 2009
Reputation Points: 10
Solved Threads: 0
 
vb5prgrmr
Posting Virtuoso
1,912 posts since Mar 2009
Reputation Points: 156
Solved Threads: 296
 

Thz VB5PRGRMR
I saw the modRTFpic module but calling it in my project is the problem now.
i tried txtdialog InsertPicture and vce versa but it is still not working.
can u help me out.
thank you

jeffrey4u
Newbie Poster
20 posts since Nov 2009
Reputation Points: 10
Solved Threads: 0
 

Please post the relevant within code tags and we will see what we can do for you...

Good Luck

vb5prgrmr
Posting Virtuoso
1,912 posts since Mar 2009
Reputation Points: 156
Solved Threads: 296
 

i mean i saw the modul (modRTFpic )
i tried calling it with this line

1. txtdialog InsertPicture and
2. InsertPicture txtdialog

but it is still not working.
can u help me out.
thank you

jeffrey4u
Newbie Poster
20 posts since Nov 2009
Reputation Points: 10
Solved Threads: 0
 

To begin with, it looks like you are trying to insert a picture into a standard textbox and this code will not work for that. You will need a rich text box (Right Click on toolbox>Components>Microsoft Rich Textbox control>ok).

Dim P As stdPicture
P = LoadPicture(StringVariableThatContainsThePathFileNameToAPictureFIle)
'or P = LoadPicture("PathFileNameToPictureFile")
InsertPicture RTB, P

Good Luck

vb5prgrmr
Posting Virtuoso
1,912 posts since Mar 2009
Reputation Points: 156
Solved Threads: 296
 

i decleared
1. Dim P As stdPicture

and under formload i put
2. P = LoadPicture(App.Path & "\Smileys\8.bmp")

the smileys is the folder which contain the emotions(smileys) and it's in the project folder

3. InsertPicture txtdialog, P

but is giving me compile error saying "Invalid use of property"

jeffrey4u
Newbie Poster
20 posts since Nov 2009
Reputation Points: 10
Solved Threads: 0
 

Once again, you cannot insert a picture into a standard picture box! It can only be a rich text box!

Now, where are you recieving the error at? Which line? Have you even tried to debug?

Good Luck

vb5prgrmr
Posting Virtuoso
1,912 posts since Mar 2009
Reputation Points: 156
Solved Threads: 296
 

am inserting it into a richtextbox.
i am trying to debug but it is giving me
runtime error "91"
(Object variable or with block variable not set)

jeffrey4u
Newbie Poster
20 posts since Nov 2009
Reputation Points: 10
Solved Threads: 0
 

when i try inserting this line
1. P = LoadPicture(App.Path & "\Smileys\8.bmp")
under formload it gives me complie error (invalid use of property)

jeffrey4u
Newbie Poster
20 posts since Nov 2009
Reputation Points: 10
Solved Threads: 0
 
when i try inserting this line 1. P = LoadPicture(App.Path & "\Smileys\8.bmp") under formload it gives me complie error (invalid use of property)

Try the following instead:

Set P = LoadPicture(App.Path & "\Smileys\8.bmp")
jonifen
Junior Poster
152 posts since Nov 2007
Reputation Points: 13
Solved Threads: 17
 

Did you dimension P first as a stdPicture object?
Are the first four references under Project>References the following?
Visual Basic For Applications
Visual Basic runtime objects and procedures
Visual Basic objects and procedures
OLE Automation

Good Luck

vb5prgrmr
Posting Virtuoso
1,912 posts since Mar 2009
Reputation Points: 156
Solved Threads: 296
 

it is a richtext box not a normal textbox

jeffrey4u
Newbie Poster
20 posts since Nov 2009
Reputation Points: 10
Solved Threads: 0
 

BRAVOOO vb5prgrmr and jonifen.
you really did a wonderful job.
my smiley is working now, thanks to you.
i don't know to let you know how relieve i am
i say HAPPY X'MAS TO U

jeffrey4u
Newbie Poster
20 posts since Nov 2009
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You