home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 39 / IOPROG_39.ISO / SOFT / vbasic / webx_setup.exe / %MAINDIR% / Samples / SimpleWebServer / frmSimpleWebServer.frm (.txt) next >
Encoding:
Visual Basic Form  |  2000-06-18  |  1.7 KB  |  57 lines

  1. VERSION 5.00
  2. Object = "{60F3DD10-54A1-416D-835C-B8371C544B98}#4.0#0"; "WebX.ocx"
  3. Begin VB.Form Form1 
  4.    Caption         =   "Form1"
  5.    ClientHeight    =   3195
  6.    ClientLeft      =   60
  7.    ClientTop       =   345
  8.    ClientWidth     =   4680
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   3195
  11.    ScaleWidth      =   4680
  12.    StartUpPosition =   3  'Windows Default
  13.    Begin WebXServer.WebX WebX1 
  14.       Height          =   1080
  15.       Left            =   1620
  16.       Top             =   960
  17.       Width           =   1080
  18.       _ExtentX        =   1905
  19.       _ExtentY        =   1905
  20.    End
  21.    Begin VB.CommandButton Command1 
  22.       Caption         =   "Command1"
  23.       Height          =   495
  24.       Left            =   3420
  25.       TabIndex        =   0
  26.       Top             =   2640
  27.       Width           =   1215
  28.    End
  29. Attribute VB_Name = "Form1"
  30. Attribute VB_GlobalNameSpace = False
  31. Attribute VB_Creatable = False
  32. Attribute VB_PredeclaredId = True
  33. Attribute VB_Exposed = False
  34. Option Explicit
  35. Private Sub Form_Load()
  36.     ' Set up the Form
  37.     Command1.Caption = "Start Server"
  38.     Caption = "Server Stopped."
  39. End Sub
  40. Private Sub Command1_Click()
  41.     With WebX1
  42.         ' Check the States of W3Server and
  43.         ' take appropriate action.
  44.         If .ServerRunning = False Then
  45.             .ServerPort = 8888
  46.             .VirtualPath = App.Path & "\html"
  47.             .StartServer
  48.             Caption = "Server Running."
  49.             Command1.Caption = "Stop Server"
  50.         Else
  51.             .StopServer
  52.             Caption = "Server Stopped."
  53.             Command1.Caption = "Start Server"
  54.         End If
  55.     End With
  56. End Sub
  57.