Receiving and Displaying Images from a Remote Computer (Visual Basic)

Take the following steps to add some code that will let you receive and display images received from a computer acting as a server.

1.

Run the EXE you created in Sending Images to a Remote Computer from outside Visual Basic.

2.

Start Visual Basic.

3.

Open the example you created in Connecting to a Remote Computer.

4

Add the LEAD RasterView Control to your project.

 

For VB5: On the Project pull-down menu, use the Components option, and select the LEAD RasterView Control (14.0).

5.

Select the LEAD RasterView Control; then add the control to your main form. Size and position the control as you want it to appear at run time. Set the BackErase property to False.

6.

Code the LEADNet1_InetReceiveBitmap event as follows:

Private Sub LEADNet1_InetReceiveBitmap(ByVal iComputer As Integer, ByVal hBitmap As Long)

   'assign bitmap to LEAD RasterView control
   LEADRasterView1.Raster.Bitmap = hBitmap
   DoEvents
End Sub 

7.

Run your program to test it.