经典参考(1)一定对你有用的代码!!
Bardo 2002-02-28 10:05:14 这是一个用VB写的工具,不过现在已没有源代码下载了,而软件己标上的价格
所以我现在开始偷偷的发给大家,可不要。。。。。
CS_tools.VBW
---------------------
frmdomainlogin = 14, 41, 492, 489, , 22, 22, 471, 470, C
MDIFrmmain = 22, 22, 500, 470, , 44, 44, 522, 492, C
frmadmin = 198, 198, 676, 646, , 88, 88, 566, 536, C
frmbulkuser = 44, 44, 411, 382, , 22, 22, 389, 360, C
frmuser = 88, 88, 463, 434, , 44, 44, 411, 382, C
frmbulkgroup = 154, 154, 529, 500, , 110, 110, 477, 448, C
frmgroup = 0, 0, 478, 448, , 132, 132, 499, 470, C
frmcomputer = 44, 44, 419, 390, , 22, 22, 389, 360, C
frmrenameuser = 22, 22, 397, 368, , 0, 0, 375, 346, C
frmusergroup = 110, 110, 485, 456, , 132, 132, 507, 478, C
frmuserprofile = 44, 44, 419, 390, , 154, 154, 529, 500, C
frmuseraccount = 132, 132, 507, 478, , 110, 110, 485, 456, C
frmadduser = 44, 44, 419, 390, Z, 22, 22, 397, 368, C
frmgroupdesc = 176, 176, 654, 624, , 154, 154, 632, 602, C
frmremotecommand = 88, 88, 463, 434, , 66, 66, 441, 412, C
frmservices = 132, 132, 507, 478, , 22, 22, 397, 368, C
frmprocesses = 0, 0, 375, 346, , 44, 44, 419, 390, C
frmshortcut = 154, 154, 529, 500, , 66, 66, 441, 412, C
frmresolve = 44, 44, 419, 390, , 22, 22, 397, 368, C
Module1 = 0, 0, 375, 346,
frmping = 132, 132, 507, 478, , 0, 0, 375, 346, C
frminternetdomain = 154, 154, 529, 500, , 132, 132, 507, 478, C
pingmod = 88, 88, 552, 369,
frmAbout = 0, 0, 0, 0, C, 132, 132, 507, 478, C
ResetPwd = 66, 66, 441, 412, , 22, 22, 397, 368, C
frmbulkshortcut = 66, 66, 441, 412, , 22, 22, 397, 368, C
frmprintstat = 66, 66, 441, 412, , 44, 44, 419, 390, C
Helper = 88, 88, 463, 434,
frmuserbackup = 0, 0, 502, 444, , 198, 198, 700, 642, C
frmuserdata = 0, 0, 502, 444, , 22, 22, 524, 466, C
frmuserdataview = 44, 44, 546, 488, , 132, 132, 507, 478, C
frmuserrestoredata = 0, 0, 502, 444, , 198, 198, 700, 642, C
frmsplash = 0, 0, 0, 0, C, 66, 66, 568, 510, C
frmmoduser.frm
--------------------------------------
VERSION 5.00
Begin VB.Form frmadduser
BorderStyle = 4 'Fixed ToolWindow
Caption = "Add User Account"
ClientHeight = 1755
ClientLeft = 45
ClientTop = 285
ClientWidth = 3960
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 1755
ScaleWidth = 3960
Begin VB.CommandButton Command3
Caption = "Close"
Height = 375
Left = 2640
TabIndex = 5
Top = 1320
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "Edit"
Enabled = 0 'False
Height = 375
Left = 2640
TabIndex = 4
Top = 720
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "Create User"
Height = 375
Left = 2640
TabIndex = 3
Top = 120
Width = 1215
End
Begin VB.TextBox Text1
Height = 285
Left = 120
TabIndex = 1
Top = 360
Width = 2415
End
Begin VB.Label Label2
Alignment = 2 'Center
Caption = "After you have made the new user you will have the option of editing the user info and account properities."
Height = 855
Left = 120
TabIndex = 2
Top = 720
Width = 2295
End
Begin VB.Label Label1
Alignment = 2 'Center
Caption = "Please enter the New User Name:"
Height = 255
Left = 120
TabIndex = 0
Top = 120
Width = 2415
End
End
Attribute VB_Name = "frmadduser"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
On Error Resume Next
MDIFrmmain.StatusBar1.Panels(1).Text = "Status: Working..."
MousePointer = vbHourglass
If Text1.Text = "" Then
MsgBox "Please type in a user name to create"
MDIFrmmain.StatusBar1.Panels(1).Text = "Status:"
Exit Sub
Else
End If
Dim dso As IADsOpenDSObject
username = frmdomainlogin.Text1.Text
password = frmdomainlogin.Text2.Text
DomainName = frmdomainlogin.Combo1.Text
Dim container As IADsContainer
Dim containername As String
Dim user As IADsUser
Dim newuser As String
containername = frmdomainlogin.Combo1.Text
If frmdomainlogin.Check1.Value = 1 Then
Set container = GetObject("WinNT://" & containername)
Else
Set dso = GetObject("WinNT:")
Set container = dso.OpenDSObject("WinNT://" & containername, username, password, 0)
End If
newuser = Text1.Text
Set user = container.Create("User", newuser)
user.SetInfo
Command2.Enabled = True
Command1.Enabled = False
Err = 0
MousePointer = 0
MDIFrmmain.StatusBar1.Panels(1).Text = "Status:"
End Sub
Private Sub Command2_Click()
frmuser.Show
frmuser.Label7.Caption = Text1.Text
frmuser.Timer1.Enabled = True
DoEvents
Unload Me
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
Call Command1_Click
DoEvents
End If
End Sub