View Poll Results: Do you want an open source Web Browser Control in Visual Basic?

Voters
5. You may not vote on this poll
  • Yes, it would be great

    3 60.00%
  • No, i like Microsoft's

    1 20.00%
  • What is Web Control

    0 0%
  • I am not sure

    1 20.00%
Results 1 to 4 of 4

Thread: How to copy Rich Text Box Text exactly in Picture Box? Help

  1. #1

    Thread Starter
    Hyperactive Member DarkX_Greece's Avatar
    Join Date
    Jan 2004
    Location
    Athens (Greece)
    Posts
    315

    Exclamation How to copy Rich Text Box Text exactly in Picture Box? Help

    Hello, please help me , I am working on a Custom Web Control and I need some help.



    How to print the exact text from a rich text box to a picture box?
    I have tried it and i had some problems.
    1) There are no paragraphs(as rich text box has)
    2) There is no left , center , right formatting (as rich text box has)


    If anyone knows something, please send some code and help me with it.


    Rich Text Box's Name = Page
    Picture Box's Name = Picture1


    Kostas Botonakis, Greece
    Short CV:
    1. Visual Basic 6 Programmer
    2. Web Expert


    Botonakis Web Services

  2. #2
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051
    Not sure if this is what you want, but you could use the BitBlt API to copy an image of the text onto the picturebox.
    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.


  3. #3
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246
    Question: Would this be what you mean SLH?:

    VB Code:
    1. Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
    2. Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
    3.  
    4. Dim rtbdc As Long
    5.  
    6. rtbdc = GetDC(RichTextBox1.hwnd)
    7.  
    8. BitBlt Picture1.hDC, 0, 0, RichTextBox1.Width, RichTextBox1.Height, rtbdc, 0, 0, vbSrcCopy


    Phreak

    Visual Studio 6, Visual Studio.NET 2005, MASM

  4. #4
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051
    Yep, that's what i mean.
    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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width