Results 1 to 10 of 10

Thread: Add other controls in Rich Text Box (Solved!!!)

  1. #1

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

    Exclamation Add other controls in Rich Text Box (Solved!!!)

    Does anyone know how to add custom controls in a Rich Text Box? For example, how to add a button in a Rich Text Box?

    Or with vb code or with RTF code.
    Last edited by DarkX_Greece; Mar 31st, 2004 at 11:28 AM.
    Short CV:
    1. Visual Basic 6 Programmer
    2. Web Expert


    Botonakis Web Services

  2. #2
    Hyperactive Member ravi15481's Avatar
    Join Date
    Aug 2002
    Location
    INDIA
    Posts
    421
    use the following code

    VB Code:
    1. SetParent Command1.hWnd, RichTextBox1.hWnd

    A good friend...

  3. #3

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

    Exclamation It doesn't work

    Your code doesn't work. As i know , vb6 doesn't have "setparent" method or function.
    Short CV:
    1. Visual Basic 6 Programmer
    2. Web Expert


    Botonakis Web Services

  4. #4

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

    Question

    Doesn't anyone know something to help me? I know that it can be done by RTF code and i am sure for this but i don't know how. Can someone help me?
    Short CV:
    1. Visual Basic 6 Programmer
    2. Web Expert


    Botonakis Web Services

  5. #5
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171
    VB Code:
    1. Declare Function SetParent Lib "user32" Alias "SetParent" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long


    Has someone helped you? Then you can Rate their helpful post.

  6. #6
    The picture isn't missing BuggyProgrammer's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, Canada
    Posts
    5,217
    Originally posted by DarkX_Greece
    Doesn't anyone know something to help me? I know that it can be done by RTF code and i am sure for this but i don't know how. Can someone help me?
    What makes you SO sure that you can do it using RTF code?
    Remember, if someone's post was not helpful, you can always rate their post negatively .

  7. #7

    Thread Starter
    Hyperactive Member DarkX_Greece's Avatar
    Join Date
    Jan 2004
    Location
    Athens (Greece)
    Posts
    315
    Try to add a button or a picture box into a word document using MS Word from MS Office. Then save it as RTF document and then open it with WordPad. As you will see the button or the picture box. Then save it again from the WordPad and open with the notepad. You will see the the rtf code. Then copy paste the code and put it as:

    RichTextBox1.TextRTF = << Paste here the rtf code from NotePad >>

    You will see the button or the picture box as it is in the MS Word.




    My problem is that i can not understand what is the proper code from all this. It is too big rtf code for only one button!

    Please if you know , please help me
    Short CV:
    1. Visual Basic 6 Programmer
    2. Web Expert


    Botonakis Web Services

  8. #8

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

    Wink

    Thanks Manavo11!



    (Äåí Ý÷ù áêïýóåé íÝá óïõ áðü ôüôå ðïõ óïõ Ýóôåéëá ôï áñ÷åßï ìÝóù email.)
    Short CV:
    1. Visual Basic 6 Programmer
    2. Web Expert


    Botonakis Web Services

  9. #9
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171
    You're welcome

    (Σόρυ που δεν σου έχω στείλει ακόμα αλλά με την σχολή δεν προλαβαίνω καθόλου... Μπαίνω internet μία στις τρείς μέρες Μετακομίζω επίσης Αθήνα τώρα και έχω ακόμα λιγότερο χρόνο...)


    Has someone helped you? Then you can Rate their helpful post.

  10. #10

    Thread Starter
    Hyperactive Member DarkX_Greece's Avatar
    Join Date
    Jan 2004
    Location
    Athens (Greece)
    Posts
    315
    (ΟΚ! Το project που σου είχα στείλει ξέχνα το, έχω δημιουργήσει ένα άλλο, με καινούργιο κώδικα για parsing τα tags,που δουλεύει πάντα! Έχω χάσει το email σου, αν μπορείς στείλτο μου. Που μετακομίζεις στην αθήνα? Σε ποια περιοχή?)

    Thanks all of you!!!!
    Short CV:
    1. Visual Basic 6 Programmer
    2. Web Expert


    Botonakis Web Services

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