Click here to Skip to main content
15,886,199 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Transfer of data from LIstview to table in MsAccess Pin
Dave Kreskowiak15-Jun-09 16:29
mveDave Kreskowiak15-Jun-09 16:29 
GeneralRe: Transfer of data from LIstview to table in MsAccess Pin
sazd115-Jun-09 17:15
sazd115-Jun-09 17:15 
GeneralRe: Transfer of data from LIstview to table in MsAccess Pin
Dave Kreskowiak15-Jun-09 18:01
mveDave Kreskowiak15-Jun-09 18:01 
QuestionDetecting object with vbscript Pin
chatko15-Jun-09 11:56
chatko15-Jun-09 11:56 
AnswerRe: Detecting object with vbscript Pin
Dave Kreskowiak15-Jun-09 16:27
mveDave Kreskowiak15-Jun-09 16:27 
GeneralRe: Detecting object with vbscript Pin
chatko16-Jun-09 7:27
chatko16-Jun-09 7:27 
GeneralRe: Detecting object with vbscript Pin
Dave Kreskowiak16-Jun-09 8:07
mveDave Kreskowiak16-Jun-09 8:07 
Questiondealing with control arrays Pin
No-e15-Jun-09 6:08
No-e15-Jun-09 6:08 
Any help in general would be appreciated, I need to build a control array at run time, so as an example I can do something like this

Private Sub createlblSlotArray()
      Dim i As Short
      ReDim lblSlot(3)
      For i = 1 To 3
          lblSlot(i) = New System.Windows.Forms.Label
          With lblSlot(i)
              .Tag = i
              AddHandler .Click, AddressOf Me.lblSlot_click
          End With
      Next
      Me.Controls.AddRange(lblSlot)
      lblSlot(1).Location = New System.Drawing.Point(50, 50)
      lblSlot(2).Location = New System.Drawing.Point(100, 70)
      lblSlot(3).Location = New System.Drawing.Point(100, 90)
  End Sub


I need to add a popup menu to each of these labels, when the user right clicks on a label, I need to know which one the right click was on, set a variable so it can be used later, then show the context menu.

would I use the form1_click?

  Private Sub Form1_Click(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label1.MouseDown
      ' what to do here to get the label? this seems to be tied to only the first label?
End Sub

can you show me an example of how to handle events from a control array of this nature, also, if I do not know how many context menu items I will have until run time, so I am not sure how to do that, the popup menu click event appear to be tied to the exact item that was selected.

   Private Sub MenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem1.Click 
        ' this is OK for menu item 1, how do I deal with new items I may add at run time?
End Sub


thanks in advance

No-e
AnswerRe: dealing with control arrays Pin
dan!sh 15-Jun-09 6:42
professional dan!sh 15-Jun-09 6:42 
GeneralRe: dealing with control arrays Pin
No-e15-Jun-09 7:19
No-e15-Jun-09 7:19 
GeneralRe: dealing with control arrays Pin
dan!sh 15-Jun-09 7:26
professional dan!sh 15-Jun-09 7:26 
AnswerRe: dealing with control arrays Pin
Dave Kreskowiak15-Jun-09 7:51
mveDave Kreskowiak15-Jun-09 7:51 
GeneralRe: dealing with control arrays Pin
Jon_Boy16-Jun-09 10:13
Jon_Boy16-Jun-09 10:13 
GeneralRe: dealing with control arrays Pin
Dave Kreskowiak16-Jun-09 12:04
mveDave Kreskowiak16-Jun-09 12:04 
GeneralRe: dealing with control arrays Pin
Jon_Boy18-Jun-09 1:37
Jon_Boy18-Jun-09 1:37 
QuestionFinding the PropertyGrid Delete Key Event in VB.NET Pin
VB 8.015-Jun-09 4:16
VB 8.015-Jun-09 4:16 
AnswerRe: Finding the PropertyGrid Delete Key Event in VB.NET Pin
Dave Kreskowiak15-Jun-09 7:56
mveDave Kreskowiak15-Jun-09 7:56 
GeneralRe: Finding the PropertyGrid Delete Key Event in VB.NET Pin
VB 8.016-Jun-09 6:07
VB 8.016-Jun-09 6:07 
GeneralRe: Finding the PropertyGrid Delete Key Event in VB.NET Pin
Dave Kreskowiak16-Jun-09 6:28
mveDave Kreskowiak16-Jun-09 6:28 
QuestionEmail - Problem Pin
Paramu197315-Jun-09 3:12
Paramu197315-Jun-09 3:12 
AnswerRe: Email - Problem Pin
Tom Deketelaere15-Jun-09 3:18
professionalTom Deketelaere15-Jun-09 3:18 
AnswerRe: Email - Problem Pin
Dave Kreskowiak15-Jun-09 4:42
mveDave Kreskowiak15-Jun-09 4:42 
AnswerRe: Email - Problem Pin
DaveAuld15-Jun-09 9:59
professionalDaveAuld15-Jun-09 9:59 
QuestionReference Problem Pin
Member 629414615-Jun-09 2:46
Member 629414615-Jun-09 2:46 
AnswerRe: Reference Problem Pin
Mithun.Shitole15-Jun-09 3:05
Mithun.Shitole15-Jun-09 3:05 

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.