ListBox Control

  • 15 years ago
    Hi i need some help on getting the script to follow a Line inside a Text Box...

    Example:

    Image first than i will follow the code behind it..


    http://exodus.nerogames.net/colornamescript.jpg

    form1

    Code:

    Dim oColor As New picColor
    Private Sub Command1_Click()
    On Error GoTo Err_Handler
    lblName.Caption = Text1.Text
    With cd1
       .Flags = cdlOFNReadOnly + cdlOFNOverwritePrompt
       .FileName = ""
       .Filter = "Name CFG(*.cfg)|*.cfg|"
       .ShowSave
    End With
    Open cd1.FileName For Output As #1
    Print #1, Text1.Text
    Close #1

    Err_Handler:
       Exit Sub
    End Sub

    Private Sub picBlack_Click()
    Text1.Text = oColor.Ten
    End Sub

    Private Sub picBlue_Click()
    Text1.Text = oColor.Four
    End Sub

    Private Sub picCyan_Click()
    Text1.Text = oColor.Five
    End Sub

    Private Sub PicDPurple_Click()
    Text1.Text = oColor.Eight
    End Sub

    Private Sub picGray_Click()
    Text1.Text = oColor.Nine
    End Sub

    Private Sub picGreen_Click()
    Text1.Text = oColor.Two
    End Sub

    Private Sub picMagneto_Click()
    Text1.Text = oColor.Six
    End Sub

    Private Sub picRed_Click()
    Text1.Text = oColor.One
    End Sub

    Private Sub picWhite_Click()
    Text1.Text = oColor.Seven
    End Sub

    Private Sub picYellow_Click()
    Text1.Text = oColor.Three
    End Sub


    Class Module

    Code:

    Public stringOne As String
    Public stringTwo As String
    Public stringThree As String
    Public stringFour As String
    Public stringFive As String
    Public stringSix As String
    Public stringSeven As String
    Public stringEight As String
    Public stringNine As String
    Public stringTen As String

    Public Property Get One()
    One = Chr(94) & Chr(49)
    End Property

    Public Property Get Two()
    Two = Chr(94) & Chr(50)
    End Property

    Public Property Get Three()
    Three = Chr(94) & Chr(51)
    End Property

    Public Property Get Four()
    Four = Chr(94) & Chr(52)
    End Property

    Public Property Get Five()
    Five = Chr(94) & Chr(53)
    End Property

    Public Property Get Six()
    Six = Chr(94) & Chr(54)
    End Property

    Public Property Get Seven()
    Seven = Chr(94) & Chr(55)
    End Property

    Public Property Get Eight()
    Eight = Chr(94) & Chr(56)
    End Property

    Public Property Get Nine()
    Nine = Chr(94) & Chr(57)
    End Property

    Public Property Get Ten()
    Ten = Chr(94) & Chr(48)
    End Property


    some of the code is not being used atm. but when i click on a pictureBox with an object it will fire and show the chr() information, but when i click on another picturebox that has a different color box it will overlap the chr() it will not provide a line of picturebox code in the textbox.

    it should look like this...

    ^1[^2FC^2]^1^6MaDDoG

    but it will show in the textbox
    ^1 or ^2 and so on... then when i just type in ^1The it will clear the whole textbox if i click on the picturebox control...

    if this is hard to understand let me know

    Wildturkey
  • 15 years ago

    I think you are trying to append the text in text box.


    Replace


    Text1.Text = xxxxx


    With


    Text1.Text = Text1.Text & xxxxx


    Where


    xxxx = oColor.Four


    or


    xxxx = oColor.One


    etc. etc.

  • 15 years ago

    Quote:
    [1]Posted by sallu_shan on 19 Dec 2005 07:59 AM[/1]
    I think you are trying to append the text in text box.


    Replace


    Text1.Text = xxxxx


    With


    Text1.Text = Text1.Text & xxxxx


    Where


    xxxx = oColor.Four


    or


    xxxx = oColor.One


    etc. etc.



    That was simple thanks bro. it is fixed now.

  • 15 years ago

    dsfdfsdfdg fdfdf

  • 15 years ago

    dsfdfsdfdg fdfdf

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“There are 10 types of people in the world, those who can read binary, and those who can't.”