473,385 Members | 1,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

.NET Menu not a control?

Hi there,

I'm running into slight confusion over a .NET menu "control", how comes
it doesn't get listed in the forms controls array? I'm trying to enumerate
through *every* control on any form, and unfortunately unlesss I treat the
menu as a separate entity and then enumerate it after It wont work.

Does anyone know how I can enumerate *every* control on any form in
VB.NET? Cheers in advance.

Nick
Nov 21 '05 #1
6 1288
Its a component not a control and you can use reflexion
to browse controls/components.

Regards
Jorge
-----Original Message-----
Hi there,

I'm running into slight confusion over a .NET menu "control", how comesit doesn't get listed in the forms controls array? I'm trying to enumeratethrough *every* control on any form, and unfortunately unlesss I treat themenu as a separate entity and then enumerate it after It wont work.
Does anyone know how I can enumerate *every* control on any form inVB.NET? Cheers in advance.

Nick
.

Nov 21 '05 #2
Nick,

"Nick" <no****@altavente.com> schrieb:
I'm running into slight confusion over a .NET menu "control", how comes
it doesn't get listed in the forms controls array? I'm trying to
enumerate through *every* control on any form, and unfortunately unlesss I
treat the menu as a separate entity and then enumerate it after It wont
work.

Does anyone know how I can enumerate *every* control on any form in
VB.NET?


'MainMenu' is, like timers, for example, a component. See (complete
thread):

<URL:http://groups.google.de/groups?threadm=MfEsc.331786%24rM4.13835730%40news4 .tin.it>

Keywords: enumerate, components, controls, form.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #3
>
I'm running into slight confusion over a .NET menu "control", how comes it doesn't get listed in the forms controls array? I'm trying to enumerate through *every* control on any form, and unfortunately unlesss I treat the
menu as a separate entity and then enumerate it after It wont work.

Does anyone know how I can enumerate *every* control on any form in
VB.NET? Cheers in advance.


a.. Controls. The System.Windows.Forms namespace provides a variety of
control classes that allow you to create rich user interfaces. Some controls
are designed for data entry within the application, such as TextBox and
ComboBox controls. Other controls display application data, such as Label
and ListView. The namespace also provides controls for invoking commands
within the application, such as Button and ToolBar. In addition, the
PropertyGrid control can be used to create your own Windows Forms designer
that displays the designer-visible properties of the controls.
a..

Components. In addition to controls, the System.Windows.Forms namespace
provides other classes that do not derive from the Control class but still
provide visual features to a Windows-based application. Some classes, such
as ToolTip and ErrorProvider, extend the capabilities or provide information
to the user. Other classes, such as Menu, MenuItem, and ContextMenu, provide
the ability display menus to the user to invoke commands within an
application. The Help and HelpProvider classes enable you to display help
information to the user of your ap
Hope this useful,
Roger
Nov 21 '05 #4
Hi Roger,

Cheers, that information was very helpful! Cheers.

Nick.

"Roger" <ro***@pcsrevenuecontrol.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...

I'm running into slight confusion over a .NET menu "control", how

comes
it doesn't get listed in the forms controls array? I'm trying to

enumerate
through *every* control on any form, and unfortunately unlesss I treat
the
menu as a separate entity and then enumerate it after It wont work.

Does anyone know how I can enumerate *every* control on any form in
VB.NET? Cheers in advance.


a.. Controls. The System.Windows.Forms namespace provides a variety of
control classes that allow you to create rich user interfaces. Some
controls
are designed for data entry within the application, such as TextBox and
ComboBox controls. Other controls display application data, such as Label
and ListView. The namespace also provides controls for invoking commands
within the application, such as Button and ToolBar. In addition, the
PropertyGrid control can be used to create your own Windows Forms designer
that displays the designer-visible properties of the controls.
a..

Components. In addition to controls, the System.Windows.Forms namespace
provides other classes that do not derive from the Control class but still
provide visual features to a Windows-based application. Some classes, such
as ToolTip and ErrorProvider, extend the capabilities or provide
information
to the user. Other classes, such as Menu, MenuItem, and ContextMenu,
provide
the ability display menus to the user to invoke commands within an
application. The Help and HelpProvider classes enable you to display help
information to the user of your ap
Hope this useful,
Roger

Nov 21 '05 #5
Hi Jorge,
Its a component not a control and you can use reflexion
to browse controls/components.


Aaah, cool, this is helpful, I've ended up using another solution
temporarily but this is very helpful thanks!

Nick.
Nov 21 '05 #6
Hi Herfried,
'MainMenu' is, like timers, for example, a component. See (complete
thread):

<URL:http://groups.google.de/groups?threadm=MfEsc.331786%24rM4.13835730%40news4 .tin.it>


Cheers I'll check that out thanks!

Nick.
Nov 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: zapazap | last post by:
Dear Snake Charming Gurus, (Was: http://mail.python.org/pipermail/python-list/2004-January/204454.html) First, a thank you to Tim Golden, Thomas Heller, and Mark Hammond for your earlier help...
6
by: Sandy | last post by:
Hello - I have a book that illustrates pulling menu items from a Sql Server table into an ascx via a stored procedure. Is this something that is done in the real world? I do like the effect...
7
by: Chuck Hartman | last post by:
I have a Windows service that requests web pages from a site using an HttpWebRequest object. When I try to request a page from an ASP.NET 2 site, I get a WebException with message "The remote...
5
by: dpomt | last post by:
When the ASP.NET menu is rendered on downlevel browers, the text "^ up one level" is displayed. Any ideas how I can change that text? I did not find a property for the menu control where I can...
17
by: GS | last post by:
the main menu in the application seemed to disappeared all together until I click on an control and select mainmenu1 in designer. then the mainmenu1 displays where it should be but running it or...
3
by: John | last post by:
Hi there, I was reading an article (http://avenuea-razorfish.com/articles/TheAll-MenuNavigation_Turbek.pdf) on 'all-menu navigation' and I'd like to try and implement this in my site. Can...
5
by: Brad Isaacs | last post by:
Good morning friends, I am working with ASP.NET 2.0 -- VB code behind I have created tabbed pages using the Menu control with the Multiview control. Using the menu control to display the...
2
by: MCM | last post by:
I'm working on a plotting control. The plotting control will have a context menu with basic commands for "scaling", "zooming", etc. Is there a way that, from the parent form, I can add more...
5
by: AG | last post by:
I realize that the obvious suggestion would be malware, but my definitions are up to date and I have already scanned for it. I have also tried disabling all IE add-ons. I just rebuilt and...
4
by: SAL | last post by:
Hello, is there a way to menu control dynamically center itself horizontally on a page? I have placed a menu control in a panel control (no ajax) and would like it to center itself. Depending on...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.