|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
A high performance database engine using optimized data access for all development environments including Delphi, Visual Studio .NET, Visual Basic, Visual FoxPro. and more. Learn More |
|
#1
|
||||
|
||||
|
File Transfer using Direct Cable Connection
I URGENTLY NEED HELP!
I need a code in VB6 that will enable me to send files using Direct Cable Connection. I need this as a part of my project in school and I don't have any idea on how to implement it. Any help would be highly appreciated. Thanks in advance... |
|
#2
|
|||
|
|||
|
There are various ways, one being to output directly to the port.
I'll post a zip file including code I've used at one of my clients to talk RS-232, but if you want more than that, please specify what kind of cable you're using.
__________________
- Chris of Custom Fit Technology http://www.customfittech.com Access to MySQL Conversion Tool, Visual XSLT Conversion Tool |
|
#3
|
|||
|
|||
|
K here's the library reference:
Microsoft Comm Control 6.0 (in the Components page) This means you need a Comm control little icon thingy on a form to reference as an object in code. Mine is called "com" Here's the code FOR LISTENING: com.CommPort = 1 ' Set the port number com.Settings = "9600,N,8,1" ' you may not need to set anything for direct cable ' Tell the control to read entire buffer when Input is used com.InputLen = 0 com.RThreshold = 1 ' Open the port. com.InBufferSize = 8000 com.PortOpen = True Here's the code FOR TALKIN': com.CommPort = 1 ' Set the port number com.Settings = "9600,N,8,1" ' Set UART parameters com.PortOpen = True com.Output = s ' in my code, s is a string, in yours in may not, so maybe try ' a byte array? Hope this helped some Last edited by customfittech : March 1st, 2003 at 10:03 PM. |
|
#4
|
||||
|
||||
|
Quote:
Oh! sorry forgot to specify the cable. I don't know the exact name for it but I'll be using a cable for the Printer Port (DB25). |
|
#5
|
||||
|
||||
|
QUESTION:
What if I'll use the Serial Port (DB9)? Is it possible? Will the source code change? (Please tell/show me how). Thank's for the code you've just given me. There's something I forgot to mention on my first post. Since it's only you who replied, I just hope you could do me a favor... (I might sound a "lamer" here but pardon me coz I'm a beginner in terms of Serial Programming (if that's what they call it).) Here it is... I'd like to implement a program that'll allow both users (on each end) to upload a file via Direct Cable Connection (may it be a DB25 or a DB9 cable). Let's say both Computers have a folder Downloads. When I upload a file to the other PC, it'll automatically be saved under the folder Downloads of the other computer connected to mine. Same goes if the other computer sends a file to me. It'll be of much help if you could send me a ZIP (which includes the .vbp, .frm, etc.) file for the Project. (Please) Coz I really need to finish my program before Feb 5. I'm really loosing hope on this... ![]() |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > File Transfer using Direct Cable Connection |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|