473,666 Members | 1,992 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Sending 2 integer to Mscomm1

12 New Member
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 1430
debasisdas
8,127 Recognized Expert Expert
Can you kindly post your code for reference of our experts please.
Mar 25 '08 #2
maharajakecil
12 New Member
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.AddIt em CStr(Xvalue)
Next Xvalue


cboXvalue.ListI ndex = 0

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


cboYvalue.ListI ndex = 0

MSComm1.CommPor t = 1


MSComm1.Setting s = "9600,N,8,1 "


MSComm1.DTREnab le = False


MSComm1.PortOpe n = True

End Sub

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


Xvalue = cboXvalue.ListI ndex
Yvalue = cboYvalue.ListI ndex


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

End Sub
Private Sub Form_Unload(Can cel As Integer)
MSComm1.PortOpe n = 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
3119
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
3934
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 = 8192 Dim textPtr As System.Data.SqlTypes.SqlBinary = MyFactory.GetFilePtr(fileItem.ID, FileScale.Original) Response.Clear()
1
955
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 want to send page,and i dont want the server will load page to send only 1 integer back. so,what is the first method in server, i can implement, to imediatly return 1 integer back ?
0
1125
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 reaction... Thanks in advance The code look like this: Option Explicit On
1
1282
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
1831
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 getCsv() is started (this receives the file) The file however isn't received completely (most of the time) this is my servercode:
5
2828
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
6401
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 hang... pls help me...
6
2740
by: Anuradha | last post by:
Dear All How can i send mails using vb.net Thanx all
0
8445
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8356
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8871
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
7386
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6198
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5664
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4198
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4369
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1776
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.