Results 1 to 3 of 3

Thread: How do I incorporate modules?

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2005
    Posts
    2

    How do I incorporate modules?

    Hi
    I have detailed below a simple vb program which is part of a vb.exe . I wish to use in a vb script which I can use in some HA software.
    My question is how can I query the dll without the module?

    module code
    VB Code:
    1. Option Explicit
    2. Declare Function Initreceivep6 Lib "socket.dll" Alias "receivep6" () As Long
    3. Declare Function Datatransfer Lib "socket.dll" Alias "transfer" (ByVal variable As Long) As Long
    4. Declare Function Setdata Lib "socket.dll" Alias "setdata" (ByVal variable As Long) As Long
    5. Declare Function Cleandata Lib "socket.dll" Alias "cleandata" (ByVal variable As Long) As Long
    6. Declare Sub Setip Lib "socket.dll" Alias "setip" (ByVal variable As String)

    vb form code
    VB Code:
    1. Option Explicit
    2. Dim Ipset
    3.  
    4. Private Sub Command10_Click()
    5. Command10.Visible = False
    6. Command18.Visible = True
    7. Label1.Visible = True
    8. Ipset = Setdata(&H40)
    9. Ipset = Datatransfer(Ipset)
    10. End Sub
    11.  
    12. Private Sub Command11_Click()
    13. Command11.Visible = False
    14. Command19.Visible = True
    15. Label2.Visible = True
    16. Ipset = Setdata(&H80)
    17. Ipset = Datatransfer(Ipset)
    18. End Sub
    19.  
    20. Private Sub Command18_Click()
    21. Command10.Visible = True
    22. Command18.Visible = False
    23. Label1.Visible = False
    24. Ipset = Cleandata(&HBF)
    25. Ipset = Datatransfer(Ipset)
    26. End Sub
    27.  
    28. Private Sub Command19_Click()
    29. Command11.Visible = True
    30. Command19.Visible = False
    31. Label2.Visible = False
    32. Ipset = Cleandata(&H7F)
    33. Ipset = Datatransfer(Ipset)
    34. End Sub
    35.  
    36. Private Sub Form_Load()
    37. Dim P6
    38. Setip "192.168.1.25"
    39.  
    40. P6 = Initreceivep6
    41.  
    42. If (P6 And &H40) Then
    43.     Command10.Visible = False
    44.     Command18.Visible = True
    45.     Setdata (&H40)
    46. 'value =64
    47.  
    48. Else
    49.     Command10.Visible = True
    50.     Command18.Visible = False
    51.     Cleandata (&HBF)
    52. End If
    53. If (P6 And &H80) Then
    54.     Command11.Visible = False
    55.     Command19.Visible = True
    56.     Setdata (&H80)
    57. Else
    58.     Command11.Visible = True
    59.     Command19.Visible = False
    60.     Cleandata (&H7F)
    61. End If
    62.  
    63. If (P6 And &HB40) Then
    64.     Label1.Visible = True
    65. Else
    66.     Label1.Visible = False
    67.     Cleandata (&HBF)
    68. End If
    69.  
    70. If (P6 And &HB80) Then
    71.     Label2.Visible = True
    72. Else
    73.     Label2.Visible = False
    74.     Cleandata (&H7F)
    75. End If
    76.  
    77. End Sub


    I wish to remove need for graphics and in the vb script use
    SetPropertyValue() fed to a device in the program.

    ie If (P6 And &HB80) Then
    SetPropertyValue(X)

    Any ideas anyone
    Last edited by si_the_geek; Dec 15th, 2005 at 06:44 PM. Reason: added VBCode tags

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