Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strange Error: adding custom control from toolbar

Status
Not open for further replies.

annethorne

Programmer
Apr 13, 2005
28
US
Hi,

The following error occurs when trying to drag a custom control's icon onto a form:

Microsoft Development Environment

An exception occurred while trying to create an instance of MyCustomControl.MyCustomControl. The exception was "File not found. File name is: c\documents and settings\athorne\application data\microsoft\visualstudio\MyCustomControl\MyFile.htm".

OK


The MyFile.htm is a file that MyCustomControl uses. I can add MyCustomControl manually, just not via the toolbox.

Background: This error message first appeared while I was demo-ing my work to my co-workers I had recently tried to change MyCustomControl's Toolbox icon. Even though I followed all of the steps for changing the icon, the icon was not changed in the Toolbox, I did not see the icon (MyCustomControl.bmp) in the Toolbox and I did not see the icon's name in the Manifest. Since the icon was not changed, I removed MyCustomControl.bmp from the project and from the project's folder. In some of my research in trying to decipher the above error, I found that the application data\microsoft\visualstudio folder holds toolbar information, along with other information, so I am thinking that perhaps my experimentation in changing the Toolbox icon could have caused the problem...

Any help is very much appreciated!
Anne
 
One of the developers in my group figured out what the problem was.

When the control is dragged onto the form, the constructor is initiated. The path information is confused at that point, hence it uses a toolbox type path...

Part of the solution is to create the html file on the fly from a database.

Thanks!
Anne
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top