home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form JavaTestForm
- Caption = "Test a Java ActiveX Control"
- ClientHeight = 3735
- ClientLeft = 2715
- ClientTop = 2805
- ClientWidth = 9840
- LinkTopic = "Form1"
- ScaleHeight = 3735
- ScaleWidth = 9840
- Begin VB.Frame Frame3
- Caption = "Hooked to the Number Change Event"
- Height = 735
- Left = 4560
- TabIndex = 8
- Top = 2880
- Width = 4935
- Begin VB.TextBox Text2
- BackColor = &H00C0FFFF&
- Height = 375
- Left = 240
- TabIndex = 5
- TabStop = 0 'False
- Top = 240
- Width = 4335
- End
- End
- Begin VB.Frame Frame1
- Caption = "Set the control properties:"
- Height = 2655
- Left = 4440
- TabIndex = 6
- Top = 120
- Width = 5055
- Begin VB.Frame Frame2
- Caption = "Frame2"
- Height = 1455
- Left = 240
- TabIndex = 10
- Top = 960
- Width = 1815
- Begin VB.OptionButton Option3
- Caption = "Angry"
- Height = 375
- Left = 240
- TabIndex = 3
- Top = 960
- Width = 1455
- End
- Begin VB.OptionButton Option2
- Caption = "Awkward"
- Height = 375
- Left = 240
- TabIndex = 2
- Top = 600
- Width = 1455
- End
- Begin VB.OptionButton Option1
- Caption = "Calm"
- Height = 375
- Left = 240
- TabIndex = 1
- Top = 240
- Value = -1 'True
- Width = 1455
- End
- End
- Begin VB.CommandButton Command1
- Caption = "Change the number"
- Height = 1335
- Left = 2280
- TabIndex = 4
- Top = 1080
- Width = 2655
- End
- Begin VB.TextBox Text1
- Height = 375
- Left = 1440
- TabIndex = 0
- Top = 360
- Width = 3495
- End
- Begin VB.Label Label1
- Caption = "String Data"
- Height = 375
- Left = 360
- TabIndex = 7
- Top = 360
- Width = 855
- End
- End
- Begin VB.Frame Frame4
- Caption = "Java SimpleControl as ActiveX Control"
- Height = 3495
- Left = 0
- TabIndex = 9
- Top = 120
- Width = 4335
- Begin VB.Label Label2
- Caption = "Add Java ActiveX Control here "
- Height = 375
- Left = 960
- TabIndex = 11
- Top = 1440
- Width = 2295
- End
- End
- Attribute VB_Name = "JavaTestForm"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub Command1_Click()
- Dim num As Integer
- ' Generate random value between 1 and 6000
- num = Int((6000 * Rnd) + 1)
- 'Set the control's property
- SimpleControl1.numberData = num
- End Sub
- Private Sub Option1_Click()
- SimpleControl1.drawingMode = 0 'DrawingMode.CALM
- End Sub
- Private Sub Option2_Click()
- SimpleControl1.drawingMode = 1 'DrawingMode.AWKWARD
- End Sub
- Private Sub Option3_Click()
- SimpleControl1.drawingMode = 2 'DrawingMode.ANGRY
- End Sub
- Private Sub SimpleControl1_numberDataChanged(ByVal Parameter0 As Object, ByVal Parameter1 As Object)
- Dim num As Integer
- num = SimpleControl1.numberData
- Text2.Text = Str(num)
- End Sub
- Private Sub Text1_Change()
- SimpleControl1.stringData = Text1.Text
- End Sub
-