VB Help


Closed Thread
Results 1 to 36 of 36

Thread: VB Help

Hybrid View

  1. #1
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default Re: VB Help

    Hot Dog!! Thanks again, I feel proud

    new function:
    Code:
    PublicFunction CreateSWord(ByVal data1 AsByte, ByVal data2 AsByte) AsString
      Dim t AsUShort
      Dim sign AsString
    
         t = (data1 * 256) + data2
         If t > 32767 Then
            t = (Not t) + 1
            sign = "-"
         Else
            sign = " "
         EndIf
    Return (sign & t.ToString)
    EndFunction
    And how to get there:
    Code:
    gxhb.Text = CreateSWord(data(0), data(1))
    gyhb.Text = CreateSWord(data(2), data(3))
    gzhb.Text = CreateSWord(data(4), data(5))
    axhb.Text = CreateSWord(data(6), data(7))
    ayhb.Text = CreateSWord(data(8), data(9))
    azhb.Text = CreateSWord(data(10), data(11))
    cxhb.Text = CreateSWord(data(12), data(13))
    cyhb.Text = CreateSWord(data(14), data(15))
    czhb.Text = CreateSWord(data(16), data(17))

    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default Re: VB Help

    See how easy it is now huh?

    Well done!
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts