Results 1 to 2 of 2

Thread: please help with user control

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 1999
    Location
    San Antonio,TX,USA
    Posts
    26

    Post

    I created a simple user control with a richtextbox in it

    now how on earth do i get the control to act like a richtextbox and let me open a file in it?

    [This message has been edited by Gandor (edited 11-26-1999).]

  2. #2
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845

    Post

    You need to add a Public Sub to the userControl which maps to the Richtextbox

    eg. in the usercontrol:

    Code:
    Public Sub LoadFile(strFile As String)
      RichTextBox1.LoadFile strFile
    End Sub

    then in the client program:

    Code:
    Private Sub Command1_Click()
    UserControl11.LoadFile "C:\test.rtf"
    End Sub
    Does this help?


    ------------------
    Mark Sreeves
    Analyst Programmer

    [email protected]
    A BMW Group Company


    [This message has been edited by Mark Sreeves (edited 11-26-1999).]

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