Send Data To LPT (COM) ?!
My, question is: How can I send data, directly to the LPT. I mean, to control external objects (LED's for example) through the LPT. Do you know something, about the existing OCX or DLL-s.
P.S. (Info for COM port will be useful too)
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
How To Send Data With Multiple Data Types(different Everytime)
I am sending some data to an external USB device. This data contains ID + Parameters. ID should go as a hexa string and paramters should be sent as Hexa value(0x0000) having different data types (like long,byte,integer data type)
So, If i have Data like "dA2302" should be sent as
"dA" = hexa string - String Data Type
23 = 0x23 - cByte(&H23) - Byte Data Type
02 = 0x02 - cInt(&H02) - integer Data type
In USB API i can send this data using any object (could be string,long, or any structure object).
But, My Question is.. Everytime My Data can contain different number of parameters, different data types with different order. So, How can i send these multiple data type values in one object in Visual Basic?
Please Help.. Thanks
TCP/IP - Send Data/recv Data.
I trying to connect as following, and i see i am connected to the server. But i dont receive anything, the manual told to send me data as following, can anyone give a sign what type of string or varialbe to be used here, and what could be the value, i realy need to send so that atleast i see i am doing correct?
Manual for interconnect TCP/IP:
1. packets on the tcp socket are always 256 bytes long, they contain one or more primitives, each primitive has a type octet and a lenght octet. A primitive can have fixed size fields and vairable size fields. When a field has a variable size, the first octet of the field always contains the size of the field excluding the length octet.
2. Option mask format to send to server for getting responce explain in manual.
3. Please check the attached file.
Length=108 or 60
001:ip address 1
010:ip address 2
set to 1 if need
bit 7: set to 0
---- my code i am trying.....
Code:Private Sub Command1_Click()
If .State <> sckConnected Then
If .State <> sckClosing Then 'Sometimes the Winsock gets delayed in the closing state, so make sure it is closed before trying again
If .State = sckClosed Then 'If closed, ok to open, else close it ,Start 5 second count
.Protocol = sckTCPProtocol
.Connect "one1.one.com", "5900"
Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
If Not Winsock1.State = sckConnected Then
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Winsock1.GetData gbIOBuff, vbArray + vbByte, bytesTotal
Text1.Text = Text1.Text & gbIOBuff & bytesTotal
Private Sub Command2_Click()
Winsock1.SendData Text3.Text + Chr(13)
Edited by - shamun.toha on 6/8/2008 9:34:42 AM
I did read some of the stuff on winsockvb.com.
But with no sucsess.
Well i make my game in Visual Basic 6.0
With winsock. I have a current players list in my form.
i want the Client.exe to send a msg to the server, and for the server to add a item in the listbox on the client?.
how can i do this?, you have any Tutorials or sutch?
Thx for all the help
I am trying to make a program and their is a section where i want the user to do import on what they think about it and when they fill it out and and hit Submit the infomation they entered is Sent me can someone please tell me what Componets i have to use etc....
I need to come up with a method of sending data in my turn based game. I'm a noob to winsock but I have the connection stuff down and get sending text but I need to make sure when I send other types of data I come up with a way of doing it that will work.
I've looked around a lot and gotten some useful info but I'm having trouble with the very basics of sending data/receiving it.
I am using a central server and multiple clients, where a client sends info to the server and it is then sent to either multiple clients or a single.
Anyway, how might I send say a boolean from a client to the server and back to a single client?
Like OnlineGame(ArrayNumber) = true for example?
Do I make up an arbitrary string like StrExample = "Test" if OnlineGame = true? And then send the info to the server? Like Winsock.SendData StrExample and then receive it on server with DataArrival? And use SelectCase StrExample = "Test" then OnlineGame = true? And then pass it on in same way to Client?
I need some kind of working sample. I see all the Splitting and packet delimeters and DoEvents and I get what they do but I can't put it all together for my game and what I'm trying to do for my specific game.
Any help would be appreciated. Thanks.
Hi, i have a richtextbox and i want to send the content of it to my email address. would i have to use the winsock control and how would i use it? -Thanks
Send Data To Another App
I'm sending data to another app by sendkeys once I have set the application in front of all the others. but it is annoying..
I would like to send data to another app without bringing it to front. How can I do that ? I don't have the source code of the other app.
Send Data From My Ocx To My Vb App?
I have a problem (quite new to the whole vb/windows thing):
My ocx on my webpage needs to send data to my local vb-application. I want it to work like you can do with Word or IE with Createobject("Word.application") . Then call that object like: myObj.validate(data) .
What do I need to do to make my own vb-app to be accessible by doing so? Shall my local app be regular .exe or something else? Finally, how do I register the validate(string) method as a callable method?
Really need som suggestions...
How To Send The Data To IE
Would you tell me how to send the data to IE which like fill in web form(AI RoboForm - autofill function).
Send Data Help
Can anyone help me in going about sending data randomly from a listbox over winsock.
I want to populate a listbox with > 20 strings and send them randomly using the socket.senddata function. Any help is much appreciated.
Using VB To Send Data To The Web
I am writing an inventory manager program. I use a scanner to enter the serial number of the components in the store room.
When I enter this serialnumer in a web form (the company website), I get details about my hardware.
How can I send data from my VB program to this website and how can I get the information back from the website and show it in my VB program?
How To Send Data From Asp To Com+
can you pls help me how to pass the data from asp code to com+ components. that data i have to insert into the tables from com+ components.
so what are the different ways to send the data from asp to com+.
Send Data From One EXE To Other
I created have a data logging application and another for displaying real time trend(graph). I want to send the real time data from logging application to the trend application. How do I do it?
How do i use the senddata part of winsock to send data to an asp page?
I have a web page that is conencted to a database.. I want to send data to that form on the webp age and process the asp part...
Send Data From VB To IE
Please help me with this:
One of our customer has an IE based application.
And our VB application needs to send data to one of the textbox field on theirs.
So, how do I send data to this textbox from our Visual Basic app?
(I saw one of the post here saying using WinInet but it did not work for me in this case since I don't know what the name of the textbox is, it's hidden in the java script file located on the web server)
Which Data? And How To Send With MScomm....
Hey all, posting in hope to see if someonw could point me in the right direction.
I've just began to learn VB 6 (from books) and have no other previous experience with any other programming langauge.
What i'm trying to do is send the appropiate date to a microcontroller, the problem i'm having is, I don't know which data i need to send, or how to send it...
Here's some info on the APIhttp://reprap.org/bin/view/Main/Step..._a_single_step
I belive the original program which was used was Java, but i presume i should still be able to send the data i need with VB if i could just figure out what data to send and how to send it.
I'm not looking for anyone to write the code for me, just someone who could maybe point me in the right direction as i've searched and read page after page without any progress..
P.s. If anyone needs any more info just ask and i'll help all i can.
I'm Trying To Send Data To IRC Server
I'm tzahi from Israel and I'm new here...
Hope to learn a lot from this forum..!
My question is:
I'm trying to build a program which will connect and use as mIRC program..
one of the options in the program is to connect clones to the server.
i made an array of winsock components... I wrote:
Private Sub cmdLOAD_Click()
For a = 0 To 99
TCPclones(a).RemoteHost = txtserver
TCPclones(a).RemotePort = txtport
on the varible "ident" there is the data which should be sent to the server in order to connect.
the data is ok, but when I'm running it, the following error appears:
"wong porotocol or connection state for the requested transiction or request"
(error number '40006')
and the marked line is "TCPclones(a).SendData ident"
can anyone help me please?
I don't know what the problem is...
How Do I Send The Data Without Waiting?
Im am trying to make a telnet client with winsock, and i need to be able to send this:
Private Sub sendcmd_Click()
The problem is that Text2.Text does not send before the previous command in Text1 got a reply from the server, is there a way i can just send Text2 without waiting for a reply from the server?
How To Send Data From VB6 To An ASP.NET Page
Hello, I have created a Web site in ASP.NET and I would like to know if it is possible to send data from a VB6 app to a textbox located in one of the .aspx pages.
Of course, I do possess the source files of both the VB6 app and the .aspx files.
Any help will be appreciated.
Data Stream Send
I am trying to jury rig an application within our institution and I really don't know what to do at this point. Basically I have a data stream (effectivly a .txt file) that needs to be sent. The applications we currently use (which aren't cutting the mustard) send to a port and IP address. Effectivley it somehow sends this information to a specific IP/Port address and there is a handshake which accepts it. I have absolutly NO idea how to send this information or even where to begin since I cant ask the vendor (since I'm stepping on their toes).
Any suggestions would be greatly appreciated.
WriteFile API To Send Data On LPT
I have a problem with spoolsv.exe whic make a cache to all the data which i send to the parallel port.
For example ,i have a routine like :
Private Sub SendDataToLPT()
myHandle=CreateFile("LPT1", GENERIC_READ Or GENERIC_WRITE, 0, ByVal 0&, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, ByVal 0&)
WriteFile myHandle,Byval "AAA",3,NrOfBytesToSend,0
WriteFile myHandle,Byval "BBB",3,NrOfBytesToSend,0
WriteFile myHandle,Byval "CCC",3,NrOfBytesToSend,0
...so i need to send 3 time than 3 bytes but spoolsv.exe "catch" this data and send to LPT1 all 9 bytes once.In fact, instead to send :
spoolsv.exe send "AAABBBCCC".
Please, if have someone any idea how can i solve this problem.
Fatest Way To Send Data ?
Well there are a few options and altough there probably won't be that much difference in speed transfer between them i'd still like to, for fun, find the best set of inputs to use. For starters i have the choice of
TCP/IP or UDP ?
Then i can use either the,
1) Winsock control
2) A class API wrapper for the winsock control
3) Pure winsock API(not entirely sure how this differs from 2))
4) I can also use winsock 2.0
So what is the absolute best combination to use for a P2P file sender ?
Getting Data Ready To Send
I Need someone to explain how to convert these numbers to a byte array in Binary form so that I can send them with the SendData command in Winsock to a TCP client
Here are the numbers ("007", "50" "198")
Thanks for any help given
Send Data Out From USB Device To VB6.0
I am using a card reader from OMNIKEY, which is a USB device. I am using Philips mifare card, mifare standard 1k. I can read and write to the memory of the card.
But, how to send the data out from the USB device to VB 6.0 ? I found an article in msdn, it shows that cannot use the MScomm. I also found some people will use a USB/serial convertor to perform the functions above. Is there any other ways to send the data out from the USB device to VB 6.0?
How Do I Send Data Through Winsock
hi guys im developing a client server application that will need multiple clients...i need to send the time and date of the server out to all the client to keep in synce with the server..can anyone give me the code to do this?? please help me out im desperate!!
Send Data Via Internet
i have data base (access file) on one computer
and application on another computer , what i need to do
so i can send data from my application to data base via internet
How To Send Data To A Web Page?
could u tell me how can i send some text to appear on a web page, from my vb application??? pls
i enter some text in a textbox and press a button... and the text will be shown on a web sit... can i?
Send Data To A Server
I was wondering, is it possible to send data to a (game) server?
Like if you know what WPE, or Ethereal is, something like that.
i tryed with an http wrapper, but that didnt worked. that could only send to an http:// adress. and this has to send to an 18.104.22.168 (ip) adress
how can i do that? and, is there some kind of component (plugin thingy) for? like the HTTP wrapper? thats easyer to work with than code only
BTW, im doing this with VB6
with a winsock when i use (just to test)
Private Sub Form_Load()
Data = Winsock1.Connect("127.0.0.1", 25)
Text1.Text = Data
i get type mismath and it selects ".Connect"
edit2: ok, i found out how to connect, now, how can i send
when i use like
Private Sub Command1_Click()
Winsock1.Connect "XXX.XXX.XXX.XXX", 5340
Winsock1.SendData "F1 FA "
it says "wrong protocol or connection for the requested transaction or request"
and it selects Winsock1.SendData
Send Data To Two Sheets
I would like to know if it is posible to send data to two sheets inside the same workbook? Do I have to like "activate" the sheet before sending the array. Basicadlly I want to send "raw" data to one sheet and some calculated "data" to the second sheet. This is the code I have try:
Private Sub Command1_Click()
Dim Absorb(1024) As Long
Dim o As Excel.Application
Dim oWB As Excel.Workbook
Dim oWS As Excel.Worksheet
Dim Limit As Integer
Limit = ebNumTracks.text 'Gives the # of Tracks
Set o = New Excel.Application 'Opens an Excel instance
Set oWB = o.Workbooks.Add 'Open Excel Workbook
Set oWS = oWB.Worksheets("sheet1") 'Add WorkSheet
Set oWSS=oWB.Worksheets("sheet2") 'I add this for using 2nd She
o.Visible = True 'Make Excel Visible
Picture2.Cls 'Clears the pic box
o.Sheets("sheet1").range(o.Cells(1, 1), o.Cells(1024, Limit)).Value = aData() 'Put data on Excel
List1.Clear 'Clear Listbox
For j = 1 To ebNumTracks.text 'Plot all tracks
List1.AddItem "Track#" & j
' GetRowCCDData (j) 'Get the Row data
Picture2.CurrentX = MinX
Picture2.CurrentY = MinY
For i = 1 To nXPixels Step 10
Absorb(i) = aData(i, 1) / aData(i, 2) 'This will determine the column difference
Picture2.Line -(i, aData(i, j)), QBColor(j - 1) 'Plot lines 'Pulls from aData
' Picture2.Line -(i, aRowData(i)), QBColor(j - 1) 'Plot lines 'Pulls from GetRow
o.Sheets("sheet2").range(o.Cells(1, 1), o.Cells(1024, Limit)).Value = aData
(In this case I try to send the same array to the second sheet because I was just testing it)
How To Send Data To A Form
Hi, I want to send a string data to a form. Once a button is clicked a specific string must be placed in a textbox in the new form. But how do I do that? Is there some way to send parameters to the new form? Or to share some data between them?
Send Data To Window?
Private Sub Timer1_Timer()
Dim mWnd As Long
mWnd = FindWindow(vbNullString, "Lineage II")
If mWnd = 0 Then
MsgBox ("Lineage 2 Not running, Found, or In Game.")
SendMessage mWnd, "/pickup Adena"
Could anyone please help me get it to send that to the game window?
Send Data Between Programs
Normally if I want to pass data between two programs, I just have one program create a text file and the other read it.
Is there a better way?
Send Bitmap Data
This is the problem:
I want to make a screenshot and send it throughnetwork to the client program.
The problem is not in the winsock because it can send any data types.
I need help in making a screenshot and send the whole screenshot data (no palette,etc. Just the captured data. What is the reference for it?)... how?
VB Send Data To Printer
The printer that im using now need some codes to make it understand the function, that is not provided in the normal Printer property or method.
The printer is cutter-enabled to cut the label every "A" labels
A--- may takes different value from time to time..
The printer manufacturer provided with some code that ready to be sent from the program (Software)..
<ESC>A <ESC>~A2 <ESC>Z
'this code is the Printer native language..that set cut every 2 labels....
How im going to send this data to the printer...from VB.
Thanks & Regards
Send Data To LPT1
Hi. In the old versions of basic we could open LPT1 like a file name to send data to the printer.
The sintax was some like this
Open LPT1 for OUT as #1
Not this exactly..
The question is:
Can I do this in VB?
This is for a POS application and the speed does matter...
How Do I Send Data From One Datagrid To Another?
OK, a little hard to explain so bare with me.
Anyway, I'm writing a program for a friend thats opening a shop. The program retrieves the data from a database full of his product/descriptions/stock/prices.
I've set up a datagrid that displays this info. What he wants to do is to be able to dblclick a row that contains all the above info for an item and add this to a temp. shopping list.
I've thought of passing the row he selects to another datagrid, adding to it dynamically. The thing is, how do I go about this? I've got the database running perfect. He scrolls up and down the product datagrid a row at a time, but I haven't a clue on how to pass the selected row to the new datagrid.
I hope I haven't confused you.
Thanks for any help.
Send Data Between Applications
So in one project, I have a textbox and stuff. I want to send the textbox's text over to another application. In the program that is trying to receive I have this code:
ElseIf InStr(Data, "OPEN IE SITE") Then
Call Shell("C:Program FilesInternet Exploreriexplore.exe")
I'm trying to get it so whatever address I type in the other project and click a button, it opens up that site in Internet Explorer.
Send 12 Bit Data Using MSCOMM
Hi, I got an instrument that supposed to be controlled with vb through MSCOMM. The problem is: this instrument received 12 bit data (with 9600 bps, non-parity, stop bit: 1 bit), and when I code:
an error occurred because 12 is not recognized as a valid value for data bit. According to documentation, the data bit supported by MSCOMM are 4 to 8.
Is there any other way to control this instrument using vb?
How To Send A Negative Data From Vb?
i need your help
can i know that the above codes are only for sending unsigned number?
can i know how to send a sign number for example negative number out from visual basic to my PIC? what is the vb code should i use?
thanks for help.
How To Send Data From Vb 6 To Mssql 2k Using Asp?
I am just a newbie here! I have a problem with vb 6 and asp.
I am doing a school project that working on ping and tracert to 2 ip address.
After that the result should send to sqlserver 2k using asp. I don't have an idea how to connect asp from vb 6. Any idea? Please help me with your ideas. welcome your ideas.
Pleazzzz help me!
Thanks in advance,