Click here to Skip to main content
15,912,400 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: how to display categories by tree view in vb.net Pin
Milad.Biroonvand31-Oct-09 3:40
Milad.Biroonvand31-Oct-09 3:40 
GeneralRe: how to display categories by tree view in vb.net Pin
DaveAuld31-Oct-09 4:28
professionalDaveAuld31-Oct-09 4:28 
GeneralRe: how to display categories by tree view in vb.net Pin
Milad.Biroonvand31-Oct-09 4:50
Milad.Biroonvand31-Oct-09 4:50 
GeneralRe: how to display categories by tree view in vb.net Pin
DaveAuld31-Oct-09 6:46
professionalDaveAuld31-Oct-09 6:46 
GeneralRe: how to display categories by tree view in vb.net Pin
Milad.Biroonvand1-Nov-09 19:03
Milad.Biroonvand1-Nov-09 19:03 
GeneralRe: how to display categories by tree view in vb.net Pin
EliottA2-Nov-09 3:27
EliottA2-Nov-09 3:27 
QuestionIdentifying a control during a mousedown event?? Pin
comalco200030-Oct-09 20:45
comalco200030-Oct-09 20:45 
AnswerRe: Identifying a control during a mousedown event?? Pin
DaveAuld30-Oct-09 23:31
professionalDaveAuld30-Oct-09 23:31 
As you dynamically add your picture boxes to your form, attach a event handler delegate to the object that is shared by all the picture boxes;

In the example below, a button keeps adding new picture boxes to the form, as you mouse over them the label will change to show the new name. You can add other handlers in the same way to capture when you leave the picture box etc.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        'Counter for the new object name
        Static counter As Integer
        counter += 1

        'Add a picture box
        Dim newPicBox As New PictureBox
        newPicBox.Name = "Custom Box " + counter.ToString

        AddHandler newPicBox.MouseMove, AddressOf customMouseMove

        'Add it to the forms collection
        Me.Controls.Add(newPicBox)

        'Set it up
        newPicBox.BackColor = Color.AliceBlue
        newPicBox.Top = 25
        newPicBox.Left = 50
        newPicBox.Width = 100
        newPicBox.Height = 100
        newPicBox.BringToFront()

    End Sub

    Private Sub customMouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)

        Dim picBox As PictureBox = sender

        Label1.Text = "Over: " & picBox.Name

    End Sub


Dave
Who am I?:
Web|Facebook|Twitter|LinkedIn|Bebo

GeneralRe: Identifying a control during a mousedown event?? Pin
comalco200031-Oct-09 0:04
comalco200031-Oct-09 0:04 
GeneralRe: Identifying a control during a mousedown event?? Pin
DaveAuld31-Oct-09 0:14
professionalDaveAuld31-Oct-09 0:14 
GeneralRe: Identifying a control during a mousedown event?? Pin
comalco200031-Oct-09 0:29
comalco200031-Oct-09 0:29 
GeneralRe: Identifying a control during a mousedown event?? Pin
DaveAuld31-Oct-09 0:33
professionalDaveAuld31-Oct-09 0:33 
GeneralRe: Identifying a control during a mousedown event?? Pin
comalco200031-Oct-09 0:37
comalco200031-Oct-09 0:37 
GeneralRe: Identifying a control during a mousedown event?? Pin
comalco200031-Oct-09 0:27
comalco200031-Oct-09 0:27 
QuestionBarcode 128 Generation in vb 6 Pin
Tufail Ahmad30-Oct-09 18:59
Tufail Ahmad30-Oct-09 18:59 
AnswerRe: Barcode 128 Generation in vb 6 Pin
Christian Graus30-Oct-09 19:17
protectorChristian Graus30-Oct-09 19:17 
AnswerRe: Barcode 128 Generation in vb 6 Pin
DaveAuld30-Oct-09 23:59
professionalDaveAuld30-Oct-09 23:59 
QuestionMulti Level Database programming in VB !! Pin
jeshra27930-Oct-09 8:02
jeshra27930-Oct-09 8:02 
AnswerParent / Child Relationship Pin
David Mujica30-Oct-09 8:39
David Mujica30-Oct-09 8:39 
QuestionHow to programmatically selected a value in a datagridviewcomboboxcolumn? [modified] Pin
Jon_Boy30-Oct-09 5:22
Jon_Boy30-Oct-09 5:22 
QuestionSort in ComboBox Pin
ivo7529-Oct-09 9:00
ivo7529-Oct-09 9:00 
AnswerRe: Sort in ComboBox Pin
Luc Pattyn29-Oct-09 9:25
sitebuilderLuc Pattyn29-Oct-09 9:25 
QuestionSet DateTimePicker date Pin
ivo7529-Oct-09 7:47
ivo7529-Oct-09 7:47 
AnswerRe: Set DateTimePicker date Pin
John M Bundy29-Oct-09 8:06
John M Bundy29-Oct-09 8:06 
GeneralRe: Set DateTimePicker date Pin
ivo7529-Oct-09 8:19
ivo7529-Oct-09 8:19 

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.