|
-
Aug 19th, 2002, 09:25 PM
#1
Thread Starter
Addicted Member
Menus and a return to first month programming
Not seeing anyway of creating an index for menu items. Are we meant to return to the days of creating a procedure for each menu element, or am l missing something here?
-
Aug 19th, 2002, 09:46 PM
#2
Re: Menus and a return to first month programming
Originally posted by jritchie
Not seeing anyway of creating an index for menu items. Are we meant to return to the days of creating a procedure for each menu element, or am l missing something here?
well, so far I have answered all of your questions wrong this is another one  :
control arrays dont exist in vb.net, so the menu items dont return an index. and no, you dont have to create a sub for each one. You add the menu name after the handles statement. kinda like this:
VB Code:
Private Sub Menu_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) [color=red][b]Handles[/b][/color] MenuItem2.Click, MenuItem3.Click ' , Control.Event, Control.Event, ..............
End Sub
probably another wrong answer, but I tried
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Aug 19th, 2002, 11:04 PM
#3
Thread Starter
Addicted Member
Thanks Mr P.... damn MS taking the control arrays out..... *grumble*
-
Aug 20th, 2002, 02:26 AM
#4
If you like to add an event handler at runtime, you can use AddHandler.
-
Aug 20th, 2002, 08:43 AM
#5
Originally posted by jritchie
Thanks Mr P.... damn MS taking the control arrays out..... *grumble*
Im glad they took em out. They are unnecessary at best in .NET. First off, since everything is an object anyway, you can have an array of objects, but not like the control array as you maybe used to, but still virtually the same idea. But also since when you create controls, you addthem to a control collection which makes using a control array a wasted of recources since now you have in sense, 2 collections of the same controls. Wasteful!
-
Aug 20th, 2002, 10:42 PM
#6
Thread Starter
Addicted Member
So Mr Anderson how would you add a menu object to an object array? Simply define the array and pop the menu into it or something?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|