Anybody can translate this for me?

Discussion in 'C Programming' started by ezzyrul, Nov 25, 2014.

  1. ezzyrul

    ezzyrul

    Joined:
    Nov 25, 2014
    Messages:
    2
    Likes Received:
    0
    i'm using visual studio and trying to understanding this coding. is there anybody could translate this for me??

    Begin VB.Form Form1
    Caption = "Demo"
    ClientHeight = 3570
    ClientLeft = 60
    ClientTop = 450
    ClientWidth = 6315
    LinkTopic = "Form1"
    ScaleHeight = 3570
    ScaleWidth = 6315
    StartUpPosition = 3 'Windows Default
    Begin VB.ComboBox cbCOM
    Height = 315
    ItemData = "Form1.frx":0000
    Left = 1560
    List = "Form1.frx":005E
    TabIndex = 10
    Top = 360
    Width = 1455
    End
    Begin VB.CommandButton Command1
    Caption = "OpenCOM"
    Height = 495
    Left = 120
    TabIndex = 9
    Top = 240
    Width = 1215
    End
    Begin VB.TextBox Text3
    Height = 285
    Left = 1560
    TabIndex = 8
    Top = 1080
    Width = 615
    End
    Begin VB.TextBox Text2
    Height = 285
    Left = 1560
    TabIndex = 6
    Top = 3000
    Width = 3855
    End
    Begin VB.TextBox Text1
    Height = 735
    Left = 1560
    MultiLine = -1 'True
    TabIndex = 3
    Top = 1800
    Width = 4695
    End
    Begin VB.CommandButton cmdInventory
    Caption = "Inventory / Scan Tag"
    Height = 495
    Left = 120
    TabIndex = 2
    Top = 2040
    Width = 1215
    End
    Begin VB.CommandButton cmdVerNo
    Caption = "Ver No."
    Height = 495
    Left = 120
    TabIndex = 1
    Top = 840
    Width = 1215
    End
    Begin VB.CommandButton cmdRFOnOff
    Caption = "RF On"
    Height = 495
    Left = 120
    TabIndex = 0
    Top = 1440
    Width = 1215
    End
    Begin VB.Label Label3
    Caption = "RxData Byte"
    Height = 255
    Left = 1560
    TabIndex = 7
    Top = 840
    Width = 1455
    End
    Begin VB.Label Label2
    Caption = "Tag UID"
    Height = 255
    Left = 1560
    TabIndex = 5
    Top = 2760
    Width = 615
    End
    Begin VB.Label Label1
    Caption = "RxD"
    Height = 255
    Left = 1560
    TabIndex = 4
    Top = 1560
    Width = 1095
    End
    End
    Attribute VB_Name = "Form1"
    Attribute VB_GlobalNameSpace = False
    Attribute VB_Creatable = False
    Attribute VB_PredeclaredId = True
    Attribute VB_Exposed = False
    Option Explicit
    Private Type RespInventory
    Res As Byte
    DSFID As Byte
    UID(7) As Byte
    End Type

    Private Type RespInventoryRead
    Res As Byte
    UID(7) As Byte
    Data(3, 3) As Byte
    End Type




    Private Sub cmdInventory_Click()
    Dim bytMask(7) As Byte
    Dim iLen As Integer
    Dim bytResp(15) As RespInventory
    Dim i As Integer
    Dim s As String
    Dim TagID As String
    Dim i2 As Integer

    bytMask(0) = 8
    For i = 1 To 7
    bytMask(i) = 0
    Next

    Res = EMR300_Inventory(&H26, 0, 0, bytMask(0), iLen, bytResp(0).Res)
    If Res = RES_OK Then
    For i = 0 To 0

    s = s & Right("0" & Hex(bytResp(i).Res), 2) & " " & Right("0" & Hex(bytResp(i).DSFID), 2) & " "
    For i2 = 0 To 7
    s = s & Right("0" & Hex(bytResp(i).UID(i2)), 2) & " "
    Next
    For i2 = 7 To 0 Step -1
    TagID = TagID & Right("0" & Hex(bytResp(i).UID(i2)), 2) & " "
    Next
    Next
    Me.Text1.Text = s
    Me.Text2.Text = TagID
    Me.Text3.Text = iLen
    End If
    End Sub



    Private Sub cmdRFOnOff_Click()
    If Me.cmdRFOnOff.Caption = "RF On" Then
    Res = EMR300_RFControl(1)
    If Res = RES_OK Then
    Me.cmdRFOnOff.Caption = "RF Off"
    End If
    Else
    Res = EMR300_RFControl(0)
    If Res = RES_OK Then
    Me.cmdRFOnOff.Caption = "RF On"
    End If
    End If
    End Sub

    Private Sub cmdVerNo_Click()

    Dim iLen As Integer
    Dim bytStr(22) As Byte
    Dim i As Integer
    Dim s As String

    Res = EMR300_ReadVer(iLen, bytStr(0))
    If Res = RES_OK Then
    For i = 0 To iLen - 1
    s = s & Hex(bytStr(i)) & " "
    Next
    Me.Text1.Text = s
    Me.Text3.Text = iLen
    End If
    End Sub

    Private Sub Command1_Click()
    Res = EMR300_ComOpen(cbCOM.ListIndex + 1)
    End Sub

    Private Sub Form_Load()
    cbCOM.ListIndex = 0
    End Sub
     
    ezzyrul, Nov 25, 2014
    #1
    1. Advertisements

  2. ezzyrul

    old-student

    Joined:
    Mar 22, 2015
    Messages:
    7
    Likes Received:
    2
    Location:
    SE Washington
    You are looking at a form generator in Visual Basic. I am not a VB programmer but I can pick out some of it. Why do you want it translated and into what language?
     
    old-student, Mar 23, 2015
    #2
    InfinitelyBC likes this.
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Fabrizio Maccarrone

    How can I translate this from classic asp?

    Fabrizio Maccarrone, Jul 21, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    2,464
    Ben Lucas
    Jul 21, 2004
  2. aaa
    Replies:
    2
    Views:
    528
  3. Kylin
    Replies:
    6
    Views:
    4,321
    =?Utf-8?B?RGF2aWQgQW50b24=?=
    May 19, 2005
  4. bobueland@yahoo.com

    Where can I find string.translate source?

    bobueland@yahoo.com, Nov 20, 2005, in forum: Python
    Replies:
    3
    Views:
    497
    bobueland@yahoo.com
    Nov 20, 2005
  5. Henning

    Translate but can not C

    Henning, Jul 17, 2004, in forum: C Programming
    Replies:
    6
    Views:
    420
    Keith Thompson
    Jul 19, 2004
  6. Sam Roberts
    Replies:
    5
    Views:
    265
    Martin DeMello
    Jan 31, 2005
  7. wnjayantha@yahoo.com

    Can some one help to translate Python code to Perl?

    wnjayantha@yahoo.com, Jan 23, 2007, in forum: Perl Misc
    Replies:
    2
    Views:
    423
    John Bokma
    Jan 23, 2007
  8. PerlFAQ Server
    Replies:
    0
    Views:
    240
    PerlFAQ Server
    Jan 28, 2011
Loading...