Click here to Skip to main content
16,005,236 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: alter table via sql - problem Pin
Guffa23-Jan-07 5:51
Guffa23-Jan-07 5:51 
GeneralRe: alter table via sql - problem Pin
Smithers-Jones24-Jan-07 5:37
Smithers-Jones24-Jan-07 5:37 
GeneralRe: alter table via sql - problem Pin
Guffa24-Jan-07 14:30
Guffa24-Jan-07 14:30 
GeneralRe: alter table via sql - problem Pin
Smithers-Jones24-Jan-07 21:57
Smithers-Jones24-Jan-07 21:57 
Questioncreating many instance of a label Pin
charchabil0323-Jan-07 4:04
charchabil0323-Jan-07 4:04 
AnswerRe: creating many instance of a label Pin
mr_lasseter23-Jan-07 4:33
mr_lasseter23-Jan-07 4:33 
GeneralRe: creating many instance of a label Pin
charchabil0323-Jan-07 4:54
charchabil0323-Jan-07 4:54 
GeneralRe: creating many instance of a label Pin
mr_lasseter23-Jan-07 5:11
mr_lasseter23-Jan-07 5:11 
<br />
Public Sub AddLabel()<br />
Dim lbl As New Label<br />
<br />
lbl.Location = New System.Drawing.Point(100, 100)<br />
lbl.Text = "This is a test"<br />
lbl.Visible = True<br />
Me.Controls.Add(lbl)<br />
AddHandler lbl.Click, AddressOf Label_Click<br />
End Sub<br />
<br />
   Private Sub Label_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) <br />
        MessageBox.Show("this is a test")<br />
<br />
       'You can remove the handler like so if necessary<br />
        Dim lbl As Label = DirectCast(sender, Label)<br />
        RemoveHandler lbl.Click, AddressOf Label_Click<br />
    End Sub<br />


I noticed that you are using suggesting using msgbox. You really should avoid using this since it is in the Microsoft.VisualBasic namespace which allows the legacy commands to work. You should use the .Net commands when possible.

Mike Lasseter

GeneralRe: creating many instance of a label Pin
charchabil0323-Jan-07 5:42
charchabil0323-Jan-07 5:42 
GeneralRe: creating many instance of a label Pin
mr_lasseter23-Jan-07 5:51
mr_lasseter23-Jan-07 5:51 
GeneralRe: creating many instance of a label Pin
charchabil0323-Jan-07 6:06
charchabil0323-Jan-07 6:06 
AnswerRe: creating many instance of a label Pin
mr_lasseter23-Jan-07 6:32
mr_lasseter23-Jan-07 6:32 
GeneralRe: creating many instance of a label Pin
charchabil0323-Jan-07 9:50
charchabil0323-Jan-07 9:50 
GeneralRe: creating many instance of a label Pin
mr_lasseter23-Jan-07 10:12
mr_lasseter23-Jan-07 10:12 
QuestionList box loop? Pin
China-Gary23-Jan-07 2:36
China-Gary23-Jan-07 2:36 
AnswerRe: List box loop? Pin
MatrixCoder23-Jan-07 3:28
MatrixCoder23-Jan-07 3:28 
AnswerRe: List box loop? Pin
nlarson1123-Jan-07 3:31
nlarson1123-Jan-07 3:31 
GeneralRe: List box loop? Pin
China-Gary23-Jan-07 4:37
China-Gary23-Jan-07 4:37 
GeneralRe: List box loop? Pin
nlarson1123-Jan-07 6:22
nlarson1123-Jan-07 6:22 
GeneralRe: List box loop? Pin
China-Gary23-Jan-07 8:47
China-Gary23-Jan-07 8:47 
GeneralRe: List box loop? Pin
nlarson1123-Jan-07 9:04
nlarson1123-Jan-07 9:04 
GeneralRe: List box loop? Pin
China-Gary23-Jan-07 9:08
China-Gary23-Jan-07 9:08 
QuestionStop Windows going to sleep while app is running Pin
The8at23-Jan-07 1:54
The8at23-Jan-07 1:54 
AnswerRe: Stop Windows going to sleep while app is running Pin
Dave Kreskowiak23-Jan-07 5:26
mveDave Kreskowiak23-Jan-07 5:26 
QuestionCustomize Setup for Vb.net Project Pin
Amit Gorawadia23-Jan-07 1:31
Amit Gorawadia23-Jan-07 1:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.