Add
Code to Form
Add the following
code to the form you created in the pervious step:
- Private
Sub Command1_Click()
- WebX1.TrapFileEnable
= True 'To inform
you of requests
- 'WebX1.ServerPort
= 2000 'Change
Port Number if needed
- WebX1.StartServer
'Start
the Web Server
- End
Sub
- Private
Sub Form_Unload(Cancel
As Integer)
- WebX1.StopServer
'Stop
the Web Server
- End
Sub
- Private
Sub WebX1_FileRequest(Index
As Integer, FileName As String, UserAuthentication As String)
- WebX1.TrapFileData
Index, "hello world", False 'Hello
World
- End
Sub
- If you have another
web server running on your computer, you will have to un-comment the
line 'WebX1.ServerPort
= 2000. This
will allow WebX to coexist with the web server already on your system.
|