الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

كيف يمكن الاتصال بالهاتف بواسطة كود فيجول بيسك 6 ؟؟؟

مغلق
بدأه amaz في 23 أبريل 2007 · 0 رد · 808 مشاهدة · في لغة Ms Visual Basic 6 وما قبلها من إصدارات
مشاركة: واتساب X فيسبوك تيليجرام
#1

السلام عليكم ورحمة الله وبركاته

هذا الكود يمكن المستخدم من الاتصال بالهاتف عن طريق ادخال الرقم المطلوب الاتصال به في text

ثم يتم الضغط على command من اجل عمل الاتصال ..

لكن هذا الكود فيه مشكلة لأنه لايتصل بالفعل

ياليت تطلعون عالكود واذا في أحد يقدر يعدله أو يشرح الكود بأكون شااااااااااكرة لكم

ولكم مني جزيل الشكر :)

Private Declare Function tapiRequestMakeCall& Lib "TAPI32.DLL" (ByVal DestAddress$, ByVal AppName$, ByVal CalledParty$, ByVal Comment$)
Private Const TAPIERR_NOREQUESTRECIPIENT = -2&
Private Const TAPIERR_REQUESTQUEUEFULL = -3&
Private Const TAPIERR_INVALDESTADDRESS = -4&


Private Sub cmdDial_Click()
num = txtNumber.Text
If Len(num) >= 7 Then
	EnableDial
	Else
	MsgBox "please you have enter more than 7 numbers"
	txtNumber.Text = ""
	Exit Sub
	End If
	Dim buff As String
	Dim nResult As Long

	'Invoke tapiRequestMakeCall. If tapiRequestMakeCall returns 0, the
	'request has been accepted. It is up to the call manager application
	'to do any further work. The second-to-last argument should be
	'changed to be the name of the person you are dialing.
	nResult = tapiRequestMakeCall&(Trim$(txtNumber), CStr(Caption), "Test Dial", "")
	'Display message if error
	If nResult <> 0 Then
		buff = "Error dialing number : "
		Select Case nResult
			Case TAPIERR_NOREQUESTRECIPIENT
				buff = buff & "No Windows Telephony dialing application is running and none could be started."
			Case TAPIERR_REQUESTQUEUEFULL
				buff = buff & "The queue of pending Windows Telephony dialing requests is full."
			Case TAPIERR_INVALDESTADDRESS
				buff = buff & "The phone number is not valid."
			Case Else
				buff = buff & "Unknown error."
		End Select
		MsgBox buff
	End If
End Sub

Private Sub cmdExit_Click()
	Unload Me
End Sub



Private Sub Form_Load()

	Move (Screen.Width - Width) \ 2, (Screen.Height - Height) \ 2
	EnableDial

End Sub

Private Sub txtNumber_Change()

	EnableDial

End Sub

Private Sub EnableDial()
	cmdDial.Enabled = Len(Trim(txtNumber)) > 0
End Sub

هذا الموضوع مغلق.

مواضيع مشابهة

عدد الزوار حالياً

المتواجدون خلال آخر دقيقتين · يتحدّث كل ٣٠ ثانية

—الإجمالي—أعضاء مسجّلون—زوار بدون تسجيل

جارٍ التحقق من المتواجدين…