|
Rodrigo Flores Info Systems for Managers Spring 2007 |
|
< Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _Partial Class Form1 Inherits System.Windows.Forms.Form 'Form overrides dispose to clean up the component list.<System.Diagnostics.DebuggerNonUserCode()> _ Protected Overrides Sub Dispose(ByVal disposing As Boolean) Try If disposing AndAlso components IsNot Nothing Thencomponents.Dispose() End If Finally MyBase.Dispose(disposing) End Try 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.<System.Diagnostics.DebuggerStepThrough()> _ Private Sub InitializeComponent() Me.LinkLabel1 = New System.Windows.Forms.LinkLabel Me.Button1 = New System.Windows.Forms.Button Me.ComboBox1 = New System.Windows.Forms.ComboBox Me.DRINkS = New System.Windows.Forms.Label Me.Label1 = New System.Windows.Forms.Label Me.Label2 = New System.Windows.Forms.Label Me.Label3 = New System.Windows.Forms.Label Me.TextBox1 = New System.Windows.Forms.TextBox Me.TextBox2 = New System.Windows.Forms.TextBox Me.TextBox3 = New System.Windows.Forms.TextBox Me.LinkLabel2 = New System.Windows.Forms.LinkLabel Me.RichTextBox1 = New System.Windows.Forms.RichTextBox Me.Label4 = New System.Windows.Forms.Label Me.TextBox4 = New System.Windows.Forms.TextBox Me.Button2 = New System.Windows.Forms.Button Me.TextBox7 = New System.Windows.Forms.TextBox Me.Label6 = New System.Windows.Forms.Label Me.Label7 = New System.Windows.Forms.Label Me.PictureBox1 = New System.Windows.Forms.PictureBox CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' 'LinkLabel1 ' Me.LinkLabel1.AutoSize = True Me.LinkLabel1.Font = New System.Drawing.Font("Palatino Linotype", 26.25!, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.LinkLabel1.LinkColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(192, Byte), Integer)) Me.LinkLabel1.Location = New System.Drawing.Point(269, 9) Me.LinkLabel1.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.LinkLabel1.Name = "LinkLabel1" Me.LinkLabel1.Size = New System.Drawing.Size(302, 47) Me.LinkLabel1.TabIndex = 0 Me.LinkLabel1.TabStop = True Me.LinkLabel1.Text = "Rodrigos Portfolio" ' 'Button1 ' Me.Button1.ForeColor = System.Drawing.SystemColors.ControlText Me.Button1.ImageKey = "(none)" Me.Button1.Location = New System.Drawing.Point(497, 132) Me.Button1.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(217, 41) Me.Button1.TabIndex = 1 Me.Button1.Text = "Stock Symbol" Me.Button1.UseVisualStyleBackColor = True ' 'ComboBox1 ' Me.ComboBox1.FormattingEnabled = True Me.ComboBox1.Items.AddRange(New Object() {"imax", "Hmc", "Yhoo", "Goog", "AAPL", "Tm", "Ibm", "Lfl"}) Me.ComboBox1.Location = New System.Drawing.Point(417, 132) Me.ComboBox1.Name = "ComboBox1" Me.ComboBox1.Size = New System.Drawing.Size(85, 41) Me.ComboBox1.TabIndex = 3 ' 'DRINkS ' Me.DRINkS.AutoSize = True Me.DRINkS.ForeColor = System.Drawing.SystemColors.Desktop Me.DRINkS.Location = New System.Drawing.Point(357, 75) Me.DRINkS.Name = "DRINkS" Me.DRINkS.Size = New System.Drawing.Size(105, 33) Me.DRINkS.TabIndex = 4 Me.DRINkS.Text = "$$$$$$$$$$" ' 'Label1 ' Me.Label1.AutoSize = True Me.Label1.Location = New System.Drawing.Point(421, 181) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(56, 33) Me.Label1.TabIndex = 6 Me.Label1.Text = "Name" ' 'Label2 ' Me.Label2.AutoSize = True Me.Label2.Location = New System.Drawing.Point(421, 226) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(81, 33) Me.Label2.TabIndex = 7 Me.Label2.Text = "Category" ' 'Label3 ' Me.Label3.AutoSize = True Me.Label3.Location = New System.Drawing.Point(421, 271) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(131, 33) Me.Label3.TabIndex = 8 Me.Label3.Text = "Price Per chare" ' 'TextBox1 ' Me.TextBox1.Location = New System.Drawing.Point(568, 173) Me.TextBox1.Name = "TextBox1" Me.TextBox1.Size = New System.Drawing.Size(146, 41) Me.TextBox1.TabIndex = 9 ' 'TextBox2 ' Me.TextBox2.Location = New System.Drawing.Point(568, 218) Me.TextBox2.Name = "TextBox2" Me.TextBox2.Size = New System.Drawing.Size(146, 41) Me.TextBox2.TabIndex = 10 ' 'TextBox3 ' Me.TextBox3.Location = New System.Drawing.Point(568, 265) Me.TextBox3.Name = "TextBox3" Me.TextBox3.Size = New System.Drawing.Size(146, 41) Me.TextBox3.TabIndex = 11 ' 'LinkLabel2 ' Me.LinkLabel2.AutoSize = True Me.LinkLabel2.LinkColor = System.Drawing.Color.Yellow Me.LinkLabel2.Location = New System.Drawing.Point(85, 93) Me.LinkLabel2.Name = "LinkLabel2" Me.LinkLabel2.Size = New System.Drawing.Size(94, 33) Me.LinkLabel2.TabIndex = 13 Me.LinkLabel2.TabStop = True Me.LinkLabel2.Text = "Comments" ' 'RichTextBox1 ' Me.RichTextBox1.Location = New System.Drawing.Point(91, 148) Me.RichTextBox1.Name = "RichTextBox1" Me.RichTextBox1.Size = New System.Drawing.Size(168, 266) Me.RichTextBox1.TabIndex = 14 Me.RichTextBox1.Text = "" ' 'Label4 ' Me.Label4.AutoSize = True Me.Label4.Location = New System.Drawing.Point(84, 491) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing.Size(146, 33) Me.Label4.TabIndex = 15 Me.Label4.Text = "Number of Shares" ' 'TextBox4 ' Me.TextBox4.Location = New System.Drawing.Point(231, 483) Me.TextBox4.Name = "TextBox4" Me.TextBox4.Size = New System.Drawing.Size(66, 41) Me.TextBox4.TabIndex = 16 ' 'Button2 ' Me.Button2.BackColor = System.Drawing.SystemColors.AppWorkspace Me.Button2.Location = New System.Drawing.Point(294, 483) Me.Button2.Name = "Button2" Me.Button2.Size = New System.Drawing.Size(90, 40) Me.Button2.TabIndex = 17 Me.Button2.Text = "Compute" Me.Button2.UseVisualStyleBackColor = False ' 'TextBox7 ' Me.TextBox7.Location = New System.Drawing.Point(232, 540) Me.TextBox7.Name = "TextBox7" Me.TextBox7.Size = New System.Drawing.Size(135, 41) Me.TextBox7.TabIndex = 20 ' 'Label6 ' Me.Label6.AutoSize = True Me.Label6.Location = New System.Drawing.Point(85, 581) Me.Label6.Name = "Label6" Me.Label6.Size = New System.Drawing.Size(0, 33) Me.Label6.TabIndex = 22 ' 'Label7 ' Me.Label7.AutoSize = True Me.Label7.Location = New System.Drawing.Point(91, 548) Me.Label7.Name = "Label7" Me.Label7.Size = New System.Drawing.Size(95, 33) Me.Label7.TabIndex = 23 Me.Label7.Text = "Total Value" ' 'PictureBox1 ' Me.PictureBox1.Location = New System.Drawing.Point(390, 329) Me.PictureBox1.Name = "PictureBox1" Me.PictureBox1.Size = New System.Drawing.Size(472, 388) Me.PictureBox1.TabIndex = 24 Me.PictureBox1.TabStop = False ' 'Form1 ' Me.AutoScaleDimensions = New System.Drawing.SizeF(9.0!, 33.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.BackColor = System.Drawing.SystemColors.ControlDarkDark Me.ClientSize = New System.Drawing.Size(865, 720) Me.Controls.Add(Me.PictureBox1) Me.Controls.Add(Me.Label7) Me.Controls.Add(Me.Label6) Me.Controls.Add(Me.TextBox7) Me.Controls.Add(Me.Button2) Me.Controls.Add(Me.TextBox4) Me.Controls.Add(Me.Label4) Me.Controls.Add(Me.RichTextBox1) Me.Controls.Add(Me.LinkLabel2) Me.Controls.Add(Me.TextBox3) Me.Controls.Add(Me.TextBox2) Me.Controls.Add(Me.TextBox1) Me.Controls.Add(Me.Label3) Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.Label1) Me.Controls.Add(Me.DRINkS) Me.Controls.Add(Me.ComboBox1) Me.Controls.Add(Me.Button1) Me.Controls.Add(Me.LinkLabel1) Me.Font = New System.Drawing.Font("Onyx", 21.75!, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.ForeColor = System.Drawing.SystemColors.ControlLightLight Me.Margin = New System.Windows.Forms.Padding(4, 8, 4, 8) Me.Name = "Form1" Me.Text = "Form1" CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents LinkLabel1 As System.Windows.Forms.LinkLabel Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents ComboBox1 As System.Windows.Forms.ComboBox Friend WithEvents DRINkS As System.Windows.Forms.Label Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents TextBox1 As System.Windows.Forms.TextBox Friend WithEvents TextBox2 As System.Windows.Forms.TextBox Friend WithEvents TextBox3 As System.Windows.Forms.TextBox Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Name() As String = {"imax", "Honda mc", "Yahoo", "Googe", "APPLE", "Toyota motors", "Ibm", "Lan "} Dim stocksymbol() As String = {"imax", "Hmc", "Yhoo", "Goog", "AAPL", "Tm", "Ibm", "Lfl"} Dim category() As String = {"Entretainment", "Transportation", "Internet Technology", "Internet Technology", "Computers", "Transportation", "Computers", "Airlines"} Dim pic() As String = {"imax.bmp", "honda.bmp", "yahoologo.bmp", "googlelogos.bmp", "apple.bmp", "toyota.bmp", "ibmlogo.bmp", "lan.bmp"} Dim pricepershare() As Double = {"$25.51", " $200.25 ", "$95.45", "$98.82 ", "$89.78 ", "$18.22", "$18.22", "$16.01"} Dim directionsandcomments() As String = {" Dont sell till nov 08", "Wait for price to drop one tenth", " Split is eminent buy more", "sell when price reaches the max of the month", "double by end of next year.", " no coment", " no coment"} Dim i As Integer Dim found As Booleanfound = 0 For i = 0 To stocksymbol.Length - 1 If stocksymbol(i) = ComboBox1.Text ThenTextBox1.Text = Name(i) TextBox2.Text = category(i) TextBox3.Text = FormatCurrency(pricepershare(i)) RichTextBox1.Text = directionsandcomments(i) Dim p As System.Drawing.Imagep = Image.FromFile(pic(i)) PictureBox1.Image = p found = True End If Next If Not found Then MsgBox("Item Not Found")End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Friend WithEvents LinkLabel2 As System.Windows.Forms.LinkLabel Friend WithEvents RichTextBox1 As System.Windows.Forms.RichTextBox Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents TextBox4 As System.Windows.Forms.TextBox Friend WithEvents Button2 As System.Windows.Forms.Button Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim price, quantity, total As Double
price = TextBox3.Text quantity = TextBox4.Text total = price * quantity
TextBox7.Text = FormatCurrency(total) End Sub Friend WithEvents TextBox7 As System.Windows.Forms.TextBox Friend WithEvents Label6 As System.Windows.Forms.Label Friend WithEvents Label7 As System.Windows.Forms.Label Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox Private Sub TextBox4_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox4.TextChanged End Sub Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged End Sub Private Sub TextBox7_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox7.TextChanged End Sub Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged End SubEnd Class |