matt1234hi5
Member
- Joined
- May 13, 2008
- Messages
- 12
- Programming Experience
- 1-3
hello everyone.
There is my code, in that I am make a Button 3. Lets say I want to attach an event to that, but also pass a user name variable to the event. How would I do that?
VB.NET:
Dim id As String = timeline(poo).Status.Id.ToString
Dim tweet_pic = New System.Windows.Forms.PictureBox
Dim tweet_text_panel = New System.Windows.Forms.Panel
Dim tweet_text = New System.Windows.Forms.RichTextBox
Dim tweet_holder = New System.Windows.Forms.Panel
Dim Button3 = New System.Windows.Forms.Button
'
'twit_1_pic
'
tweet_pic.ImageLocation = timeline(poo).ProfileImageUrl.ToString
tweet_pic.Location = New System.Drawing.Point(0, 0)
tweet_pic.Name = "twit_" & timeline(poo).Status.Id & "_pic"
tweet_pic.Size = New System.Drawing.Size(48, 48)
tweet_pic.TabIndex = 1
tweet_pic.TabStop = False
'
'twit_1_text_panel
'
tweet_text.BorderStyle = BorderStyle.None
tweet_text_panel.BackColor = System.Drawing.Color.Transparent
tweet_text_panel.BackgroundImage = Global.twitterer3.My.Resources.Resources.speech
tweet_text_panel.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None
tweet_text_panel.Controls.Add(tweet_text)
tweet_text_panel.Location = New System.Drawing.Point(48, 0)
tweet_text_panel.Name = "twit_" & timeline(poo).Status.Id & "_text_panel"
tweet_text_panel.Size = New System.Drawing.Size(274, 48)
tweet_text_panel.TabIndex = 0
'
'twit_1_text
'
tweet_text.ReadOnly = True
tweet_text.BackColor = Color.Black
tweet_text.ForeColor = System.Drawing.Color.White
tweet_text.Location = New System.Drawing.Point(12, 2)
tweet_text.Name = "twit_" & timeline(poo).Status.Id & "_text"
tweet_text.Size = New System.Drawing.Size(260, 40)
tweet_text.TabIndex = 0
tweet_text.Text = timeline(poo).ScreenName.ToString & ": " & phrasehtml(timeline(poo).Status.Text)
'
'Button 3
'
Button3.BackgroundImage = Global.twitterer3.My.Resources.Resources.__copy
Button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
Button3.FlatAppearance.BorderSize = 0
Button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Button3.Location = New System.Drawing.Point(322, 24)
Button3.Name = "reply_button_" & timeline(poo).Status.Id
Button3.Size = New System.Drawing.Size(24, 24)
Button3.TabIndex = 4
Button3.UseVisualStyleBackColor = True
'
'twit_1_holder
'
tweet_holder.Controls.Add(tweet_text_panel)
tweet_holder.Controls.Add(tweet_pic)
tweet_holder.Controls.Add(Button3)
tweet_holder.Location = New System.Drawing.Point(0, ((((tweets_holder.VerticalScroll.Value) - tweets_holder.VerticalScroll.Value) - tweets_holder.VerticalScroll.Value) - 48))
tweet_holder.Name = "twit_" & timeline(poo).Status.Id & "_holder"
tweet_holder.Size = New System.Drawing.Size(346, 48)
tweet_holder.TabIndex = 2
tweet_holder.Parent = Me.tweets_holder
tweet_text_panel.SuspendLayout()
tweet_holder.SuspendLayout()
tweet_pic.SuspendLayout()
tweet_text.SuspendLayout()
Button3.SuspendLayout()
tweets.Add(timeline(poo).Status.Id)
There is my code, in that I am make a Button 3. Lets say I want to attach an event to that, but also pass a user name variable to the event. How would I do that?