home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 27 / IOPROG_27.ISO / SOFT / ADSDK.ZIP / ResourceKit / ADsRas / RasClient.frm (.txt) next >
Encoding:
Visual Basic Form  |  1999-04-12  |  3.7 KB  |  129 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "Form1"
  4.    ClientHeight    =   3900
  5.    ClientLeft      =   60
  6.    ClientTop       =   345
  7.    ClientWidth     =   5160
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   3900
  10.    ScaleWidth      =   5160
  11.    StartUpPosition =   3  'Windows Default
  12.    Begin VB.CommandButton cmdSet 
  13.       Caption         =   "Set"
  14.       Height          =   375
  15.       Left            =   1560
  16.       TabIndex        =   9
  17.       Top             =   3360
  18.       Width           =   1455
  19.    End
  20.    Begin VB.CommandButton cmdGet 
  21.       Caption         =   "Get"
  22.       Height          =   375
  23.       Left            =   3720
  24.       TabIndex        =   2
  25.       Top             =   600
  26.       Width           =   1335
  27.    End
  28.    Begin VB.Frame Frame1 
  29.       Caption         =   "CallBack"
  30.       Height          =   1575
  31.       Left            =   120
  32.       TabIndex        =   4
  33.       Top             =   1560
  34.       Width           =   4935
  35.       Begin VB.TextBox phoneNumber 
  36.          Height          =   375
  37.          Left            =   1680
  38.          TabIndex        =   8
  39.          Text            =   "Text2"
  40.          Top             =   960
  41.          Width           =   1935
  42.       End
  43.       Begin VB.OptionButton setByAdmin 
  44.          Caption         =   "Preset To:"
  45.          Height          =   255
  46.          Left            =   120
  47.          TabIndex        =   7
  48.          Top             =   960
  49.          Width           =   1095
  50.       End
  51.       Begin VB.OptionButton setByTheCaller 
  52.          Caption         =   "Set By The Caller"
  53.          Height          =   255
  54.          Left            =   120
  55.          TabIndex        =   6
  56.          Top             =   600
  57.          Width           =   2655
  58.       End
  59.       Begin VB.OptionButton noCallBack 
  60.          Caption         =   "NoCallBack"
  61.          Height          =   255
  62.          Left            =   120
  63.          TabIndex        =   5
  64.          Top             =   240
  65.          Width           =   1935
  66.       End
  67.    End
  68.    Begin VB.CheckBox chkDialin 
  69.       Caption         =   "Dial-in Permission"
  70.       Height          =   255
  71.       Left            =   240
  72.       TabIndex        =   3
  73.       Top             =   1200
  74.       Width           =   2175
  75.    End
  76.    Begin VB.TextBox adsPath 
  77.       Height          =   375
  78.       Left            =   240
  79.       TabIndex        =   1
  80.       Text            =   "Text1"
  81.       Top             =   600
  82.       Width           =   3375
  83.    End
  84.    Begin VB.Label Label1 
  85.       Caption         =   "User ADsPath"
  86.       Height          =   255
  87.       Left            =   240
  88.       TabIndex        =   0
  89.       Top             =   240
  90.       Width           =   1215
  91.    End
  92. Attribute VB_Name = "Form1"
  93. Attribute VB_GlobalNameSpace = False
  94. Attribute VB_Creatable = False
  95. Attribute VB_PredeclaredId = True
  96. Attribute VB_Exposed = False
  97. Public x
  98. Private Sub cmdGet_Click()
  99. Set x = GetObject(adsPath)
  100. If (x.DialinPrivilege = True) Then
  101.   chkDialin.Value = 1
  102.   chkDialin.Value = 0
  103. End If
  104. l = x.GetRasCallBack
  105. If (l And ADS_RAS_NOCALLBACK) Then
  106.   noCallBack = True
  107. ElseIf (l And ADS_RAS_CALLER_SETCALLBACK) Then
  108.   setByTheCaller = True
  109. ElseIf (l And ADS_RAS_ADMIN_SETCALLBACK) Then
  110.   setByAdmin = True
  111.   phoneNumber = x.GetRasPhoneNumber
  112. End If
  113. End Sub
  114. Private Sub cmdSet_Click()
  115. If (chkDialin.Value = 0) Then
  116.    x.DialinPrivilege = False
  117.    x.DialinPrivilege = True
  118. End If
  119. If (noCallBack) Then
  120.   x.SetRasCallBack ADS_RAS_NOCALLBACK
  121. ElseIf (setByTheCaller) Then
  122.   x.SetRasCallBack ADS_RAS_CALLER_SETCALLBACK
  123. ElseIf (setByAdmin) Then
  124.   x.SetRasCallBack ADS_RAS_ADMIN_SETCALLBACK, phoneNumber
  125. End If
  126. End Sub
  127. Private Sub Form_Load()
  128. End Sub
  129.