CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Menu Problem

  1. #1
    Join Date
    Dec 2001
    Location
    India
    Posts
    32

    Menu Problem

    Hi
    I am storing menu names in a table depending upon user.
    When user logs in those menus should only be enabled all other should be disabled.

    i am taking those menu names in a recordset and trying to enable those but i am getting problems.

    If any one knows please help me to sort out this problem..

    Thanks in advance
    AbhiDesh



  2. #2
    Join Date
    Dec 1999
    Location
    Dublin, Ireland
    Posts
    1,173

    Re: Menu Problem

    What you need to do is iterate through the Form.Controls collection and if the control is a menu then check to see whether or not to enable it...


    Dim ctThis as Control

    for Each ctThis In frmIn
    If TypeOf ctThis is Menu then
    'decide whether or not to enable it,..?
    End If
    next ctThis




    HTH,
    Duncan

    -------------------------------------------------
    Ex. Datis: Duncan Jones
    Merrion Computing Ltd
    http://www.merrioncomputing.com/EventVB/Overview.htm - Flatten the API learning curve
    '--8<-----------------------------------------
    NEW -The printer usage monitoring application
    '--8<------------------------------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured