How to use the Phone library (dll) in V6.90

apstrojny2

Member
Licensed User
Longtime User
I'm sure it is a simple problem... I'm trying to use the phone library to dial the phone from a table stored phone number... So just to try something I clicked Help -> Libraries Help -> phone and cut and pasted the phone example in to Basic4PPC... I created Form1 made the 3 text boxes just like it said and when I try to run it I get:

'Error Compiling program.
Error Description: Phone is not a known control or object...
Occurred in line 9
Phone.New1("Form1")

OK so the I added tools -> components -> phone.dll to device and phonedesktop.dll to desktop... I got the same error...

Next I tools -> Add Object -> Phone and called it New1 as in the example...
So it shows up under Objects New1 Phone... I got the same error...


I have included the example from the help for your review... I am not sure what is going on or what to do?

Thanks
Andy


Software Phone example from Phone Library Help below...


The Phone library allows you to take advantage of phone enabled devices.
It includes the Call method which initiates phone calls and several phone related events.
This library is only supported on WM5.0 and WM6.0 phone enabled devices.
WM5.0 devices should install .Net CF 2.0 and follow these instructions:
Basic4ppc - Windows Mobile programming and Pocket PC Development.
For older devices you could use the PhoneLib library which was created by a Basic4ppc user and is available for download on the forum.


Example:
'Phone is a Phone object.
'First create a form and add three TextBoxes

Sub Globals
End Sub

Sub App_Start
Form1.Show
Phone.New1("Form1")
End Sub

Sub phone_IncomingCall
TextBox2.Text = phone.IncomingNumber
End Sub

Sub phone_TalkingStart
textbox1.Text = phone.CurrentCallNumber
textbox3.Text = "Call start"
End Sub

Sub phone_TalkingEnd
textBox3.Text = "Call ended"
End Sub
 

agraham

Expert
Licensed User
Longtime User
Next I tools -> Add Object -> Phone and called it New1 as in the example
For the example it should be called Phone although I personally don't like giving objects the same name as their class name in the library as it can cause confusion - like in this case!
 
Top