Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. menu enable/disable problem....??

menu enable/disable problem....??

Scheduled Pinned Locked Moved Visual Basic
helpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    drmzunlimited
    wrote on last edited by
    #1

    hi , I have two forms , from1 and form2. Form1 is having mainmenu1 and is having menuitems in it. Now when i load form1 , in the load event of form1 i do me.menuitem1.enabled = false . this disables the menu. now i have form2.load in form1 load event. now the problem here is that in form2 i have a button thru which i want the mainmenu of form1 should be enabled. so i have wriiten this code behind btn _click of from2 dim frm1 as new form1 frm1.menuitem2.enabled = true but things dont work??? can somebody plz help me??

    M 1 Reply Last reply
    0
    • D drmzunlimited

      hi , I have two forms , from1 and form2. Form1 is having mainmenu1 and is having menuitems in it. Now when i load form1 , in the load event of form1 i do me.menuitem1.enabled = false . this disables the menu. now i have form2.load in form1 load event. now the problem here is that in form2 i have a button thru which i want the mainmenu of form1 should be enabled. so i have wriiten this code behind btn _click of from2 dim frm1 as new form1 frm1.menuitem2.enabled = true but things dont work??? can somebody plz help me??

      M Offline
      M Offline
      mikasa
      wrote on last edited by
      #2

      This is very simple. You shout not Dim a NEW instance of your Form1 because it should already open. Instead call the controls on the already open Form: Form1.MenuItem1.Enabled = True

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups