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