vb6 communication via lan?
vb6 communication via lan?
vb6 communication via lan?
vb6 communication via lan?
vb6 communication via lan?
vb6 communication via lan? vb6 communication via lan? vb6 communication via lan? vb6 communication via lan? vb6 communication via lan? vb6 communication via lan? vb6 communication via lan? vb6 communication via lan?
vb6 communication via lan? vb6 communication via lan?
vb6 communication via lan?
Go Back  Xtreme Visual Basic Talk > > > vb6 communication via lan?


Reply
 
Thread Tools Display Modes
  #1  
Old 01-14-2012, 12:08 PM
CrashANDburn CrashANDburn is offline
Newcomer
 
Join Date: Jan 2012
Posts: 2
Default vb6 communication via lan?


How is possible to communicate 2 programs directly through local ip?i want to send text. eaven public ip? please tell me how is this done in vb6 not in vb.net because i don't know the .net language
Reply With Quote
  #2  
Old 01-15-2012, 11:39 AM
passel's Avatar
passelvb6 communication via lan? passel is offline
Sinecure Expert

Super Moderator
* Guru *
 
Join Date: Jun 2003
Location: Upstate New York, usa
Posts: 8,024
Default

If you press Ctrl-T in the IDE, you should get a list of a lot of components that can be added to your tool-box.
Scroll down and add a Microsoft Winsock control to your toolbox.
Place a winsock control on the form.
Depending on how much data you want to transfer, at what speeds, etc. may determine which protocol you want to use.
The control defaults to TCP, but UDP is a little simpler to use.
You can do a search to find examples of using the control. Most examples use transferring strings as the data being exchanged.
__________________
There Is An Island Of Opportunity In The Middle of Every Difficulty.
Miss That, Though, And You're Pretty Much Doomed.
Reply With Quote
  #3  
Old 01-18-2012, 06:34 PM
TRSDOSBasic79's Avatar
TRSDOSBasic79 TRSDOSBasic79 is offline
Contributor
 
Join Date: Oct 2003
Location: Pennsylvania
Posts: 422
Default

passel, I have the same app on two computers in my store. Would this be a good method to send update data between the two?
Reply With Quote
  #4  
Old 01-19-2012, 04:01 PM
passel's Avatar
passelvb6 communication via lan? passel is offline
Sinecure Expert

Super Moderator
* Guru *
 
Join Date: Jun 2003
Location: Upstate New York, usa
Posts: 8,024
Default

If I had to do it, probably. I'm not a database person.
A database person would most likely say to have a database to maintain the data and post and query, etc. to update and retrieve the information.
If you've written the app and already have it maintaining data in a file that you are accessing directly, then you might already have an idea how you would sync the files by sending strings between the applications. If so, you have a bit of redundancy since you will automatically have two copies of the files.
But, if you use both applications simultaneously, you will most likely have to consider how to maintain atomic updates between the two so that both are not updating their own copy at the same time, then informing the other and possibly ending up with different ideas about the state of things.
Not knowing what data you are trying to maintain between the two, and how it is managed, I can't say how I would go about it, and how I would do it may not be considered "good" in someone else's opinion.
I don't know if the data you're updating is simply a fixed inventory count, or sales data, or customer information, etc.
What type of text do you want to send between the applications and what do you want the application to do with it?
__________________
There Is An Island Of Opportunity In The Middle of Every Difficulty.
Miss That, Though, And You're Pretty Much Doomed.
Reply With Quote
  #5  
Old 01-19-2012, 04:38 PM
TRSDOSBasic79's Avatar
TRSDOSBasic79 TRSDOSBasic79 is offline
Contributor
 
Join Date: Oct 2003
Location: Pennsylvania
Posts: 422
Default

I want to send the FileName/Number.

1) Lets say computer one has checked the message textbox and it has no filename/number in it, so it opened the file "Chester1101".

2) I want computer one to send the filename/number to computer two.

3) On computer two, the filename/number will pop into a message textbox. Before a selected file can be opened on computer two, A check will be made to see if the textbox contents matches the filename/number to be opened, if it does then deny the operation and post message to user, otherwise open the file and send message to computer one.

Basically, Each computer will have a textbox and whatever file is opened on the other computer, the filename/number will be in this textbox

I want to minimize the chance of having the same file open on both machines.

Last edited by TRSDOSBasic79; 01-19-2012 at 04:44 PM.
Reply With Quote
  #6  
Old 01-19-2012, 06:36 PM
PlausiblyDamp's Avatar
PlausiblyDampvb6 communication via lan? PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,058
Default

When you open the file on one computer couldn't you just open it and prevent sharing? http://msdn.microsoft.com/en-us/libr...(v=vs.60).aspx is probaly worth a look, note the 4th parameter (lock).
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
  #7  
Old 01-22-2012, 11:02 AM
mkaras's Avatar
mkarasvb6 communication via lan? mkaras is offline
Ultimate Contributor

Retired Leader
* Expert *
 
Join Date: Mar 2004
Location: Beaverton, OR
Posts: 1,874
Default

From reading this thread it is not clear if TRSDOSBasic79's applications are running their own instances with independent, but same named, file sets on each of machine 1 and machine 2 -- OR -- if the two machines are already networked to a common file store where the set of files for both program instances are shared.

It has to be this latter scenario for the file locking idea that PlausiblyDamp suggested to be workable.

Michael Karas
Reply With Quote
  #8  
Old 01-22-2012, 06:57 PM
TRSDOSBasic79's Avatar
TRSDOSBasic79 TRSDOSBasic79 is offline
Contributor
 
Join Date: Oct 2003
Location: Pennsylvania
Posts: 422
Default

I have a computer in the office and one in the shop. Both are connected to the router and both are networked together. My application is identical on both computers. The data files are in a shared directory on one computer. Both apps have full access to the files. I'm going to test PD's suggestion.
Reply With Quote
Reply

Tags
lan


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
vb6 communication via lan?
vb6 communication via lan?
vb6 communication via lan? vb6 communication via lan?
vb6 communication via lan?
vb6 communication via lan?
vb6 communication via lan? vb6 communication via lan? vb6 communication via lan? vb6 communication via lan? vb6 communication via lan? vb6 communication via lan? vb6 communication via lan?
vb6 communication via lan?
vb6 communication via lan?
 
vb6 communication via lan?
vb6 communication via lan?
 
-->