Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: New to VB Express How do i work with Dll's  (Read 10997 times)

0 Members and 1 Guest are viewing this topic.

macdad-

    Topic Starter


    Expert

    Thanked: 40
    Re: New to VB Express How do i work with Dll's
    « Reply #15 on: February 11, 2008, 02:17:38 PM »
    1. but how do i find out what usb port # its on?
    If you dont know DOS, you dont know Windows...

    Thats why Bill Gates created the Windows NT Family.

    Bones92



      Hopeful

    • Website Designer and Microcontroller Programmer
    • Thanked: 3
      • PIC Programming New Zealand
    • Computer: Specs
    • Experience: Experienced
    • OS: Windows 7
    Re: New to VB Express How do i work with Dll's
    « Reply #16 on: February 11, 2008, 08:37:50 PM »
    It won't be port 1, i'm not sure what that is, i was just using an example. I don't actually know, nor do I know how to find out... maybe someone else knows how to find out?

    macdad-

      Topic Starter


      Expert

      Thanked: 40
      Re: New to VB Express How do i work with Dll's
      « Reply #17 on: February 12, 2008, 05:25:26 PM »
      ok i change the number to many times and still i get the same error message.
      If you dont know DOS, you dont know Windows...

      Thats why Bill Gates created the Windows NT Family.

      Bones92



        Hopeful

      • Website Designer and Microcontroller Programmer
      • Thanked: 3
        • PIC Programming New Zealand
      • Computer: Specs
      • Experience: Experienced
      • OS: Windows 7
      Re: New to VB Express How do i work with Dll's
      « Reply #18 on: February 12, 2008, 11:29:09 PM »
      Code: [Select]
      Imports LEGOVPBrickLib

      Public Class Form1
          Const MyPort As Integer = 1 'change this to your usb port

          Private Sub SendBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SendBtn.Click
              Static LegoThing As New LEGOVPBrickLib.VPBrick '*new* was needed
              Try
                  LegoThing.Open(MyPort.ToString)
                  LegoThing.Download(SendTxtBox.Text)
              Catch ex As Exception
                  MsgBox("Error: " & ex.Message, MsgBoxStyle.Critical, "An error has occured.")
              End Try
          End Sub
      End Class

      I tried this on my computer but I believe your dll needs a heck of a lot of code to interface with it as it was returning a COMException and an InnerException, which means I need to dissassemble the dll to know what to send to it, which takes a very long time and is incredibly difficult. I could try, but
      1: without the mindstorms set I have no way of testing it and
      2: it would take me at least 2 weeks, probably 3 to write the code.

      Is there a manual that comes with your mindstorms set which tells you how it can work? Or a ReadMe that came with the dll? Anything at all that came that can give me a headstart?

      macdad-

        Topic Starter


        Expert

        Thanked: 40
        Re: New to VB Express How do i work with Dll's
        « Reply #19 on: February 13, 2008, 06:03:04 AM »
        the help file that came with the dll is to large can i send it to u by email?
        If you dont know DOS, you dont know Windows...

        Thats why Bill Gates created the Windows NT Family.

        Bones92



          Hopeful

        • Website Designer and Microcontroller Programmer
        • Thanked: 3
          • PIC Programming New Zealand
        • Computer: Specs
        • Experience: Experienced
        • OS: Windows 7
        Re: New to VB Express How do i work with Dll's
        « Reply #20 on: February 13, 2008, 09:11:57 PM »
        Feel free. I will PM you my email.

        Bones92



          Hopeful

        • Website Designer and Microcontroller Programmer
        • Thanked: 3
          • PIC Programming New Zealand
        • Computer: Specs
        • Experience: Experienced
        • OS: Windows 7
        Re: New to VB Express How do i work with Dll's
        « Reply #21 on: February 17, 2008, 08:44:58 PM »
        I'm very sorry, but It just won't work, no matter what I do. Do you know anybody who has successfully communicated with the set? You may have to ask them how its done.

        I even tried and online "example" - it returned 57 errors.

        Here is a link to a sample I found - its VB6, however

        http://news.lugnet.com/robotics/?n=23464

        Once again, I am very sorry.

        macdad-

          Topic Starter


          Expert

          Thanked: 40
          Re: New to VB Express How do i work with Dll's
          « Reply #22 on: February 18, 2008, 09:15:46 AM »
          its ok thank you for trying.
          If you dont know DOS, you dont know Windows...

          Thats why Bill Gates created the Windows NT Family.