home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 27 / IOPROG_27.ISO / SOFT / ADSDK.ZIP / Samples / Exchange / MailBox / mailbox.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-08-13  |  8.6 KB  |  261 lines

  1. VERSION 5.00
  2. Begin VB.Form MailboxFrm 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "Create Exchange Mailbox with ADSI"
  5.    ClientHeight    =   4080
  6.    ClientLeft      =   1560
  7.    ClientTop       =   1845
  8.    ClientWidth     =   9360
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    MinButton       =   0   'False
  12.    ScaleHeight     =   4080
  13.    ScaleWidth      =   9360
  14.    Begin VB.Frame Frame2 
  15.       Caption         =   "Mailbox Settings"
  16.       Height          =   3735
  17.       Left            =   240
  18.       TabIndex        =   0
  19.       Top             =   120
  20.       Width           =   5175
  21.       Begin VB.TextBox txtUserName 
  22.          Height          =   285
  23.          Left            =   1560
  24.          TabIndex        =   10
  25.          Top             =   2040
  26.          Width           =   3255
  27.       End
  28.       Begin VB.TextBox txtFirstName 
  29.          Height          =   285
  30.          Left            =   1560
  31.          TabIndex        =   12
  32.          Top             =   2400
  33.          Width           =   3255
  34.       End
  35.       Begin VB.TextBox txtLastName 
  36.          Height          =   285
  37.          Left            =   1560
  38.          TabIndex        =   14
  39.          Top             =   2760
  40.          Width           =   3255
  41.       End
  42.       Begin VB.TextBox txtEMailAddress 
  43.          Height          =   285
  44.          Left            =   1560
  45.          TabIndex        =   16
  46.          Text            =   "@ntmarst.com"
  47.          Top             =   3120
  48.          Width           =   3255
  49.       End
  50.       Begin VB.TextBox txtExchOrganization 
  51.          Height          =   285
  52.          Left            =   1560
  53.          TabIndex        =   6
  54.          Text            =   "NTMARST"
  55.          Top             =   1080
  56.          Width           =   3255
  57.       End
  58.       Begin VB.TextBox txtExchSite 
  59.          Height          =   285
  60.          Left            =   1560
  61.          TabIndex        =   8
  62.          Text            =   "MAIL"
  63.          Top             =   1440
  64.          Width           =   3255
  65.       End
  66.       Begin VB.TextBox txtExchServer 
  67.          Height          =   285
  68.          Left            =   1560
  69.          TabIndex        =   4
  70.          Text            =   "IRIS"
  71.          Top             =   720
  72.          Width           =   3255
  73.       End
  74.       Begin VB.TextBox txtNTServer 
  75.          Height          =   285
  76.          Left            =   1560
  77.          TabIndex        =   2
  78.          Text            =   "IRIS"
  79.          Top             =   360
  80.          Width           =   3255
  81.       End
  82.       Begin VB.Label Label2 
  83.          Caption         =   "User/Mailbox ID"
  84.          Height          =   255
  85.          Left            =   240
  86.          TabIndex        =   9
  87.          Top             =   2040
  88.          Width           =   1335
  89.       End
  90.       Begin VB.Label Label3 
  91.          Caption         =   "First name"
  92.          Height          =   255
  93.          Left            =   240
  94.          TabIndex        =   11
  95.          Top             =   2400
  96.          Width           =   1215
  97.       End
  98.       Begin VB.Label Label4 
  99.          Caption         =   "Last name"
  100.          Height          =   255
  101.          Left            =   240
  102.          TabIndex        =   13
  103.          Top             =   2760
  104.          Width           =   1215
  105.       End
  106.       Begin VB.Label Label11 
  107.          Caption         =   "E-mail Address"
  108.          Height          =   255
  109.          Left            =   240
  110.          TabIndex        =   15
  111.          Top             =   3120
  112.          Width           =   1215
  113.       End
  114.       Begin VB.Label Label8 
  115.          Caption         =   "Exchange Org"
  116.          Height          =   255
  117.          Left            =   240
  118.          TabIndex        =   5
  119.          Top             =   1080
  120.          Width           =   1215
  121.       End
  122.       Begin VB.Label Label9 
  123.          Caption         =   "Exchange Site"
  124.          Height          =   255
  125.          Left            =   240
  126.          TabIndex        =   7
  127.          Top             =   1440
  128.          Width           =   1215
  129.       End
  130.       Begin VB.Label Label10 
  131.          Caption         =   "Exchange Server"
  132.          Height          =   255
  133.          Left            =   240
  134.          TabIndex        =   3
  135.          Top             =   720
  136.          Width           =   1335
  137.       End
  138.       Begin VB.Label Label5 
  139.          Caption         =   "NT Server"
  140.          Height          =   255
  141.          Left            =   240
  142.          TabIndex        =   1
  143.          Top             =   360
  144.          Width           =   1215
  145.       End
  146.    End
  147.    Begin VB.Frame Frame1 
  148.       Caption         =   "Administrative Credentials"
  149.       Height          =   1575
  150.       Left            =   5640
  151.       TabIndex        =   17
  152.       Top             =   120
  153.       Width           =   3495
  154.       Begin VB.TextBox txtDomain 
  155.          Height          =   285
  156.          Left            =   1320
  157.          TabIndex        =   21
  158.          Text            =   "ARGUS"
  159.          Top             =   720
  160.          Width           =   1935
  161.       End
  162.       Begin VB.TextBox txtAdmin 
  163.          Height          =   315
  164.          Left            =   1320
  165.          TabIndex        =   19
  166.          Text            =   "Administrator"
  167.          Top             =   360
  168.          Width           =   1935
  169.       End
  170.       Begin VB.TextBox txtPassword 
  171.          Height          =   285
  172.          IMEMode         =   3  'DISABLE
  173.          Left            =   1320
  174.          PasswordChar    =   "*"
  175.          TabIndex        =   23
  176.          Top             =   1080
  177.          Width           =   1935
  178.       End
  179.       Begin VB.Label Label1 
  180.          Caption         =   "NT Domain :"
  181.          Height          =   255
  182.          Left            =   240
  183.          TabIndex        =   20
  184.          Top             =   720
  185.          Width           =   1215
  186.       End
  187.       Begin VB.Label Label13 
  188.          Caption         =   "Administrator :"
  189.          Height          =   255
  190.          Left            =   240
  191.          TabIndex        =   18
  192.          Top             =   360
  193.          Width           =   1095
  194.       End
  195.       Begin VB.Label Label14 
  196.          Caption         =   "Password :"
  197.          Height          =   255
  198.          Left            =   240
  199.          TabIndex        =   22
  200.          Top             =   1080
  201.          Width           =   975
  202.       End
  203.    End
  204.    Begin VB.CommandButton cmdExit 
  205.       Caption         =   "E&xit"
  206.       Height          =   375
  207.       Left            =   6000
  208.       TabIndex        =   26
  209.       Top             =   3480
  210.       Width           =   2895
  211.    End
  212.    Begin VB.CommandButton cmdDeleteMailbox 
  213.       Caption         =   "Delete Mailbox"
  214.       Height          =   375
  215.       Left            =   6000
  216.       TabIndex        =   25
  217.       Top             =   2640
  218.       Width           =   2895
  219.    End
  220.    Begin VB.CommandButton cmdCreateMailbox 
  221.       Caption         =   "Create Mailbox"
  222.       Default         =   -1  'True
  223.       Height          =   375
  224.       Left            =   6000
  225.       TabIndex        =   24
  226.       Top             =   2040
  227.       Width           =   2895
  228.    End
  229. Attribute VB_Name = "MailboxFrm"
  230. Attribute VB_GlobalNameSpace = False
  231. Attribute VB_Creatable = False
  232. Attribute VB_PredeclaredId = True
  233. Attribute VB_Exposed = False
  234. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  235. '' ADSI Sample to create and delete Exchange 5.5 Mailboxes
  236. '' Richard Ault, Jean-Philippe Balivet, Neil Wemple -- 1998
  237. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  238. Option Explicit
  239. Private Sub cmdCreateMailbox_Click()
  240.     MailboxFrm.MousePointer = vbHourglass
  241.     Call Create_NT_Account(txtDomain, txtAdmin, txtPassword, _
  242.                            txtUserName, txtFirstName & txtLastName, _
  243.                            txtNTServer)
  244.     Call Create_Exchange_MailBox(False, txtNTServer, txtDomain, txtAdmin, _
  245.                                  txtPassword, txtUserName, txtEMailAddress, _
  246.                                  txtFirstName, txtLastName, txtExchServer, _
  247.                                  txtExchSite, txtExchOrganization)
  248.     MailboxFrm.MousePointer = vbDefault
  249. End Sub
  250. Private Sub cmdDeleteMailbox_Click()
  251.     MailboxFrm.MousePointer = vbHourglass
  252.     Call Delete_Exchange_Mailbox(False, txtDomain, txtAdmin, _
  253.                                  txtPassword, txtUserName, txtExchServer, _
  254.                                  txtExchSite, txtExchOrganization)
  255.     Call Delete_NT_Account(txtDomain, txtAdmin, txtPassword, txtUserName)
  256.     MailboxFrm.MousePointer = vbDefault
  257. End Sub
  258. Private Sub cmdExit_Click()
  259.     End
  260. End Sub
  261.