Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Toolbar problem

Posted on 1998-08-16
3
Medium Priority
?
276 Views
Last Modified: 2010-04-30
Hi all, I want to enable or disable toolbar buttons which is on the MDI parent form, on the basis of some event which is triggered when a button is pressed on the MDI child form, but when I do this it gives an error "ONLY ONE MDI FORM ALLOWED". How ccan avoid this problem.
Waiting for help...
0
Comment
Question by:Moin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 2

Expert Comment

by:lmorris
ID: 1429161
This sounds like you created an instance of your MDI for by doing something like:

Dim f as MDIForm1
set f = new MDIForm1
f.Show

Then, later one of your MDI Child forms does a MDIForm1.Toolbar1.Buttons(0).Enable (for example).

You have one instance of the MDIForm1 (f), then you try to load another by refering to MDIForm1.

Instead of refering to your MDIForm as MDIForm1, try using parent.

Hope this was the problem or at least helps.
0
 

Author Comment

by:Moin
ID: 1429162
Yes, the problem was similar to this. Now I am using the name of the object, which is derived from the MDIMainFrm, instead of using the MDIForm directly.
Please mark your comment as answer so that I can grade it.
Thanx.
0
 
LVL 2

Accepted Solution

by:
lmorris earned 30 total points
ID: 1429163
Glad I could help!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question