473,405 Members | 2,176 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Sending 2 integer to Mscomm1

my GUI using VB6.0 had 2 textbox to allow user enter an integer that represent X and Y axes. there is any possible that i can send 2 data simultenously? do i need a delay? for your information, i used serial port. thank you VB genius. a feedback is really appreciated!
Mar 25 '08 #1
2 1424
debasisdas
8,127 Expert 4TB
Can you kindly post your code for reference of our experts please.
Mar 25 '08 #2
thanks for replying,sir. this is my source code for sending 2 integer.

Private Sub Form_Load()
Dim Xvalue As Long
Dim Yvalue As Long

For Xvalue = 0 To 15
cboXvalue.AddItem CStr(Xvalue)
Next Xvalue


cboXvalue.ListIndex = 0

For Yvalue = 0 To 15
cboYvalue.AddItem CStr(Yvalue)
Next Yvalue


cboYvalue.ListIndex = 0

MSComm1.CommPort = 1


MSComm1.Settings = "9600,N,8,1"


MSComm1.DTREnable = False


MSComm1.PortOpen = True

End Sub

Private Sub cmdSend_Click()
Dim Xvalue As Long
Dim Yvalue As Long


Xvalue = cboXvalue.ListIndex
Yvalue = cboYvalue.ListIndex


MSComm1.Output = Chr$(255) & Chr$(Xvalue) & Chr$(Yvalue)

End Sub
Private Sub Form_Unload(Cancel As Integer)
MSComm1.PortOpen = False
End Sub

in your opinion, there should be delay between sending Xvalue and Yvalue? i am afraid my PIC circuit cannot detect and differentiate between X and Y value?
i really need your opinion, sir...
thanks
Mar 26 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Winston Nimchan | last post by:
Hi: I'm currently developing a socket application and would like to precede the data being sent with a 4 byte message length header (bin4). Can anyone help Regards Winston
0
by: PJ | last post by:
I have the following code snippet to send a file stored as an image data type from sql server: Protected Sub StreamFile(ByVal fileItem As MyFile) Dim offset As Integer Dim buffer As Integer =...
1
by: roni | last post by:
hi. i hope i will be clear here, i want to know ,what method i need to use in the asp.net for minimal process,to send only 1 integer to the client.(its just example). what i mean is, i dont...
0
by: zurg | last post by:
Hi! I have a problem with sending a custom command to a windows service i wrote before. If I use ControlService it works perfectly - the service send an answear... but when I use WMI there's no...
1
by: Dinesh Jain | last post by:
Hi all, File.Delete(fileName) causes file to be deleted permanently. How to send it to Recycle bin? Please help, Thanks in advance, -Regards, Dinesh
1
by: Henk | last post by:
Hi, I have a problem with sending a file. I have a client application that connects to a server and sends the string "data". Then it sends a file. If the server receives "data", the method...
5
by: Sameh Ahmed | last post by:
Hello there how do I send a mouse click to a specific set of coordinates in the desktop? what do I need to search for? any info is greatly appreciated. Regards Sameh
3
by: notregister | last post by:
Hi would i like to send string of PCL codes to a Printer which i have the IP address, how do i send it? i'm currently using TCPclient class, but it could not work, as the printer would just...
6
by: Anuradha | last post by:
Dear All How can i send mails using vb.net Thanx all
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.