Visual Basic/Work in Progress

From Wikibooks, open books for an open world
Jump to navigation Jump to search

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[edit | edit source]

Graphics[edit | edit source]

Unicode Support[edit | edit source]

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

Networks[edit | edit source]

inet control winsock control comm control

Winsock Control[edit | edit source]

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

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[edit | edit source]

Shell Context Menu[edit | edit source]

Add examples for VBZip etc.

Command Line[edit | edit source]

Console Programs[edit | edit source]


A very simple way of creating console programs:

CGI[edit | edit source]


Windows management Interface[edit | edit source]

Sound[edit | edit source]

Previous: Glossary Contents Next: