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. How to access "my" toolbarbuttons from outside the main form

How to access "my" toolbarbuttons from outside the main form

Scheduled Pinned Locked Moved Visual Basic
helpcsharptutorialquestion
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.
  • G Offline
    G Offline
    Georg Kohler
    wrote on last edited by
    #1

    VB.NET 2005 I have some toolbar buttons on my "main" form that i would like to access from another form Somehow, I have not been able to figure it out ... Inside the Main window I can use DriveEnable.pushed =true (where DriveEnable is the name of the actual button in the collection) and that works (of course :-O ) In my module I'm using Main.Drivenable.pushed =true .. but it does not work (no error either - just nothing happens) I have set all "possible" properties of the toolbar tool / button(s) to Public - doesnt seem to help me ..:mad: Whats the missing link ?

    M 1 Reply Last reply
    0
    • G Georg Kohler

      VB.NET 2005 I have some toolbar buttons on my "main" form that i would like to access from another form Somehow, I have not been able to figure it out ... Inside the Main window I can use DriveEnable.pushed =true (where DriveEnable is the name of the actual button in the collection) and that works (of course :-O ) In my module I'm using Main.Drivenable.pushed =true .. but it does not work (no error either - just nothing happens) I have set all "possible" properties of the toolbar tool / button(s) to Public - doesnt seem to help me ..:mad: Whats the missing link ?

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #2

      Assume Main is a form and not another module/class/object Are you passing an instance of "Main" to your module. EG calling the function in your module from the main form dim oModule as new Module oModule.CallFunction(me) Public sub CallFunction(oFrm as Form) oFrm.Drivenabled=true end Sub

      Never underestimate the power of human stupidity RAH

      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