Menus & Indexes for VB 
Author Message
 Menus & Indexes for VB

Graph              'name as whatever
  Enough          'name: mnuGraph  index:0
      All                  'name: mnuGraphEnough  index:0
      Some             'name: mnuGraphEnough  index:1
      Many              'name: mnuGraphEnough  index:2
      None              'name: mnuGraphEnough  index:3
  Next Week     'name: mnuGraph  index:1
      All                 'name: mnuGraphNextWeek  index:0
      Some             'name: mnuGraphNextWeek  index:1
      Many             'name: mnuGraphNextWeek  index:2
      None             'name: mnuGraphNextWeek  index:3
  Today            'name: mnuGraph  index:2
      All                  <and so on>
      Some
      Many
      None
  Yesterday      'name: mnuGraph  index:3
      All
      Some
      Many
      None
  Tomorrow        'name: mnuGraph  index:4
      All
      Some
      Many
      None
  Future             'name: mnuGraph  index:5
      All
      Some
      Many
      None
  Last Week       'name: mnuGraph  index:6
      All
      Some
      Many
      None

Private Sub mnuGraphEnough _click(index as integer)

    select case index
        case 0  ' All selected
        case 1  'Some selected
        case 2  'Many selected
        case 3  'None selected
   end select

end sub

... etc for mnuGraphNextWeek, mnuGraphToday, etc.

--

Randy Birch
MVP Visual Basic
http://www.*-*-*.com/
Please respond only to the newsgroups so all can benefit.


Quote:
> I am making a project in VB6 with a number of menu items, and I want
> to Indexes to tie it all together and make it easier to use.  The
> Caption of each is below.  The Graph is the Caption on the Menu Bar.
> The Caption Enough, Next Week, Today, etc are menu selections directly
> below Graph.  The Sub menu of All, Some, Many, and None are sub menus
> as shown.  A control array is the logical solution for handling the
> repetition, but I can't get anything to work.  Looked all over the web
> for instructions, code samples, but found nothing.  Any assistance
> would be greatly appreciated.  Thanx.

> Graph
> Enough
> All
> Some
> Many
> None
> Next Week
> All
> Some
> Many
> None
> Today
> All
> Some
> Many
> None
> Yesterday
> All
> Some
> Many
> None
> Tomorrow
> All
> Some
> Many
> None
> Future
> All
> Some
> Many
> None
> Last Week
> All
> Some
> Many
> None



Fri, 15 Oct 2004 00:40:04 GMT  
 Menus & Indexes for VB
Hi,

Quote:

> >Graph              'name as whatever
> >  Enough          'name: mnuGraph  index:0
> >      All                  'name: mnuGraphEnough  index:0
> >      Some             'name: mnuGraphEnough  index:1
> >      Many              'name: mnuGraphEnough  index:2
> >      None              'name: mnuGraphEnough  index:3
> >  Next Week     'name: mnuGraph  index:1
> >      All                 'name: mnuGraphNextWeek  index:0
> >      Some             'name: mnuGraphNextWeek  index:1
> >      Many             'name: mnuGraphNextWeek  index:2
> >      None             'name: mnuGraphNextWeek  index:3
> >  Today            'name: mnuGraph  index:2
> I think this is what I am looking for.  Thanks a million Randy.  Much
> appreciated.  I gather you have run into this problem before.  Again,
> thanks.

It is possible to make VB Menus with a text editor, then drop the
Pascal like code into your form.  I used a VBScript to write this
menu.

Many list members here will warn you not to do this because you can
corrupt your form and project. If you use reasonable care with
backups, etc its a nice change from using the Menu GUI Editor.

The VBMenu.vbs and the target form/project are here:
     http://home.sprintmail.com/~mpryor/VBMenu.zip
the menu looks like this:
     http://home.sprintmail.com/~mpryor/VBMenu.png

hth,
Mark Pryor



Fri, 15 Oct 2004 12:54:46 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. BUG: VB returns wrong index in menu arrays

2. VB Script & Index Server V2.0

3. VB & FOXPRO Index problems

4. VB & INDEXES

5. Creating Indexes & Relations via VB Code

6. Too many indexes - Wierd hidden indexes preventing index add

7. MDI Menus & Child Popup menus

8. Right Justify Menu: Win 95 & VB 3

9. IE 4 & VB 5 Style Menus

10. searchable/indexed help menu.

11. VB3.00 Menu Option Indexing Problem

12. Menu index errors

 

 
Powered by phpBB® Forum Software