السلام على من اتبع الهدى
أخواني محتاج مساعدتكم في فهم بعض الشيفرات
ما هي oncomm ؟ وفي ما تستخدم وقد عرفت أنها مرتبطة بـ AFserial وما هي هذه الأخرى؟؟
وهل يتكرم أحدكم ويشرح لي هذا الكود
'Create a buffer for the input string Dim Instring As String Private Sub Form_Load() #if APPFORGE then 'On Palm use cradle port SerialExample.CommPort = 32768 #else 'In Windows use the COM1 port SerialExample.CommPort = 1 #end if '9600 baud, no parity, 8 data, 1 stop SerialExample.Settings = "9600,N,8,1" 'On Input, read the whole buffer SerialExample.InputLen = 0 'Open the serial port SerialExample.PortOpen = True 'Fire OnComm as each character arrives SerialExample.RThreshold = 1 End Sub Private Sub SerialExample_OnComm() Select Case SerialExample.CommEvent Case afSerialEventReceive ' Append all incoming data to Instring While SerialExample.InBufferCount > 0 Instring = Instring & SerialExample.Input Wend Case afSerialEventBreak ' Break character detected Case afSerialEventFrame ' framing error detected Case afSerialEventParity ' parity error detected Case afSerialEventOverrun ' receiver overrun, data has been lost End Select End Sub
وجزاكم الله خيرا