home *** CD-ROM | disk | FTP | other *** search
/ Chip Special: HTML & Java / Chip-Special_1997-01_HTML-a-Java.bin / chatsdk / chatsdk.exe / CHKENTER.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-12-12  |  4.2 KB  |  137 lines

  1. VERSION 4.00
  2. Begin VB.Form EnterOptions 
  3.    BackColor       =   &H00C0FFC0&
  4.    BorderStyle     =   3  'Fixed Dialog
  5.    Caption         =   "Join Game Options"
  6.    ClientHeight    =   3060
  7.    ClientLeft      =   1785
  8.    ClientTop       =   3300
  9.    ClientWidth     =   4245
  10.    Height          =   3465
  11.    Left            =   1725
  12.    LinkTopic       =   "EnterOptions"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   3060
  16.    ScaleWidth      =   4245
  17.    ShowInTaskbar   =   0   'False
  18.    Top             =   2955
  19.    Width           =   4365
  20.    Begin VB.CommandButton cmdOK 
  21.       Caption         =   "OK"
  22.       Default         =   -1  'True
  23.       Height          =   375
  24.       Left            =   1680
  25.       TabIndex        =   9
  26.       Top             =   2520
  27.       Width           =   1095
  28.    End
  29.    Begin VB.CommandButton cmdCancel 
  30.       Caption         =   "Cancel"
  31.       Height          =   375
  32.       Left            =   3000
  33.       TabIndex        =   8
  34.       Top             =   2520
  35.       Width           =   1095
  36.    End
  37.    Begin VB.TextBox txtTopic 
  38.       Height          =   285
  39.       Left            =   120
  40.       TabIndex        =   6
  41.       Top             =   2040
  42.       Width           =   3975
  43.    End
  44.    Begin VB.CommandButton cmdGetTopic 
  45.       Caption         =   "Get Topic"
  46.       Height          =   255
  47.       Left            =   2160
  48.       TabIndex        =   5
  49.       Top             =   1800
  50.       Width           =   975
  51.    End
  52.    Begin VB.CommandButton cmdSetTopic 
  53.       Caption         =   "Set Topic"
  54.       Height          =   255
  55.       Left            =   3120
  56.       TabIndex        =   4
  57.       Top             =   1800
  58.       Width           =   975
  59.    End
  60.    Begin VB.ComboBox ComboRoomPath 
  61.       Height          =   315
  62.       Left            =   120
  63.       TabIndex        =   1
  64.       Top             =   1200
  65.       Width           =   3975
  66.    End
  67.    Begin VB.ComboBox ComboAlias 
  68.       Height          =   315
  69.       Left            =   120
  70.       TabIndex        =   0
  71.       Top             =   360
  72.       Width           =   3975
  73.    End
  74.    Begin VB.Label Label13 
  75.       BackColor       =   &H00C0FFC0&
  76.       Caption         =   "Type the chat room topic:"
  77.       Height          =   255
  78.       Left            =   120
  79.       TabIndex        =   7
  80.       Top             =   1800
  81.       Width           =   2175
  82.    End
  83.    Begin VB.Label Label7 
  84.       BackColor       =   &H00C0FFC0&
  85.       Caption         =   "Select or type your Alias:"
  86.       Height          =   255
  87.       Left            =   120
  88.       TabIndex        =   3
  89.       Top             =   120
  90.       Width           =   3975
  91.    End
  92.    Begin VB.Label Label8 
  93.       BackColor       =   &H00C0FFC0&
  94.       Caption         =   "Select or type the chat room:"
  95.       Height          =   255
  96.       Left            =   120
  97.       TabIndex        =   2
  98.       Top             =   960
  99.       Width           =   3975
  100.    End
  101. Attribute VB_Name = "EnterOptions"
  102. Attribute VB_Creatable = False
  103. Attribute VB_Exposed = False
  104. Option Explicit
  105. ' Channel creation modes
  106. Const OCX_CHANNEL_CREATE_JOIN = 1
  107. Const OCX_CHANNEL_TOPICOP = 2        ' topic can be changed only by Host
  108. Const SEC_PACKAGE = "ANON;ALL"
  109. Private Sub cmdCancel_Click()
  110.     Hide
  111. End Sub
  112. Private Sub cmdGetTopic_Click()
  113.     On Error Resume Next
  114.     txtTopic.Text = Main.MSChat1.RoomTopic
  115. End Sub
  116. Private Sub cmdOK_Click()
  117.         
  118.     On Error Resume Next
  119.     cmdSetTopic_Click
  120.     Main.lblAlias.Caption = ComboAlias.Text
  121.     Main.lblRoomPath.Caption = ComboRoomPath.Text
  122.     Main.MSChat1.EnterRoom ComboRoomPath.Text, "", ComboAlias.Text, SEC_PACKAGE, OCX_CHANNEL_CREATE_JOIN, OCX_CHANNEL_TOPICOP
  123.     Hide
  124. End Sub
  125. Private Sub cmdSetTopic_Click()
  126.     On Error Resume Next
  127.     Main.MSChat1.RoomTopic = txtTopic.Text
  128. End Sub
  129. Private Sub Form_Load()
  130.     ComboRoomPath.AddItem "//ComicSrv1.Microsoft.Com/#Checkers"
  131.     ComboRoomPath.AddItem "//ComicSrv2.Microsoft.Com/#Checkers"
  132.     ComboRoomPath.ListIndex = 0
  133.     ComboAlias.AddItem "Player1"
  134.     ComboAlias.AddItem "Player2"
  135.     ComboAlias.ListIndex = 0
  136. End Sub
  137.