home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Tool Box
/
SIMS_2.iso
/
vb_code1
/
dispatch
/
form1.frm
< prev
next >
Wrap
Text File
|
1993-08-31
|
3KB
|
110 lines
VERSION 2.00
Begin Form Form1
BackColor = &H00C0C0C0&
Caption = "Form1"
ClientHeight = 4005
ClientLeft = 1740
ClientTop = 2670
ClientWidth = 4695
Height = 4410
Left = 1680
LinkTopic = "Form1"
ScaleHeight = 4005
ScaleWidth = 4695
Top = 2325
Width = 4815
Begin TextBox Arg
BackColor = &H00FFFFFF&
Height = 285
Left = 2385
TabIndex = 0
Text = "Text1"
Top = 360
Width = 975
End
Begin CommandButton Command3
Caption = "Sub 1"
Height = 555
Index = 0
Left = 1560
TabIndex = 1
Top = 780
Width = 1575
End
Begin CommandButton Command3
Caption = "Exit"
Height = 555
Index = 2
Left = 1560
TabIndex = 3
Top = 2850
Width = 1575
End
Begin CommandButton Command3
Caption = "Sub 2"
Height = 555
Index = 1
Left = 1560
TabIndex = 2
Top = 1455
Width = 1575
End
Begin Label ret
BackStyle = 0 'Transparent
BorderStyle = 1 'Fixed Single
Caption = "Label3"
DataField = "Name"
DataSource = "BankCtrl"
Height = 240
Left = 2640
TabIndex = 6
Top = 2400
Width = 1215
End
Begin Label Label2
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "Form2 returned:"
Height = 240
Left = 540
TabIndex = 5
Top = 2400
Width = 1815
End
Begin Label Label1
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "Enter Arg:"
Height = 240
Left = 1125
TabIndex = 4
Top = 405
Width = 1035
End
End
Option Explicit
Sub Command3_Click (index As Integer)
Load form2
Select Case index
Case 0: ' call Sub1 in form2 with argument arg
Call dispatch1(form2, "Sub1", arg)
Case 1: ' call Sub2 in form2 with argument arg
Call dispatch1(form2, "Sub2", arg)
Case 2:
End
End Select
' wait until dispatched sub returns a value
Call dispatchWait
' show the returned value
ret = dispatchGetVal()
End Sub