home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 39 / IOPROG_39.ISO / SOFT / sdkjava40.exe / data1.cab / fg_Samples / Samples / WFC / SimpleOCXControl / VBTest / JavaTest.frm (.txt) next >
Encoding:
Visual Basic Form  |  2000-05-04  |  4.4 KB  |  137 lines

  1. VERSION 5.00
  2. Begin VB.Form JavaTestForm 
  3.    Caption         =   "Test a Java ActiveX Control"
  4.    ClientHeight    =   3735
  5.    ClientLeft      =   2715
  6.    ClientTop       =   2805
  7.    ClientWidth     =   9840
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   3735
  10.    ScaleWidth      =   9840
  11.    Begin VB.Frame Frame3 
  12.       Caption         =   "Hooked to the Number Change Event"
  13.       Height          =   735
  14.       Left            =   4560
  15.       TabIndex        =   8
  16.       Top             =   2880
  17.       Width           =   4935
  18.       Begin VB.TextBox Text2 
  19.          BackColor       =   &H00C0FFFF&
  20.          Height          =   375
  21.          Left            =   240
  22.          TabIndex        =   5
  23.          TabStop         =   0   'False
  24.          Top             =   240
  25.          Width           =   4335
  26.       End
  27.    End
  28.    Begin VB.Frame Frame1 
  29.       Caption         =   "Set the control properties:"
  30.       Height          =   2655
  31.       Left            =   4440
  32.       TabIndex        =   6
  33.       Top             =   120
  34.       Width           =   5055
  35.       Begin VB.Frame Frame2 
  36.          Caption         =   "Frame2"
  37.          Height          =   1455
  38.          Left            =   240
  39.          TabIndex        =   10
  40.          Top             =   960
  41.          Width           =   1815
  42.          Begin VB.OptionButton Option3 
  43.             Caption         =   "Angry"
  44.             Height          =   375
  45.             Left            =   240
  46.             TabIndex        =   3
  47.             Top             =   960
  48.             Width           =   1455
  49.          End
  50.          Begin VB.OptionButton Option2 
  51.             Caption         =   "Awkward"
  52.             Height          =   375
  53.             Left            =   240
  54.             TabIndex        =   2
  55.             Top             =   600
  56.             Width           =   1455
  57.          End
  58.          Begin VB.OptionButton Option1 
  59.             Caption         =   "Calm"
  60.             Height          =   375
  61.             Left            =   240
  62.             TabIndex        =   1
  63.             Top             =   240
  64.             Value           =   -1  'True
  65.             Width           =   1455
  66.          End
  67.       End
  68.       Begin VB.CommandButton Command1 
  69.          Caption         =   "Change the number"
  70.          Height          =   1335
  71.          Left            =   2280
  72.          TabIndex        =   4
  73.          Top             =   1080
  74.          Width           =   2655
  75.       End
  76.       Begin VB.TextBox Text1 
  77.          Height          =   375
  78.          Left            =   1440
  79.          TabIndex        =   0
  80.          Top             =   360
  81.          Width           =   3495
  82.       End
  83.       Begin VB.Label Label1 
  84.          Caption         =   "String Data"
  85.          Height          =   375
  86.          Left            =   360
  87.          TabIndex        =   7
  88.          Top             =   360
  89.          Width           =   855
  90.       End
  91.    End
  92.    Begin VB.Frame Frame4 
  93.       Caption         =   "Java SimpleControl as ActiveX Control"
  94.       Height          =   3495
  95.       Left            =   0
  96.       TabIndex        =   9
  97.       Top             =   120
  98.       Width           =   4335
  99.       Begin VB.Label Label2 
  100.          Caption         =   "Add Java ActiveX Control here "
  101.          Height          =   375
  102.          Left            =   960
  103.          TabIndex        =   11
  104.          Top             =   1440
  105.          Width           =   2295
  106.       End
  107.    End
  108. Attribute VB_Name = "JavaTestForm"
  109. Attribute VB_GlobalNameSpace = False
  110. Attribute VB_Creatable = False
  111. Attribute VB_PredeclaredId = True
  112. Attribute VB_Exposed = False
  113. Private Sub Command1_Click()
  114.     Dim num As Integer
  115.     ' Generate random value between 1 and 6000
  116.     num = Int((6000 * Rnd) + 1)
  117.     'Set the control's property
  118.     SimpleControl1.numberData = num
  119. End Sub
  120. Private Sub Option1_Click()
  121.     SimpleControl1.drawingMode = 0 'DrawingMode.CALM
  122. End Sub
  123. Private Sub Option2_Click()
  124.     SimpleControl1.drawingMode = 1 'DrawingMode.AWKWARD
  125. End Sub
  126. Private Sub Option3_Click()
  127.     SimpleControl1.drawingMode = 2 'DrawingMode.ANGRY
  128. End Sub
  129. Private Sub SimpleControl1_numberDataChanged(ByVal Parameter0 As Object, ByVal Parameter1 As Object)
  130.     Dim num As Integer
  131.     num = SimpleControl1.numberData
  132.     Text2.Text = Str(num)
  133. End Sub
  134. Private Sub Text1_Change()
  135.     SimpleControl1.stringData = Text1.Text
  136. End Sub
  137.