Results 1 to 3 of 3

Thread: I asked this before but I forgot

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    I'm making an ocx with 1 textbox and after I put that ocx into my program, I want to be able to change the font, fore color, back color, etc. of that text box, no how do I make it so that from the program i can go

    Ocx1.

    then have Text1 appear in the list so then I do

    Ocx1.Text.

    then have a list appear with all the functions for that text box


    I hope I was clear


    thanks in advance
    NXSupport - Your one-stop source for computer help

  2. #2
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    You don't. You will need to create properties in your ActiveX control that pass the value to your Textbox's Text property. Like:

    Code:
    Public Property Get Text() As String
    Attribute Text.VB_Description = "Returns/sets the text contained in an object."
        Text = Text1.Text
    End Property
    
    Public Property Let Text(ByVal New_Text As String)
        Text1.Text() = New_Text
        PropertyChanged "Text"
    End Property

    You will need to do this sort of thing for most of the properties of the Textbox except once that are ambient properties such as left, top, width, height, etc..

    There is a wizard in VB6 that will allow you to select the properties of the controls within your control to be included in your control's properties.


    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

  3. #3
    Member
    Join Date
    Jul 2000
    Location
    Singapore
    Posts
    39

    http://www.vb-world.net/activex/articles.html

    You can refer to this article for more information on creating ActiveX componen.

    http://www.vb-world.net/activex/articles.html
    ThOmaS TaN

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