< Visual Basic

This is a work area. Short pieces of text, reminders and links that don't warrant a page to themselves but need a temporary home lest they be forgotten start life here.

Miscellaneous

Graphics

Unicode Support

Unicode Issues with VB , Add Unicode Support, Unicode Custom Controls,

Networks

inet control winsock control comm control

Winsock Control

Visual Basic allows data to be sent via a Point-To-Point (PTP) Connection via Winsock. Once the control is inserted, only a few commands are required to send data between two networked computers. A LAN cable must be connected between the computers.

To allow Winsock to connect to any available computers, the listen command is needed, as shown below

Winsock.Port = 1234
Winsock.Listen

Once this has been done, the other computer's Local IP is required. Your IP can be viewed with the command

Debug.Print Winsock.LocalIP

Connecting merely requires one line of code, as shown below

Winsock.Connect RemoteHost, Port

Port can be any number up to 50,000. The example as shown above is 1234.

To accept a connection you need to create a new sub

Private Sub Winsock_ConnectionRequest(ByVal requestID As Long)
Winsock.Accept requestid
End Sub

Sending data is also pretty simple.

Winsock.SendData Data

To receive any sent data another new sub is needed

Private Sub Winsock_DataArrival(ByVal bytestotal As Long)
Dim nData as String
Winsock.GetData nData
End Sub

Using the above code it is relatively simple to create a working data exchange between two computers. More information on this topic can be found in the Snippets Section.

Shell Integration

Shell Context Menu

Add examples for VBZip etc.

Command Line

Console Programs

See:

A very simple way of creating console programs: http://www.kellyethridge.com/vbcorlib/doc/Console.html

CGI

See:

Windows management Interface

http://archive.is/20130628221511/http://techrepublic.com.com/5208-11196-0.html?forumID=44&threadID=121079

Sound


Previous: Glossary Contents Next:
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.