RobotStudio event

Example 1 (pc SDK 5.06)

Hello Robotic Engineers,

I started with the first example for a robot pc SDK application called (Scanning Network Application) I have a few questions about this (Simple) excersize.

Problem 1: Add a new Window Form Called "BasicControllerForm".

I can not find this Form, I can only start with Form1

Problem 2: Where must I place the Function CallSampleCode()

Can someone give me an answer to this question and please post this complete excersize so that I can check if I am on the right track.

Problem 3: Where do I place <MTAThread()?

If I fill in BasicControllerForm (Problem 1) is not recognized.

Can someone give me an answer to this question and please post this complete excersize (Project) so that I can check if I am on the right track.

With Best Regard,

The Visual Basic dummy.

NetworkScanApp.zip

This is My Project....image !!

 

Comments

  • 1. You need to change the Name property of Form1 to "BasicControllerForm". When a new form is added to a project, by default it will be named Form1, Form2, etc., depending on what forms already exist in the project. It is not required but considered good practice to give your objects, i.e. forms, descriptive names rather than to use the default name.

    2. Add the following code at the "end" of your class file, i.e. after all of the automatically generated code and before the 'End Class' statement.

           Function CallSampleCode()

                  'do work here

           End Function

    3. You simply need to add the following code at the "end" of your class file, i.e. after all of the automatically generated code and before the 'End Class' statement

    <MTAThread()> Shared Sub Main()

          Application.Run(...)

    End Sub

     

     

    Russell Drown
  • Thank you very much for your quick reaction.

    Can I ask you a few more questions:

    - Underneath the example stands the words "Save and Compile", Is this the same as " Start debug" ?

    - When I start this program from C:EdwinPc SDKOefening 1 (Sanning Network)NetworkScanAppinNetworkScanApp.exe (Green = path, Blue is Example1.EXE) will it scan for I robot when I connect it to a Virtual IRC or Real IRC??

    Thanks, 

  • Hello,

     

    Save means press the save button, compile is menu build->build solution

     

    :) Regards,
    Jan-Jaap