help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kirubagari
    New Member
    • Jun 2007
    • 158

    help

    rivate Sub Command2_Click( )
    Dim i As Long

    For i = 1 To mfilesize Step 6

    rich1.Text = rich1.Text & "Before : " & HexByte2Char(ar rByte(i)) & _
    " " & HexByte2Char(ar rByte(i + 1)) & " " _
    & HexByte2Char(ar rByte(i + 2)) & " " _
    & HexByte2Char(ar rByte(i + 3)) & " " & HexByte2Char(ar rByte(i + 4)) & " " & HexByte2Char(ar rByte(i + 5))


    Next
    End Sub
    using this coding the output is nasty.How to make it seperated by line and how to use the scroll box to see the data in the rich text box.what is the coding
  • hariharanmca
    Top Contributor
    • Dec 2006
    • 1977

    #2
    Originally posted by kirubagari
    rivate Sub Command2_Click( )
    Dim i As Long

    For i = 1 To mfilesize Step 6

    rich1.Text = rich1.Text & "Before : " & HexByte2Char(ar rByte(i)) & _
    " " & HexByte2Char(ar rByte(i + 1)) & " " _
    & HexByte2Char(ar rByte(i + 2)) & " " _
    & HexByte2Char(ar rByte(i + 3)) & " " & HexByte2Char(ar rByte(i + 4)) & " " & HexByte2Char(ar rByte(i + 5))


    Next
    End Sub
    using this coding the output is nasty.How to make it seperated by line and how to use the scroll box to see the data in the rich text box.what is the coding

    Can you explain more to get clear, how the design will be?

    Comment

    • kirubagari
      New Member
      • Jun 2007
      • 158

      #3
      actualy when i display the data until end of file size in the rich text box.the result is ok.but it is not clear.all the values not in correct manner.not arrange accordingly.how to use scroll box ,whwn i scroll the data will be dispalyed until end of file.killer 32 where are you

      Comment

      • hariharanmca
        Top Contributor
        • Dec 2006
        • 1977

        #4
        Originally posted by kirubagari
        actualy when i display the data until end of file size in the rich text box.the result is ok.but it is not clear.all the values not in correct manner.not arrange accordingly.how to use scroll box ,whwn i scroll the data will be dispalyed until end of file
        I think you have to change font name to Courier or Courier new, because all other font will not be same in size

        change font in property

        Comment

        • Killer42
          Recognized Expert Expert
          • Oct 2006
          • 8429

          #5
          Using a non-proportional font such as Courier New will probably help with the formatting. You will probably also need to add a linebreak after each section. Just add the built-in constant vbNewLine onto the end of each part. In other words...
          [CODE=vb]Private Sub Command2_Click( )
          Dim i As Long
          For i = 1 To mfilesize Step 6
          rich1.Text = rich1.Text & "Before : " & HexByte2Char(ar rByte(i)) & _
          " " & HexByte2Char(ar rByte(i + 1)) & " " _
          & HexByte2Char(ar rByte(i + 2)) & " " _
          & HexByte2Char(ar rByte(i + 3)) & " " _
          & HexByte2Char(ar rByte(i + 4)) & " " _
          & HexByte2Char(ar rByte(i + 5)) _
          & vbNewLine
          Next
          End Sub[/CODE]

          Comment

          • danp129
            Recognized Expert Contributor
            • Jul 2006
            • 323

            #6
            If loading alot of data into a text box, instead of

            rich1.Text = rich1.Text & "new text"

            consider:

            rich1.seltext = "new text"

            or

            rich1.selstart= len(rich1.text) 'or len(rich1.textr tf)
            rich1.seltext = "new text"

            Comment

            Working...