|
-
Apr 1st, 2004, 09:32 AM
#1
Thread Starter
Hyperactive Member
Resize images in Rich Text Box
Well, i have a Rich Text Box and i have loaded an image with height : 200 and width : 100! How can i resize the image through vb code so i can make it larger?
For example to make the width of the image : 200!
-
Apr 2nd, 2004, 04:40 AM
#2
-
Apr 2nd, 2004, 07:55 AM
#3
Thread Starter
Hyperactive Member
How can i do it this , in VB Code?
I know that it is too difficult but how to do it?
-
Apr 2nd, 2004, 08:05 AM
#4
Not NoteMe
You could put them in an image control with the stretch property set to true (i think).
Quotes:
"I am getting better then you guys.." NoteMe, on his leet english skills.
"And I am going to meat her again later on tonight." NoteMe
"I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
"my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
Have I helped you? Please Rate my posts. 
-
Apr 2nd, 2004, 10:51 AM
#5
Thread Starter
Hyperactive Member
And how to put them(images) back in the same place in the Rich Text Box?
-
Apr 2nd, 2004, 05:42 PM
#6
I guess you can keep track of the SelStart property when you add the images and add them back there... I suppose you are adding the images somehow like this :
VB Code:
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal _
hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, _
lParam As Any) As Long
Private Const WM_PASTE = &H302
Sub InsertPictureInRichTextBox(RTB As RichTextBox, Picture As StdPicture)
' clear the clipboard
Clipboard.Clear
' Copy the picture into the clipboard.
Clipboard.SetData Picture
' the position of the picture
RTB.SelStart = 4
' paste into the RichTextBox control
SendMessage RTB.hwnd, WM_PASTE, 0, 0
End Sub
Private Sub Command1_Click()
Call InsertPictureInRichTextBox(RichTextBox1, pic1.Picture)
End Sub
Has someone helped you? Then you can Rate their helpful post. 
-
Apr 3rd, 2004, 06:55 AM
#7
Thread Starter
Hyperactive Member
Yes i know this! I am using this! I want to find out how to resize an image after pasting it with 'SendMessage' in a Rich Text Box. Or how to resize it before pasting it in the Rich Text Box!
-
Apr 3rd, 2004, 04:54 PM
#8
-
Apr 4th, 2004, 01:35 PM
#9
Thread Starter
Hyperactive Member
The real problem is:
Say that i have this html tag loaded already(in Rich Text Box):
<img src="http://www.site.com/image1.jpg" width="717" height="573" />
It is already loaded with width = 717 , height = 573, as found from the tag.
How can i resize the image , when is already loaded in RTB and make for example its height to 400.
Using Picture Box, i think, but how to load it and then change its settings?
-
Apr 5th, 2004, 06:28 PM
#10
-
Apr 6th, 2004, 07:27 AM
#11
Thread Starter
Hyperactive Member
Nice but i can't make sense of the program!
-
Apr 6th, 2004, 04:09 PM
#12
-
Apr 8th, 2004, 06:21 PM
#13
-
Apr 9th, 2004, 04:59 AM
#14
Thread Starter
Hyperactive Member
I think that it doesn't help! It shows how to add images in RichTextBox, but i know a better way , faster and smaller way! Using "SendMessage"! It also works with gif images but it can't play the animation of its gif! But nice thought Manavo11!!!!!!!
Very nice thought! (Íüìéæá üôé äåí èá óõíÝ÷éæåò íá ðñïóðáèåßò íá âñåßò êÜôé ãéá íá ìå âïçèÞóåéò! Åõ÷áñéóôþ)
-
Apr 9th, 2004, 03:58 PM
#15
-
Apr 10th, 2004, 04:15 AM
#16
Thread Starter
Hyperactive Member
It is a very good project Manavo11 but it is something that i already knew before! If you find something else then send me the link!
(üðùò âëÝðåéò , Þ åßìáóôå ïé ìüíïé óå üëï ôï Forum ðïõ áó÷ïëïýìáóôå ìå ôï RichTextBox , ãé'áõôü êáé äåí âïçèÜåé êáíåßò , Þ áðëÜ äåí ãíùñßæåé êáíåßò ôßðïôá!)
-
Apr 10th, 2004, 03:46 PM
#17
-
Apr 11th, 2004, 03:58 AM
#18
Thread Starter
Hyperactive Member
Isn't there any way to resize the images? It can be done for sure!
Why not?
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
|