home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / VISUAL_B / CODIGO_1 / DISPATCH / FORM1.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1993-09-01  |  2.9 KB  |  100 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    BackColor       =   &H00C0C0C0&
  4.    Caption         =   "Form1"
  5.    ClientHeight    =   4005
  6.    ClientLeft      =   1740
  7.    ClientTop       =   2670
  8.    ClientWidth     =   4695
  9.    Height          =   4410
  10.    Left            =   1680
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   4005
  13.    ScaleWidth      =   4695
  14.    Top             =   2325
  15.    Width           =   4815
  16.    Begin TextBox Arg 
  17.       BackColor       =   &H00FFFFFF&
  18.       Height          =   285
  19.       Left            =   2385
  20.       TabIndex        =   0
  21.       Text            =   "Text1"
  22.       Top             =   360
  23.       Width           =   975
  24.    End
  25.    Begin CommandButton Command3 
  26.       Caption         =   "Sub 1"
  27.       Height          =   555
  28.       Index           =   0
  29.       Left            =   1560
  30.       TabIndex        =   1
  31.       Top             =   780
  32.       Width           =   1575
  33.    End
  34.    Begin CommandButton Command3 
  35.       Caption         =   "Exit"
  36.       Height          =   555
  37.       Index           =   2
  38.       Left            =   1560
  39.       TabIndex        =   3
  40.       Top             =   2850
  41.       Width           =   1575
  42.    End
  43.    Begin CommandButton Command3 
  44.       Caption         =   "Sub 2"
  45.       Height          =   555
  46.       Index           =   1
  47.       Left            =   1560
  48.       TabIndex        =   2
  49.       Top             =   1455
  50.       Width           =   1575
  51.    End
  52.    Begin Label ret 
  53.       BackStyle       =   0  'Transparent
  54.       BorderStyle     =   1  'Fixed Single
  55.       Caption         =   "Label3"
  56.       DataField       =   "Name"
  57.       DataSource      =   "BankCtrl"
  58.       Height          =   240
  59.       Left            =   2640
  60.       TabIndex        =   6
  61.       Top             =   2400
  62.       Width           =   1215
  63.    End
  64.    Begin Label Label2 
  65.       Alignment       =   1  'Right Justify
  66.       BackStyle       =   0  'Transparent
  67.       Caption         =   "Form2 returned:"
  68.       Height          =   240
  69.       Left            =   540
  70.       TabIndex        =   5
  71.       Top             =   2400
  72.       Width           =   1815
  73.    End
  74.    Begin Label Label1 
  75.       Alignment       =   1  'Right Justify
  76.       BackStyle       =   0  'Transparent
  77.       Caption         =   "Enter Arg:"
  78.       Height          =   240
  79.       Left            =   1125
  80.       TabIndex        =   4
  81.       Top             =   405
  82.       Width           =   1035
  83.    End
  84. Option Explicit
  85. Sub Command3_Click (index As Integer)
  86.     Load form2
  87.     Select Case index
  88.         Case 0:      ' call Sub1 in form2 with argument arg
  89.             Call dispatch1(form2, "Sub1", arg)
  90.         Case 1:      ' call Sub2 in form2 with argument arg
  91.             Call dispatch1(form2, "Sub2", arg)
  92.         Case 2:
  93.             End
  94.     End Select
  95.     ' wait until dispatched sub returns a value
  96.     Call dispatchWait
  97.     ' show the returned value
  98.     ret = dispatchGetVal()
  99. End Sub
  100.