Click here to Skip to main content
15,877,168 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have just realised that if I delete a control from a form (ie label, textbox etc) the supplimentry lines that vb adds to the form designer.vb file are not cleaned out automatically.

But I have been reading that you can get to clean up after itself, but all I have read leaves me rather confused and it has sometrhing to do with this code
'Form overrides dispose to clean up the component list.
 <System.Diagnostics.DebuggerNonUserCode()> _
 Protected Overrides Sub Dispose(ByVal disposing As Boolean)
         If disposing AndAlso components IsNot Nothing Then
         End If
     End Try

Do I put a call somewhere in the VB?

Do I call it somehow off-line?
Updated 17-May-10 3:58am

1 solution

What you are talking about is cleaning your file by removing extra lines of code that have been added in there. AFAIK, the compiler should be ignoring these extra line when your code is compiled.

What they are talking about is about cleaning up the physical memory objects.
Share this answer
Rod Steele 17-May-10 11:41am    
Thanks for your reply

I have had the situation where I have referenced an internal definition on a DIM, but had VB report that it was a duplicate definition, this turned out to be one of the controls that had been deleted.

I got around it by manually deleting all the references I could find.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900