Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB 2008 Express MenuStrip Item text change at run time

Status
Not open for further replies.

WaInB

Programmer
Mar 19, 2012
1
GB
Hi all,
I'm new to VB2008 and changing from VB6 everything seem a lot more cumbersome, but anyway - my problem: -
I need to change the Text of items at run time, using the code below. Some controls work OK but MenuStrip does not. Has anybody have any ideas.
Thanks

For Each ctl In frm.Controls
If TypeOf ctl Is MenuStrip Then
For Each obj In ctl.Controls
nVal = obj.Tag
If nVal > 0 Then obj.text = Lang(nVal)
Next
Else
For Each obj In ctl.Controls
nVal = obj.tag
If nVal > 0 Then obj.text = Lang(nVal)
Next
End If
Next
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top