home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / firecrax / firecrax.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-07-19  |  4.8 KB  |  158 lines

  1. VERSION 5.00
  2. Object = "{E0DE79BD-3DF3-11D3-8B34-0080ADB93D50}#14.0#0"; "FireCraxor.ocx"
  3. Begin VB.Form Form1 
  4.    BorderStyle     =   4  'Fixed ToolWindow
  5.    Caption         =   "FireCrax0r - Using FireCraxor.ocx"
  6.    ClientHeight    =   1575
  7.    ClientLeft      =   45
  8.    ClientTop       =   285
  9.    ClientWidth     =   3690
  10.    Icon            =   "FireCraxor_OCX.frx":0000
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   1575
  15.    ScaleWidth      =   3690
  16.    StartUpPosition =   2  'CenterScreen
  17.    Begin VB.CommandButton Command1 
  18.       Caption         =   "&About"
  19.       Height          =   255
  20.       Left            =   2760
  21.       TabIndex        =   10
  22.       Top             =   120
  23.       Width           =   855
  24.    End
  25.    Begin VB.TextBox txtCommPort 
  26.       Height          =   285
  27.       Left            =   1200
  28.       TabIndex        =   9
  29.       Text            =   "2"
  30.       Top             =   120
  31.       Width           =   615
  32.    End
  33.    Begin FireCraxorCTL.FireCraxor FireCraxor1 
  34.       Left            =   240
  35.       Top             =   720
  36.       _ExtentX        =   926
  37.       _ExtentY        =   926
  38.       CommPort        =   0
  39.    End
  40.    Begin VB.CommandButton cmdOn 
  41.       Caption         =   "Turn O&n"
  42.       Height          =   375
  43.       Left            =   1920
  44.       TabIndex        =   5
  45.       Top             =   600
  46.       Width           =   735
  47.    End
  48.    Begin VB.ComboBox cmbHouseCode 
  49.       Height          =   315
  50.       Left            =   1200
  51.       Style           =   2  'Dropdown List
  52.       TabIndex        =   4
  53.       Top             =   600
  54.       Width           =   615
  55.    End
  56.    Begin VB.ComboBox cmbAppNum 
  57.       Height          =   315
  58.       Left            =   1200
  59.       Style           =   2  'Dropdown List
  60.       TabIndex        =   3
  61.       Top             =   1080
  62.       Width           =   615
  63.    End
  64.    Begin VB.CommandButton cmdOff 
  65.       Caption         =   "Turn Of&f"
  66.       Height          =   375
  67.       Left            =   1920
  68.       TabIndex        =   2
  69.       Top             =   1080
  70.       Width           =   735
  71.    End
  72.    Begin VB.CommandButton cmdBright 
  73.       Caption         =   "&Brighten"
  74.       Height          =   375
  75.       Left            =   2760
  76.       TabIndex        =   1
  77.       Top             =   600
  78.       Width           =   855
  79.    End
  80.    Begin VB.CommandButton cmdDim 
  81.       Caption         =   "&Dim"
  82.       Height          =   375
  83.       Left            =   2760
  84.       TabIndex        =   0
  85.       Top             =   1080
  86.       Width           =   855
  87.    End
  88.    Begin VB.Label Label3 
  89.       Caption         =   "Comm Port:"
  90.       Height          =   255
  91.       Left            =   120
  92.       TabIndex        =   8
  93.       Top             =   120
  94.       Width           =   975
  95.    End
  96.    Begin VB.Label Label1 
  97.       Caption         =   "Housecode:"
  98.       Height          =   255
  99.       Left            =   120
  100.       TabIndex        =   7
  101.       Top             =   600
  102.       Width           =   975
  103.    End
  104.    Begin VB.Label Label2 
  105.       Caption         =   "Appliance ID:"
  106.       Height          =   255
  107.       Left            =   120
  108.       TabIndex        =   6
  109.       Top             =   1080
  110.       Width           =   975
  111.    End
  112. Attribute VB_Name = "Form1"
  113. Attribute VB_GlobalNameSpace = False
  114. Attribute VB_Creatable = False
  115. Attribute VB_PredeclaredId = True
  116. Attribute VB_Exposed = False
  117. Private Sub cmdBright_Click()
  118. FireCraxor1.SendCommand cmbHouseCode.Text, Val(cmbAppNum.Text), "BRT"
  119. End Sub
  120. Private Sub cmdDim_Click()
  121. FireCraxor1.SendCommand cmbHouseCode.Text, Val(cmbAppNum.Text), "DIM"
  122. End Sub
  123. Private Sub cmdOff_Click()
  124. FireCraxor1.SendCommand cmbHouseCode.Text, Val(cmbAppNum.Text), "OFF"
  125. End Sub
  126. Private Sub cmdOn_Click()
  127. FireCraxor1.SendCommand cmbHouseCode.Text, Val(cmbAppNum.Text), "ON"
  128. End Sub
  129. Private Sub Command1_Click()
  130. MsgBox "This is a test of the FireCraxor Control for X10's FireCracker home automation system (info: www.x10.com). Written by Joseph Sola, homepage at http://reet.i.am"
  131. End Sub
  132. Private Sub Form_Load()
  133. txtCommPort.Text = FireCraxor1.CommPort
  134. cmbHouseCode.AddItem "A"
  135. cmbHouseCode.AddItem "B"
  136. cmbHouseCode.AddItem "C"
  137. cmbHouseCode.AddItem "D"
  138. cmbHouseCode.AddItem "E"
  139. cmbHouseCode.AddItem "F"
  140. cmbHouseCode.AddItem "G"
  141. cmbHouseCode.AddItem "H"
  142. cmbHouseCode.AddItem "I"
  143. cmbHouseCode.AddItem "J"
  144. cmbHouseCode.AddItem "K"
  145. cmbHouseCode.AddItem "L"
  146. cmbHouseCode.AddItem "M"
  147. cmbHouseCode.AddItem "N"
  148. cmbHouseCode.AddItem "O"
  149. cmbHouseCode.AddItem "P"
  150. cmbHouseCode.ListIndex = 0
  151. For Asdf = 1 To 16 Step 1
  152.     cmbAppNum.AddItem Asdf
  153. cmbAppNum.ListIndex = 0
  154. End Sub
  155. Private Sub txtCommPort_LostFocus()
  156. FireCraxor1.CommPort = Val(txtCommPort.Text)
  157. End Sub
  158.