Click here to Skip to main content
15,849,829 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionControlling FileSystemWatcher Pin
Wrongway43219-May-06 11:44
Wrongway43219-May-06 11:44 
AnswerRe: Controlling FileSystemWatcher Pin
DSAlbin21-May-06 8:41
DSAlbin21-May-06 8:41 
GeneralRe: Controlling FileSystemWatcher Pin
Wrongway432123-May-06 13:17
Wrongway432123-May-06 13:17 
GeneralRe: Controlling FileSystemWatcher Pin
DSAlbin23-May-06 14:17
DSAlbin23-May-06 14:17 
GeneralRe: Controlling FileSystemWatcher Pin
Wrongway432124-May-06 11:55
Wrongway432124-May-06 11:55 
GeneralRe: Controlling FileSystemWatcher Pin
DSAlbin24-May-06 13:22
DSAlbin24-May-06 13:22 
QuestionDataGrid Control Pin
Quecumber2569-May-06 11:27
Quecumber2569-May-06 11:27 
Questionhandler problem Pin
meconomou9-May-06 9:18
meconomou9-May-06 9:18 
Hi, i create a menu from a database using datareader
then i 'm adding a handler for click event.
now iwant inside the handler procedure to get the text of the menuitem who called the handler and that's exactly my problem.
this is my code

Public Sub devsubmenu()
Dim cmddev As New OleDbCommand("Select modelname from devicetbl",OleDbConnection1)
OleDbConnection1.Open()
Dim dtread As OleDbDataReader = cmddev.ExecuteReader()
devmnu.MenuItems.Clear()
Do While dtread.Read
Dim ChildMenu As New MenuItem
ChildMenu.Text = dtread.Item("modelname").ToString()
AddHandler ChildMenu.Click, AddressOf model_click
devmnu.MenuItems.Add(ChildMenu)
Loop
OleDbConnection1.Close()
End Sub


End Sub
Private Sub model_click(ByVal sender As System.Object, ByVal e As System.EventArgs)
' HERE I WANT TO TAKE THE MENUITEM (SENDER) TEXT AND PUT IT IN A TEXT BOX
End Sub


any ideas ?
Questioncombo box Data source Nothing Problem Pin
Hkothari779-May-06 9:02
Hkothari779-May-06 9:02 
AnswerRe: Data source Still Nothing Problem Pin
Hkothari779-May-06 9:04
Hkothari779-May-06 9:04 
QuestionHow to cut part of the piture in a picture box Pin
Murtuza Husain Miyan Patel9-May-06 8:58
professionalMurtuza Husain Miyan Patel9-May-06 8:58 
AnswerRe: How to cut part of the piture in a picture box Pin
Christian Graus9-May-06 11:39
protectorChristian Graus9-May-06 11:39 
QuestionAdding nodes to a treeview control Pin
Raistlin21_459-May-06 8:25
Raistlin21_459-May-06 8:25 
AnswerRe: Adding nodes to a treeview control Pin
digicd19-May-06 17:22
digicd19-May-06 17:22 
GeneralRe: Adding nodes to a treeview control Pin
Raistlin21_4510-May-06 7:01
Raistlin21_4510-May-06 7:01 
AnswerRe: Adding nodes to a treeview control Pin
Hacknight949-May-06 21:37
Hacknight949-May-06 21:37 
GeneralRe: Adding nodes to a treeview control Pin
Raistlin21_4510-May-06 7:05
Raistlin21_4510-May-06 7:05 
GeneralRe: Adding nodes to a treeview control Pin
Hacknight9410-May-06 15:15
Hacknight9410-May-06 15:15 
GeneralRe: Adding nodes to a treeview control Pin
Hacknight9410-May-06 15:21
Hacknight9410-May-06 15:21 
Questionfrom ADO to ADO.NET 2.0 Pin
Gulfraz Khan9-May-06 7:11
Gulfraz Khan9-May-06 7:11 
QuestionHandling Complex Numbers Pin
crtwrght_mrk9-May-06 7:09
crtwrght_mrk9-May-06 7:09 
AnswerRe: Handling Complex Numbers Pin
darkelv9-May-06 7:25
darkelv9-May-06 7:25 
QuestionRe: Handling Complex Numbers Pin
crtwrght_mrk9-May-06 10:34
crtwrght_mrk9-May-06 10:34 
Question"load report failed" error Pin
sarah_chandran9-May-06 6:05
sarah_chandran9-May-06 6:05 
AnswerRe: "load report failed" error Pin
penguin500011-May-06 21:05
penguin500011-May-06 21: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.