MDI Form Problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • furqanms
    New Member
    • Jun 2007
    • 17

    MDI Form Problem

    I have file menu items in my mdi form as

    File
    -------------
    Log - In
    --------------
    Exit
    ---------------



    after click on Log-In , Log -in form will be appeared. If user is authenticated with database with correct user and password.


    I want want to visible this menu item on mdi form which is invisible before.


    File
    -----------------
    Log - In
    -----------------
    Registration
    ------------------
    Course
    Module
    Subject
    -------------------
    Exit
    -------------------


    on the basis of user authentication . I don't know how to do this I have never developed MDI application before using dotnet.


    Please help me out with this problem I am very confused . I was developing in vb6.0 its so easy there but here I am not getting how to go for this.

    Thanks
  • joedeene
    Contributor
    • Jul 2008
    • 579

    #2
    ehh in vb.net 2008 why not just show those menu items but set the *ENABLED* property to false ? meaning they cannot click on it, and it is just not enabled, the events will not happen for those menu items, until you set the enabled property to true in code...

    like in the form load event, or you could do change it in the properties toolbox (in designer view)

    code:
    Code:
    'form load event
     RegistrationToolStripMenuItem.Enabled = False
    Code:
    'form authentication success event
     RegistrationToolStripMenuItem.Enabled = True

    also try looking into the .Visible property of the particular menu items ? hope i helped.

    joedeene

    Comment

    • PRR
      Recognized Expert Contributor
      • Dec 2007
      • 750

      #3
      In your main form.. that is the one with menu.. declare public static objects of all other forms....
      public static formchild f2;
      When a user clicks a main form menu item... initialize the new form....

      i had done similar thing... though the main form would be in the background.... i guess u can either disable it .. or reference it to another static object n hide it ....

      Comment

      Working...