?? form1.vb
字號:
Public Class Form1
Inherits System.Windows.Forms.Form
#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
Friend WithEvents Panel1 As System.Windows.Forms.Panel
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents ComboBox1 As System.Windows.Forms.ComboBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents exDatePicker As System.Windows.Forms.DateTimePicker
'Required by the Windows Form Designer
Private components As System.ComponentModel.Container
'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.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.exDatePicker = New System.Windows.Forms.DateTimePicker()
Me.Label1 = New System.Windows.Forms.Label()
Me.Label2 = New System.Windows.Forms.Label()
Me.Label3 = New System.Windows.Forms.Label()
Me.Label4 = New System.Windows.Forms.Label()
Me.ComboBox1 = New System.Windows.Forms.ComboBox()
Me.Panel1 = New System.Windows.Forms.Panel()
Me.Button1 = New System.Windows.Forms.Button()
Me.TextBox2 = New System.Windows.Forms.TextBox()
Me.TextBox1 = New System.Windows.Forms.TextBox()
Me.Panel1.SuspendLayout()
Me.SuspendLayout()
'
'exDatePicker
'
Me.exDatePicker.Location = New System.Drawing.Point(40, 208)
Me.exDatePicker.Name = "exDatePicker"
Me.exDatePicker.Size = New System.Drawing.Size(240, 22)
Me.exDatePicker.TabIndex = 4
Me.exDatePicker.Value = New Date(2002, 2, 15, 0, 0, 0, 0)
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(40, 24)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(144, 16)
Me.Label1.TabIndex = 1
Me.Label1.Text = "Choose Credit Card:"
'
'Label2
'
Me.Label2.Location = New System.Drawing.Point(40, 104)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(192, 16)
Me.Label2.TabIndex = 3
Me.Label2.Text = "Enter Credit Card Number:"
'
'Label3
'
Me.Label3.Location = New System.Drawing.Point(40, 184)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(176, 16)
Me.Label3.TabIndex = 5
Me.Label3.Text = "Enter Expiry Date:"
'
'Label4
'
Me.Label4.Location = New System.Drawing.Point(40, 264)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(112, 16)
Me.Label4.TabIndex = 7
Me.Label4.Text = "Enter Amount:"
'
'ComboBox1
'
Me.ComboBox1.AllowDrop = True
Me.ComboBox1.DropDownWidth = 168
Me.ComboBox1.Items.AddRange(New Object() {"VISA", "MASTERCARD", "AMEX", "DISCOVER"})
Me.ComboBox1.Location = New System.Drawing.Point(40, 48)
Me.ComboBox1.Name = "ComboBox1"
Me.ComboBox1.Size = New System.Drawing.Size(168, 24)
Me.ComboBox1.TabIndex = 0
'
'Panel1
'
Me.Panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.Panel1.Controls.AddRange(New System.Windows.Forms.Control() {Me.Button1, Me.Label4, Me.TextBox2, Me.Label3, Me.exDatePicker, Me.TextBox1, Me.Label2, Me.ComboBox1, Me.Label1})
Me.Panel1.Location = New System.Drawing.Point(24, 24)
Me.Panel1.Name = "Panel1"
Me.Panel1.Size = New System.Drawing.Size(512, 416)
Me.Panel1.TabIndex = 4
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(296, 344)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(168, 32)
Me.Button1.TabIndex = 8
Me.Button1.Text = "Send Payment"
'
'TextBox2
'
Me.TextBox2.Location = New System.Drawing.Point(40, 287)
Me.TextBox2.Name = "TextBox2"
Me.TextBox2.Size = New System.Drawing.Size(152, 22)
Me.TextBox2.TabIndex = 6
Me.TextBox2.Text = "TextBox2"
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(40, 129)
Me.TextBox1.MaxLength = 16
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(256, 22)
Me.TextBox1.TabIndex = 2
Me.TextBox1.Text = "TextBox1"
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(6, 15)
Me.ClientSize = New System.Drawing.Size(568, 480)
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Panel1})
Me.Name = "Form1"
Me.Text = "Payment Client"
Me.Panel1.ResumeLayout(False)
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub Label2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub Label3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label3.Click
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim ccName As String
Dim ccNumber As String
Dim ccExpiryDate As String
Dim amount As Double
ccName = ComboBox1.Text
Dim paymentAgent As New WebReference1.Payment()
Dim cci As New WebReference1.CreditCardInfo()
cci.ccName = ComboBox1.Text
cci.ccNumber = TextBox1.Text
cci.ccExpiry = exDatePicker.Value
cci.amount = TextBox2.Text
paymentAgent.processPayment(cci)
MsgBox("Payment Processed")
End Sub
End Class
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -