Anybody here can give me some VB Script advice?
Anybody here can give me some VB Script advice?
here's the deal...
I need to write all Administrators group users in a .txt file named "admin.txt" using LDAP...then I need to save it on the root drive (C:/).
Now this must be a joke to some of you but since I'm a noob I need some help.
Thanks
I need to write all Administrators group users in a .txt file named "admin.txt" using LDAP...then I need to save it on the root drive (C:/).
Now this must be a joke to some of you but since I'm a noob I need some help.
Thanks
May be useful, with sample code and such:
http://www.ericphelps.com/scripting/
And the MSDN Full language reference:
http://msdn.microsoft.com/library/defau ... erence.asp
http://www.ericphelps.com/scripting/
And the MSDN Full language reference:
http://msdn.microsoft.com/library/defau ... erence.asp
And a few more you can pick through, all with some valuable samples and stuff:
http://www.robvanderwoude.com/index.html
http://www.visualbasicscript.com/
http://www.w3schools.com/vbscript/
http://www.microsoft.com/downloads/deta ... 814FE2DA5A
http://www.winguides.com/scripting/libr ... category=2
http://labmice.techtarget.com/scripting/WSH.htm
http://www.microsoft.com/technet/commun ... w0702.mspx
http://www.microsoft.com/technet/script ... ivb28.mspx
http://www.robvanderwoude.com/index.html
http://www.visualbasicscript.com/
http://www.w3schools.com/vbscript/
http://www.microsoft.com/downloads/deta ... 814FE2DA5A
http://www.winguides.com/scripting/libr ... category=2
http://labmice.techtarget.com/scripting/WSH.htm
http://www.microsoft.com/technet/commun ... w0702.mspx
http://www.microsoft.com/technet/script ... ivb28.mspx
Code: Select all
Private fso As New FileSystemObject
Private strm As TextStream
Set strm = fso.CreateTextFile("\admin.txt", True)
With strm
.WriteLine Text1.Text
.Close
End With
-
Freakaloin
- Posts: 10620
- Joined: Tue May 07, 2002 7:00 am
Re: Anybody here can give me some VB Script advice?
is this a joke?Duhard wrote:here's the deal...
I need to write all Administrators group users in a .txt file named "admin.txt" using LDAP...then I need to save it on the root drive (C:/).
Now this must be a joke to some of you but since I'm a noob I need some help.
Thanks
- GONNAFISTYA
- Posts: 13369
- Joined: Sun Jan 23, 2005 8:20 pm
-
stocktroll
- Posts: 1314
- Joined: Mon Mar 21, 2005 2:44 am
Code: Select all
string Duhard = "pathetic noob\n";
Re: Anybody here can give me some VB Script advice?
...are you gay?Freakaloin wrote:is this a joke?Duhard wrote:here's the deal...
I need to write all Administrators group users in a .txt file named "admin.txt" using LDAP...then I need to save it on the root drive (C:/).
Now this must be a joke to some of you but since I'm a noob I need some help.
Thanks
-
Tormentius
- Posts: 4108
- Joined: Sat Dec 14, 2002 8:00 am
You're welcome.Duhard wrote:Thanks manTormentius wrote:Here is what you're looking for Duhard.
-
Freakaloin
- Posts: 10620
- Joined: Tue May 07, 2002 7:00 am
I have a job to do and I can't get a job?Freakaloin wrote:Duhard wrote:I'm no nerd you fucktards....It's called having a job to do...nerds.GONNAFISTYA wrote:Fuckin hell Duhy went and turned all nerd on us.
Ban the fucker.
lol...having a job to do...so its not an actual job...lol...moron...u can't even get a job...and i don't want want...CRUSHED...
ffs make sense you fucktard...
-
Freakaloin
- Posts: 10620
- Joined: Tue May 07, 2002 7:00 am
Re: Anybody here can give me some VB Script advice?
Ey bud, much simpler to do it with the dsquery command.Duhard wrote:here's the deal...
I need to write all Administrators group users in a .txt file named "admin.txt" using LDAP...then I need to save it on the root drive (C:/).
Now this must be a joke to some of you but since I'm a noob I need some help.
Thanks
like this:
dsquery user OU=Security,DC=YOUR_DOMAIN,DC=YOUR_DOMAIN_SUFFIX > admins.txt
Of course, this assumes all your admins are in the security container as they should be
Last edited by Foo on Wed Apr 13, 2005 5:23 pm, edited 1 time in total.
"Maybe you have some bird ideas. Maybe that’s the best you can do."
― Terry A. Davis
― Terry A. Davis
-
Freakaloin
- Posts: 10620
- Joined: Tue May 07, 2002 7:00 am
'©2003 Prentice Hall
'By Geoff Leach
'Created/Revised: 04/20/05
'Procedure for calculating a loan payment.
Public Class Form1
Inherits System.Windows.Forms.Form
Friend sngPrincipal As Single
Friend sngRate As Single
Friend intTerm As Integer
#Region "Data Validation"
Private Sub txtPrincipal_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtPrincipal.Validating
Try
If Val(txtPrincipal.Text) < 2000 Or Val(txtPrincipal.Text) > 50000 Then
Throw New Exception
End If
Catch ex As Exception
'Cancel the event and select the text to be corrected by the user
e.Cancel = True
txtPrincipal.Select(0, txtPrincipal.Text.Length)
MsgBox("The loan amount must be a number between 2000 and 50000.", MsgBoxStyle.Critical, "Invalid Entry!")
End Try
End Sub
Private Sub txtRate_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtRate.Validating
Try
If Val(txtRate.Text) < 0.025 Or Val(txtRate.Text) > 0.125 Then
Throw New Exception
End If
Catch ex As Exception
'Cancel the event and select the text to be corrected by the user.
e.Cancel = True
txtRate.Select(0, txtRate.Text.Length)
MsgBox("The loan rate must be a decimal value greater then zero and less than 12.5%.", MsgBoxStyle.Critical, "Invalid Entry!")
End Try
End Sub
Private Sub txtTerm_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtTerm.Validating
Try
If Val(txtTerm.Text) < 1 Or Val(txtTerm.Text) > 10 Then
Throw New Exception
End If
Catch ex As Exception
'Cancel the event and select the text to be corrected by the user.
e.Cancel = True
txtTerm.Select(0, txtTerm.Text.Length)
MsgBox("The loan term must be at least 1 and not more than 10.", MsgBoxStyle.Critical, "Invalid Entry!")
End Try
End Sub
#End Region
#Region "Procedures"
Sub CalculatePayment()
'Assign values to variables
sngPrincipal = Val(txtPrincipal.Text)
sngRate = Val(txtRate.Text) / 12
intTerm = Val(txtTerm.Text) * 12
'Call the LoanPayment function
lblMonthlyPayment.Text = Format(LoanPayment(sngPrincipal, sngRate, intTerm), "Currency")
End Sub
Function LoanPayment(ByVal Principal, ByVal Rate, ByVal Term) As Decimal
'Calculate the monthly payment, and return the value to the calling procedure.
Return Principal * (Rate / (1 - (1 + Rate) ^ -Term))
End Function
Friend Sub AppExit()
Dim intResponse As Integer
intResponse = MsgBox("Do you really want to exit this application?", 276, "Exit?")
If intResponse = 6 Then
End
End If
End Sub
#End Region
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu
Friend WithEvents mnuFile As System.Windows.Forms.MenuItem
Friend WithEvents mnuFileCalculate As System.Windows.Forms.MenuItem
Friend WithEvents mnuFileExit As System.Windows.Forms.MenuItem
Friend WithEvents lblPrincipal As System.Windows.Forms.Label
Friend WithEvents lblRate As System.Windows.Forms.Label
Friend WithEvents lblTerm As System.Windows.Forms.Label
Friend WithEvents txtPrincipal As System.Windows.Forms.TextBox
Friend WithEvents txtRate As System.Windows.Forms.TextBox
Friend WithEvents txtTerm As System.Windows.Forms.TextBox
Friend WithEvents lblPayment As System.Windows.Forms.Label
Friend WithEvents lblMonthlyPayment As System.Windows.Forms.Label
Friend WithEvents btnCalculate As System.Windows.Forms.Button
Friend WithEvents lblCopyright As System.Windows.Forms.Label
Friend WithEvents btnExit As System.Windows.Forms.Button
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.MainMenu1 = New System.Windows.Forms.MainMenu
Me.mnuFile = New System.Windows.Forms.MenuItem
Me.mnuFileCalculate = New System.Windows.Forms.MenuItem
Me.mnuFileExit = New System.Windows.Forms.MenuItem
Me.lblPrincipal = New System.Windows.Forms.Label
Me.lblRate = New System.Windows.Forms.Label
Me.lblTerm = New System.Windows.Forms.Label
Me.txtPrincipal = New System.Windows.Forms.TextBox
Me.txtRate = New System.Windows.Forms.TextBox
Me.txtTerm = New System.Windows.Forms.TextBox
Me.lblPayment = New System.Windows.Forms.Label
Me.lblMonthlyPayment = New System.Windows.Forms.Label
Me.btnCalculate = New System.Windows.Forms.Button
Me.btnExit = New System.Windows.Forms.Button
Me.lblCopyright = New System.Windows.Forms.Label
Me.SuspendLayout()
'
'MainMenu1
'
Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mnuFile})
'
'mnuFile
'
Me.mnuFile.Index = 0
Me.mnuFile.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mnuFileCalculate, Me.mnuFileExit})
Me.mnuFile.Text = "&File"
'
'mnuFileCalculate
'
Me.mnuFileCalculate.Index = 0
Me.mnuFileCalculate.Text = "C&alculate"
'
'mnuFileExit
'
Me.mnuFileExit.Index = 1
Me.mnuFileExit.Text = "E&xit"
'
'lblPrincipal
'
Me.lblPrincipal.Location = New System.Drawing.Point(64, 40)
Me.lblPrincipal.Name = "lblPrincipal"
Me.lblPrincipal.Size = New System.Drawing.Size(112, 16)
Me.lblPrincipal.TabIndex = 0
Me.lblPrincipal.Text = "Amount to Borrow:"
Me.lblPrincipal.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'lblRate
'
Me.lblRate.Location = New System.Drawing.Point(64, 72)
Me.lblRate.Name = "lblRate"
Me.lblRate.Size = New System.Drawing.Size(112, 16)
Me.lblRate.TabIndex = 1
Me.lblRate.Text = "Annual Interest Rate:"
Me.lblRate.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'lblTerm
'
Me.lblTerm.Location = New System.Drawing.Point(112, 104)
Me.lblTerm.Name = "lblTerm"
Me.lblTerm.Size = New System.Drawing.Size(64, 16)
Me.lblTerm.TabIndex = 2
Me.lblTerm.Text = "Loan Term:"
Me.lblTerm.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'txtPrincipal
'
Me.txtPrincipal.Location = New System.Drawing.Point(200, 40)
Me.txtPrincipal.Name = "txtPrincipal"
Me.txtPrincipal.Size = New System.Drawing.Size(120, 20)
Me.txtPrincipal.TabIndex = 3
Me.txtPrincipal.Text = ""
'
'txtRate
'
Me.txtRate.Location = New System.Drawing.Point(200, 72)
Me.txtRate.Name = "txtRate"
Me.txtRate.Size = New System.Drawing.Size(120, 20)
Me.txtRate.TabIndex = 4
Me.txtRate.Text = ""
'
'txtTerm
'
Me.txtTerm.Location = New System.Drawing.Point(200, 104)
Me.txtTerm.Name = "txtTerm"
Me.txtTerm.Size = New System.Drawing.Size(120, 20)
Me.txtTerm.TabIndex = 5
Me.txtTerm.Text = ""
'
'lblPayment
'
Me.lblPayment.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblPayment.Location = New System.Drawing.Point(72, 136)
Me.lblPayment.Name = "lblPayment"
Me.lblPayment.Size = New System.Drawing.Size(104, 16)
Me.lblPayment.TabIndex = 6
Me.lblPayment.Text = "Monthly Payment:"
Me.lblPayment.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'lblMonthlyPayment
'
Me.lblMonthlyPayment.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblMonthlyPayment.Location = New System.Drawing.Point(200, 136)
Me.lblMonthlyPayment.Name = "lblMonthlyPayment"
Me.lblMonthlyPayment.Size = New System.Drawing.Size(120, 16)
Me.lblMonthlyPayment.TabIndex = 7
'
'btnCalculate
'
Me.btnCalculate.Location = New System.Drawing.Point(352, 168)
Me.btnCalculate.Name = "btnCalculate"
Me.btnCalculate.Size = New System.Drawing.Size(80, 24)
Me.btnCalculate.TabIndex = 8
Me.btnCalculate.Text = "C&alculate"
'
'btnExit
'
Me.btnExit.Location = New System.Drawing.Point(368, 200)
Me.btnExit.Name = "btnExit"
Me.btnExit.Size = New System.Drawing.Size(64, 24)
Me.btnExit.TabIndex = 9
Me.btnExit.Text = "E&xit"
'
'lblCopyright
'
Me.lblCopyright.Location = New System.Drawing.Point(8, 240)
Me.lblCopyright.Name = "lblCopyright"
Me.lblCopyright.Size = New System.Drawing.Size(384, 16)
Me.lblCopyright.TabIndex = 10
Me.lblCopyright.Text = "©2003 Prentice Hall. Programming with Visual Basic.NET for Business."
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(456, 266)
Me.Controls.Add(Me.lblCopyright)
Me.Controls.Add(Me.btnExit)
Me.Controls.Add(Me.btnCalculate)
Me.Controls.Add(Me.lblMonthlyPayment)
Me.Controls.Add(Me.lblPayment)
Me.Controls.Add(Me.txtTerm)
Me.Controls.Add(Me.txtRate)
Me.Controls.Add(Me.txtPrincipal)
Me.Controls.Add(Me.lblTerm)
Me.Controls.Add(Me.lblRate)
Me.Controls.Add(Me.lblPrincipal)
Me.Menu = Me.MainMenu1
Me.Name = "Form1"
Me.Text = "Loan Function Application"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub btnCalculate_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCalculate.Click
CalculatePayment()
End Sub
Private Sub mnuFileCalculate_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mnuFileCalculate.Click
CalculatePayment()
End Sub
Private Sub btnExit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnExit.Click
AppExit()
End Sub
Private Sub mnuFileExit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mnuFileExit.Click
AppExit()
End Sub
End Class
'By Geoff Leach
'Created/Revised: 04/20/05
'Procedure for calculating a loan payment.
Public Class Form1
Inherits System.Windows.Forms.Form
Friend sngPrincipal As Single
Friend sngRate As Single
Friend intTerm As Integer
#Region "Data Validation"
Private Sub txtPrincipal_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtPrincipal.Validating
Try
If Val(txtPrincipal.Text) < 2000 Or Val(txtPrincipal.Text) > 50000 Then
Throw New Exception
End If
Catch ex As Exception
'Cancel the event and select the text to be corrected by the user
e.Cancel = True
txtPrincipal.Select(0, txtPrincipal.Text.Length)
MsgBox("The loan amount must be a number between 2000 and 50000.", MsgBoxStyle.Critical, "Invalid Entry!")
End Try
End Sub
Private Sub txtRate_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtRate.Validating
Try
If Val(txtRate.Text) < 0.025 Or Val(txtRate.Text) > 0.125 Then
Throw New Exception
End If
Catch ex As Exception
'Cancel the event and select the text to be corrected by the user.
e.Cancel = True
txtRate.Select(0, txtRate.Text.Length)
MsgBox("The loan rate must be a decimal value greater then zero and less than 12.5%.", MsgBoxStyle.Critical, "Invalid Entry!")
End Try
End Sub
Private Sub txtTerm_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtTerm.Validating
Try
If Val(txtTerm.Text) < 1 Or Val(txtTerm.Text) > 10 Then
Throw New Exception
End If
Catch ex As Exception
'Cancel the event and select the text to be corrected by the user.
e.Cancel = True
txtTerm.Select(0, txtTerm.Text.Length)
MsgBox("The loan term must be at least 1 and not more than 10.", MsgBoxStyle.Critical, "Invalid Entry!")
End Try
End Sub
#End Region
#Region "Procedures"
Sub CalculatePayment()
'Assign values to variables
sngPrincipal = Val(txtPrincipal.Text)
sngRate = Val(txtRate.Text) / 12
intTerm = Val(txtTerm.Text) * 12
'Call the LoanPayment function
lblMonthlyPayment.Text = Format(LoanPayment(sngPrincipal, sngRate, intTerm), "Currency")
End Sub
Function LoanPayment(ByVal Principal, ByVal Rate, ByVal Term) As Decimal
'Calculate the monthly payment, and return the value to the calling procedure.
Return Principal * (Rate / (1 - (1 + Rate) ^ -Term))
End Function
Friend Sub AppExit()
Dim intResponse As Integer
intResponse = MsgBox("Do you really want to exit this application?", 276, "Exit?")
If intResponse = 6 Then
End
End If
End Sub
#End Region
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu
Friend WithEvents mnuFile As System.Windows.Forms.MenuItem
Friend WithEvents mnuFileCalculate As System.Windows.Forms.MenuItem
Friend WithEvents mnuFileExit As System.Windows.Forms.MenuItem
Friend WithEvents lblPrincipal As System.Windows.Forms.Label
Friend WithEvents lblRate As System.Windows.Forms.Label
Friend WithEvents lblTerm As System.Windows.Forms.Label
Friend WithEvents txtPrincipal As System.Windows.Forms.TextBox
Friend WithEvents txtRate As System.Windows.Forms.TextBox
Friend WithEvents txtTerm As System.Windows.Forms.TextBox
Friend WithEvents lblPayment As System.Windows.Forms.Label
Friend WithEvents lblMonthlyPayment As System.Windows.Forms.Label
Friend WithEvents btnCalculate As System.Windows.Forms.Button
Friend WithEvents lblCopyright As System.Windows.Forms.Label
Friend WithEvents btnExit As System.Windows.Forms.Button
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.MainMenu1 = New System.Windows.Forms.MainMenu
Me.mnuFile = New System.Windows.Forms.MenuItem
Me.mnuFileCalculate = New System.Windows.Forms.MenuItem
Me.mnuFileExit = New System.Windows.Forms.MenuItem
Me.lblPrincipal = New System.Windows.Forms.Label
Me.lblRate = New System.Windows.Forms.Label
Me.lblTerm = New System.Windows.Forms.Label
Me.txtPrincipal = New System.Windows.Forms.TextBox
Me.txtRate = New System.Windows.Forms.TextBox
Me.txtTerm = New System.Windows.Forms.TextBox
Me.lblPayment = New System.Windows.Forms.Label
Me.lblMonthlyPayment = New System.Windows.Forms.Label
Me.btnCalculate = New System.Windows.Forms.Button
Me.btnExit = New System.Windows.Forms.Button
Me.lblCopyright = New System.Windows.Forms.Label
Me.SuspendLayout()
'
'MainMenu1
'
Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mnuFile})
'
'mnuFile
'
Me.mnuFile.Index = 0
Me.mnuFile.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mnuFileCalculate, Me.mnuFileExit})
Me.mnuFile.Text = "&File"
'
'mnuFileCalculate
'
Me.mnuFileCalculate.Index = 0
Me.mnuFileCalculate.Text = "C&alculate"
'
'mnuFileExit
'
Me.mnuFileExit.Index = 1
Me.mnuFileExit.Text = "E&xit"
'
'lblPrincipal
'
Me.lblPrincipal.Location = New System.Drawing.Point(64, 40)
Me.lblPrincipal.Name = "lblPrincipal"
Me.lblPrincipal.Size = New System.Drawing.Size(112, 16)
Me.lblPrincipal.TabIndex = 0
Me.lblPrincipal.Text = "Amount to Borrow:"
Me.lblPrincipal.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'lblRate
'
Me.lblRate.Location = New System.Drawing.Point(64, 72)
Me.lblRate.Name = "lblRate"
Me.lblRate.Size = New System.Drawing.Size(112, 16)
Me.lblRate.TabIndex = 1
Me.lblRate.Text = "Annual Interest Rate:"
Me.lblRate.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'lblTerm
'
Me.lblTerm.Location = New System.Drawing.Point(112, 104)
Me.lblTerm.Name = "lblTerm"
Me.lblTerm.Size = New System.Drawing.Size(64, 16)
Me.lblTerm.TabIndex = 2
Me.lblTerm.Text = "Loan Term:"
Me.lblTerm.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'txtPrincipal
'
Me.txtPrincipal.Location = New System.Drawing.Point(200, 40)
Me.txtPrincipal.Name = "txtPrincipal"
Me.txtPrincipal.Size = New System.Drawing.Size(120, 20)
Me.txtPrincipal.TabIndex = 3
Me.txtPrincipal.Text = ""
'
'txtRate
'
Me.txtRate.Location = New System.Drawing.Point(200, 72)
Me.txtRate.Name = "txtRate"
Me.txtRate.Size = New System.Drawing.Size(120, 20)
Me.txtRate.TabIndex = 4
Me.txtRate.Text = ""
'
'txtTerm
'
Me.txtTerm.Location = New System.Drawing.Point(200, 104)
Me.txtTerm.Name = "txtTerm"
Me.txtTerm.Size = New System.Drawing.Size(120, 20)
Me.txtTerm.TabIndex = 5
Me.txtTerm.Text = ""
'
'lblPayment
'
Me.lblPayment.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblPayment.Location = New System.Drawing.Point(72, 136)
Me.lblPayment.Name = "lblPayment"
Me.lblPayment.Size = New System.Drawing.Size(104, 16)
Me.lblPayment.TabIndex = 6
Me.lblPayment.Text = "Monthly Payment:"
Me.lblPayment.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'lblMonthlyPayment
'
Me.lblMonthlyPayment.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblMonthlyPayment.Location = New System.Drawing.Point(200, 136)
Me.lblMonthlyPayment.Name = "lblMonthlyPayment"
Me.lblMonthlyPayment.Size = New System.Drawing.Size(120, 16)
Me.lblMonthlyPayment.TabIndex = 7
'
'btnCalculate
'
Me.btnCalculate.Location = New System.Drawing.Point(352, 168)
Me.btnCalculate.Name = "btnCalculate"
Me.btnCalculate.Size = New System.Drawing.Size(80, 24)
Me.btnCalculate.TabIndex = 8
Me.btnCalculate.Text = "C&alculate"
'
'btnExit
'
Me.btnExit.Location = New System.Drawing.Point(368, 200)
Me.btnExit.Name = "btnExit"
Me.btnExit.Size = New System.Drawing.Size(64, 24)
Me.btnExit.TabIndex = 9
Me.btnExit.Text = "E&xit"
'
'lblCopyright
'
Me.lblCopyright.Location = New System.Drawing.Point(8, 240)
Me.lblCopyright.Name = "lblCopyright"
Me.lblCopyright.Size = New System.Drawing.Size(384, 16)
Me.lblCopyright.TabIndex = 10
Me.lblCopyright.Text = "©2003 Prentice Hall. Programming with Visual Basic.NET for Business."
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(456, 266)
Me.Controls.Add(Me.lblCopyright)
Me.Controls.Add(Me.btnExit)
Me.Controls.Add(Me.btnCalculate)
Me.Controls.Add(Me.lblMonthlyPayment)
Me.Controls.Add(Me.lblPayment)
Me.Controls.Add(Me.txtTerm)
Me.Controls.Add(Me.txtRate)
Me.Controls.Add(Me.txtPrincipal)
Me.Controls.Add(Me.lblTerm)
Me.Controls.Add(Me.lblRate)
Me.Controls.Add(Me.lblPrincipal)
Me.Menu = Me.MainMenu1
Me.Name = "Form1"
Me.Text = "Loan Function Application"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub btnCalculate_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCalculate.Click
CalculatePayment()
End Sub
Private Sub mnuFileCalculate_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mnuFileCalculate.Click
CalculatePayment()
End Sub
Private Sub btnExit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnExit.Click
AppExit()
End Sub
Private Sub mnuFileExit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mnuFileExit.Click
AppExit()
End Sub
End Class
a defining attribute of a government is that it has a monopoly on the legitimate exercise of violence...
