|
-
Feb 9th, 2006, 02:25 PM
#1
[RESOLVED] RichTextBox Insert Image while locked??
I have this code:
VB Code:
For X = 0 To picSmile.UBound
If RTB1.Find(picSmile(X).Tag, tLoc) <> -1 Then
RTB1.SelStart = RTB1.Find(picSmile(X).Tag, tLoc)
RTB1.SelLength = Len(picSmile(X).Tag)
Clipboard.Clear
Clipboard.SetData picSmile(X).Image
SendMessage RTB1.hWnd, WM_PASTE, 0, 0
End If
Next
if the RTB is not locked or disabled.. it works fine...
but I dont want the use to be able to copy or anything in the RTB
with Enabled = False.. all the formatting looks right.. but the images wont insert...
How do I get around this?
Thanks!
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Feb 9th, 2006, 02:31 PM
#2
Re: RichTextBox Insert Image while locked??
VB Code:
[b]RTB1.Enabled = True[/b]
For X = 0 To picSmile.UBound
If RTB1.Find(picSmile(X).Tag, tLoc) <> -1 Then
RTB1.SelStart = RTB1.Find(picSmile(X).Tag, tLoc)
RTB1.SelLength = Len(picSmile(X).Tag)
Clipboard.Clear
Clipboard.SetData picSmile(X).Image
SendMessage RTB1.hWnd, WM_PASTE, 0, 0
End If
Next
[b]RTB1.Enabled = False[/b]
?
Has someone helped you? Then you can Rate their helpful post. 
-
Feb 9th, 2006, 02:38 PM
#3
Re: RichTextBox Insert Image while locked??
lol.. too simple!! although I dont like the grey background so I will just do the Locked false / true
!!!
THANKS!!!!!!!
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Feb 9th, 2006, 02:41 PM
#4
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
|