I've just downloaded Basic4ppc and taking it for a trial spin and having a few "basic" problems and looking for help.
I'm on the trial license so running from within the IDE.
All I want my little program to do from the Desktop is to connect to my Device, then launch a Pocket Excel File "\My Documents\My Documents\Power.xlsx"
Having browsed the online help for most of my code, I have been told to use rapi.deviceshell(program,file) but this is not a selectable function when I type rapi.
So when I use it, I get the error saying it is an invalid property of rapi.
I see a rapi.CreateProcess(program,file), but when I use it, it complains that there is "No Connected device", but there is.....?
What am I supposed to use?
Sub Globals
End Sub
Public Sub Connect_To_Device
Sub App_Start
I have declared "rapi" as an Object of type RAPI. I have included the RAPIDesktop and the OpenNetCF..... Components in the IDE.
Thanks
Ian.
[EDIT]
Confused - I just closed the IDE, undocked my phone, (HTC Touch HD), waited a second or two until Vista 64bit Ultimate detected the device removed, re-docked it, re-launched the IDE, and ran the program with the rapi.CreateProcess("pxl","\My Documents\My Documents\Power.xlsx") and bingo it launched on the device! I then closed Excel on my Phone and re-ran the program and then got the error: "No Connected Device. The requested lookup ley was not found in any active activation contect." But I still got my msgbox("Connected") displayed saying I was connected!?
I'm on the trial license so running from within the IDE.
All I want my little program to do from the Desktop is to connect to my Device, then launch a Pocket Excel File "\My Documents\My Documents\Power.xlsx"
Having browsed the online help for most of my code, I have been told to use rapi.deviceshell(program,file) but this is not a selectable function when I type rapi.
So when I use it, I get the error saying it is an invalid property of rapi.
I see a rapi.CreateProcess(program,file), but when I use it, it complains that there is "No Connected device", but there is.....?
What am I supposed to use?
Sub Globals
End Sub
Public Sub Connect_To_Device
rapi.New1
rapi.Connect2(False)
t=Now
Do Until rapi.Connected
Msgbox("Connected!")
rapi.deviceshell("pxl","\My Documents\My Documents\Power.xlsx")
' rapi.CreateProcess("pxl","\My Documents\My Documents\Power.xlsx")
End Subrapi.Connect2(False)
t=Now
Do Until rapi.Connected
DoEvents
If (Now - t)/cTicksPerSecond>3 Then
LoopIf (Now - t)/cTicksPerSecond>3 Then
Msgbox("Can not get connected")
End If
Msgbox("Connected!")
rapi.deviceshell("pxl","\My Documents\My Documents\Power.xlsx")
' rapi.CreateProcess("pxl","\My Documents\My Documents\Power.xlsx")
Sub App_Start
main.Connect_To_Device
End Sub
I have declared "rapi" as an Object of type RAPI. I have included the RAPIDesktop and the OpenNetCF..... Components in the IDE.
Thanks
Ian.
[EDIT]
Confused - I just closed the IDE, undocked my phone, (HTC Touch HD), waited a second or two until Vista 64bit Ultimate detected the device removed, re-docked it, re-launched the IDE, and ran the program with the rapi.CreateProcess("pxl","\My Documents\My Documents\Power.xlsx") and bingo it launched on the device! I then closed Excel on my Phone and re-ran the program and then got the error: "No Connected Device. The requested lookup ley was not found in any active activation contect." But I still got my msgbox("Connected") displayed saying I was connected!?
Last edited: