Solved

Visual Basic NOT allowing to create any control or menu item in MDI Form

Posted on 2008-06-18
5
509 Views
Last Modified: 2010-04-21
I am creating a visual basic application

The MDI Form has huge menu structure. Now I want to add further menu items, but Visual Basic is throwing the following message...!

Reached Limit : cannot create any more controls for this form

How to solve this ?
0
Comment
Question by:nds_rahulmistry
[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
  • 2
5 Comments
 
LVL 39

Accepted Solution

by:
appari earned 250 total points
ID: 21811072
is it is visual basic 6 or .net?

in vb6 if you reach the control limit, you can try using control array.
try  creating  the new menu controls with samename and define the index, it creates control array.
0
 
LVL 19

Assisted Solution

by:Stephen Manderson
Stephen Manderson earned 250 total points
ID: 21811333
I presume its vb6 because of the tags so..

Vb6 can only handle 254 named controls per form, you need to change your naming convention to allow for control arrays.

Such as text1.text, text2.text, text3.text would be changed to control arrays such that they would be named text(0).text, text(1).text, text(3).text

Regards
Steve
0
 
LVL 19

Expert Comment

by:Stephen Manderson
ID: 21811335
Heres the msdn reference for this issue

http://msdn.microsoft.com/en-us/library/aa265801(VS.60).aspx

Regards
Steve
0
 
LVL 3

Author Comment

by:nds_rahulmistry
ID: 21811374
IT IS VB6

AFTER I DELETED ONE TIMER CONTROL FROM THE DESIGN VIEW OF MDI FORM, NOW IT IS ALLOWING ME TO ADD MANY CONTROLS........!    

ACTUALLY, AFTER ABOVE MESSAGE, I WAS TRYING TO LOCATE UN-USED COMPONENTS OR CONTROLS. I FOUND ONLY THE TIMER CONTROL ON MY MDI FORM. I DELETED IT AND NOW ITS WORKING FINE.....!

ISN'T IT STRANGE ??

REGARDS,

RAHUL
0
 
LVL 3

Author Closing Comment

by:nds_rahulmistry
ID: 31468246
THANX
0

Featured Post

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…

751 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