Just store your menuitems in an array of menuitem and loop through it. Just like this one. I think there would be better way than this but this what I have in my mind so far.
dim m() as menuitem={me.menuItem1,me.menuItem2,me.menuItem3}
foreach mm as menuitem in m then
MessageBox.Show(mm.Text)
next
ok thanks tg.
is there some other way that i could declare some of my parameters inside a condition?
if @ident=2
@bday datetime
begin
insert into table2 values(@bday)
end
i have this problem in declaring parameter in stored proc.
btw i'm using mssql 2000
the usual thing to do is
@name varchar(50)
insert into sampletable values(@name)
but what i want is to declare a parameter inside a condition or declaring a parameter that are not global
@ident int
if...
the formal way to that is by using a property or you could do some monkey coding.
try this one.
'monkey coding
dim score as integer
score=textbox1.text + 1
textbox2.text=score
'assuming you have textbox in your form2 named textbox1.
dim f as new form2()
f.textbox1.text=me.textbox2.text...
Private Sub DataGrid1_CurrentCellChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGrid1.CurrentCellChanged
If IsDBNull(DataGrid1.Item(DataGrid1.CurrentCell.RowNumber, 0)) Then
MessageBox.Show("Please input the item number")
Exit Sub
End If
End Sub
yeah i think you cant specify a size to the label when property autosize is set to true bec. its provide its own size from the word itself autosize. :D
yeah it is really possible in datagrid.
try this one.
Private Sub DataGrid1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGrid1.DoubleClick
Dim f As New Form3()
f.TextBox1.Text = DataGrid1.Item(DataGrid1.CurrentCell.RowNumber, 0).ToString
'it fetches the first...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.