Click here to Skip to main content
15,914,820 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: how to open a new form? Pin
Christian Graus15-Nov-07 23:11
protectorChristian Graus15-Nov-07 23:11 
Questionhelp required for creating reports in a payroll system Pin
anniie15-Nov-07 20:24
anniie15-Nov-07 20:24 
QuestionWindows Services [modified] Pin
M.Sathiskumar15-Nov-07 17:58
M.Sathiskumar15-Nov-07 17:58 
Questionhow to get index value of menuitem Pin
poonams15-Nov-07 17:47
poonams15-Nov-07 17:47 
AnswerRe: how to get index value of menuitem Pin
Richard Blythe15-Nov-07 18:06
Richard Blythe15-Nov-07 18:06 
GeneralRe: how to get index value of menuitem Pin
poonams16-Nov-07 0:46
poonams16-Nov-07 0:46 
GeneralRe: how to get index value of menuitem Pin
Richard Blythe17-Nov-07 17:34
Richard Blythe17-Nov-07 17:34 
GeneralRe: how to get index value of menuitem Pin
poonams18-Nov-07 19:55
poonams18-Nov-07 19:55 
[code]

Dim mShowMenuItem As System.Windows.Forms.MenuItem
mShowMenuItem = DirectCast(sender, System.Windows.Forms.MenuItem)
mShowMenuItem.MenuItems.Clear()
Dim n, i As Integer
Dim a, b As String

s = "Select srno from cash"
com = New OleDbCommand(s, con)
con.Open()
dr = com.ExecuteReader
While dr.Read
n = dr(0)
End While
con.Close()
For i = 1 To n
s = "Select account from cash"
com = New OleDbCommand(s, con)
con.Open()
dr = com.ExecuteReader
While dr.Read()
a = dr(0)
Dim mSubSubMenuItem As System.Windows.Forms.MenuItem
mSubSubMenuItem = New System.Windows.Forms.MenuItem
mSubSubMenuItem.Index = i
mSubSubMenuItem.Text = a
mSubSubMenuItem.Enabled = True
mSubSubMenuItem.Visible = True
AddHandler mSubSubMenuItem.Click, AddressOf MenuClickHandler
mShowMenuItem.MenuItems.Add(mSubSubMenuItem)
i = i + 1
End While
con.Close()

Next

this will generate menus


Public Sub MenuClickHandler(ByVal Sender As Object, ByVal e As System.EventArgs)

'Don't know wt to write here
End Sub


poonam

QuestionDateTime.Subtract Method Pin
GeorgieMPorgie15-Nov-07 14:22
GeorgieMPorgie15-Nov-07 14:22 
AnswerRe: DateTime.Subtract Method Pin
Christian Graus15-Nov-07 14:43
protectorChristian Graus15-Nov-07 14:43 
GeneralRe: DateTime.Subtract Method Pin
GeorgieMPorgie15-Nov-07 14:56
GeorgieMPorgie15-Nov-07 14:56 
GeneralRe: DateTime.Subtract Method Pin
Luc Pattyn15-Nov-07 15:12
sitebuilderLuc Pattyn15-Nov-07 15:12 
GeneralRe: DateTime.Subtract Method Pin
nishkarsh_k15-Nov-07 22:22
nishkarsh_k15-Nov-07 22:22 
QuestionInsert icon/image in menu Pin
r_mohd15-Nov-07 13:56
r_mohd15-Nov-07 13:56 
AnswerRe: Insert icon/image in menu Pin
svanwass16-Nov-07 6:39
svanwass16-Nov-07 6:39 
AnswerRe: Insert icon/image in menu Pin
LloydA1114-Jan-08 16:21
LloydA1114-Jan-08 16:21 
QuestionHelp me? Pin
n4n4ng2315-Nov-07 12:04
n4n4ng2315-Nov-07 12:04 
AnswerRe: Help me? Pin
Christian Graus15-Nov-07 12:13
protectorChristian Graus15-Nov-07 12:13 
Questionrun a sub on one child form when an event occurs on another Pin
amatbrewer15-Nov-07 11:57
amatbrewer15-Nov-07 11:57 
AnswerRe: run a sub on one child form when an event occurs on another Pin
Christian Graus15-Nov-07 12:15
protectorChristian Graus15-Nov-07 12:15 
GeneralRe: run a sub on one child form when an event occurs on another Pin
amatbrewer15-Nov-07 12:51
amatbrewer15-Nov-07 12:51 
Questionreading query results into vb Pin
cj433115-Nov-07 8:53
cj433115-Nov-07 8:53 
AnswerRe: reading query results into vb Pin
pmarfleet15-Nov-07 9:48
pmarfleet15-Nov-07 9:48 
GeneralRe: reading query results into vb Pin
cj433115-Nov-07 10:10
cj433115-Nov-07 10:10 
GeneralRe: reading query results into vb Pin
pmarfleet15-Nov-07 10:25
pmarfleet15-Nov-07 10:25 

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.