IsConnected
Previous  Next

Returns true if a successful connection was created.
Syntax: IsConnected

Example:
Sub App_Start
      Form1.Show
      rapi.New1
      rapi.Connect
      t = now '3 seconds timeout.
      do until rapi.IsConnected = true
            doevents
            if (now - t)/cTicksPerSecond > 3 then
                  msgbox("Cannot connect to device.")
                  appclose
            end if
      loop
      if rapi.DeviceFileExists("\My Documents\MyApp.exe") = true then
            rapi.CopyFileToDevice1(AppPath & "\data.dat","\My Documents")
            rapi.DeviceShell("MyApp.exe","")
      end if
End Sub