Click here to Skip to main content
15,921,212 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: VB.NET 2005 TabStripPanel Pin
Dave Kreskowiak28-Dec-05 9:48
mveDave Kreskowiak28-Dec-05 9:48 
AnswerRe: VB.NET 2005 TabStripPanel Pin
Daniel Grunwald28-Dec-05 11:51
Daniel Grunwald28-Dec-05 11:51 
GeneralRe: VB.NET 2005 TabStripPanel Pin
fuel2run28-Dec-05 23:44
fuel2run28-Dec-05 23:44 
QuestionNetwork question (beginner) Pin
Derek G28-Dec-05 5:58
Derek G28-Dec-05 5:58 
AnswerRe: Network question (beginner) Pin
Dave Kreskowiak28-Dec-05 6:26
mveDave Kreskowiak28-Dec-05 6:26 
QuestionDeleting/Clearing programmically created controls Pin
Hmmkk28-Dec-05 3:46
Hmmkk28-Dec-05 3:46 
AnswerRe: Deleting/Clearing programmically created controls Pin
Dave Kreskowiak28-Dec-05 4:29
mveDave Kreskowiak28-Dec-05 4:29 
GeneralRe: Deleting/Clearing programmically created controls Pin
Hmmkk28-Dec-05 4:44
Hmmkk28-Dec-05 4:44 
This is the code for the disposing:

Dim a As String<br />
        For i As Integer = 1 To 10<br />
            a = "pnlThing" & i<br />
            For j As Integer = 0 To Me.Controls.Count - 1<br />
                If Me.Controls(j).Name = a Then<br />
                    'Me.Controls(j).Dispose()<br />
                    CType(Me.Controls(j), Control).Dispose()<br />
<br />
                End If<br />
            Next j<br />
        Next i


But this gives me ArgumentOutOfRangeException error=/ and the program crashes.
How to rewrite this code so that it will run throught all controls and kill those for who the text applies?

Regards,
Hmmkk
GeneralRe: Deleting/Clearing programmically created controls Pin
Dave Kreskowiak28-Dec-05 5:01
mveDave Kreskowiak28-Dec-05 5:01 
GeneralRe: Deleting/Clearing programmically created controls Pin
Hmmkk28-Dec-05 5:15
Hmmkk28-Dec-05 5:15 
GeneralRe: Deleting/Clearing programmically created controls Pin
Dave Kreskowiak28-Dec-05 5:50
mveDave Kreskowiak28-Dec-05 5:50 
QuestionRe: Deleting/Clearing programmically created controls Pin
Hmmkk28-Dec-05 6:41
Hmmkk28-Dec-05 6:41 
AnswerRe: Deleting/Clearing programmically created controls Pin
Dave Kreskowiak28-Dec-05 13:14
mveDave Kreskowiak28-Dec-05 13:14 
GeneralRe: Deleting/Clearing programmically created controls Pin
Hmmkk28-Dec-05 14:58
Hmmkk28-Dec-05 14:58 
GeneralRe: Deleting/Clearing programmically created controls Pin
Dave Kreskowiak28-Dec-05 16:06
mveDave Kreskowiak28-Dec-05 16:06 
QuestionHowTo: HTML_2_Image Pin
Dredy28-Dec-05 0:58
Dredy28-Dec-05 0:58 
Questionstill excel remains in memory Pin
jith - iii27-Dec-05 22:54
jith - iii27-Dec-05 22:54 
QuestionHow to communicate with serial port in VB.NET Pin
kusikue27-Dec-05 22:46
kusikue27-Dec-05 22:46 
AnswerRe: How to communicate with serial port in VB.NET Pin
Dave Kreskowiak28-Dec-05 4:34
mveDave Kreskowiak28-Dec-05 4:34 
GeneralRe: How to communicate with serial port in VB.NET Pin
WillemM28-Dec-05 8:55
WillemM28-Dec-05 8:55 
QuestionGet previously active window?? Pin
matsnas27-Dec-05 22:29
matsnas27-Dec-05 22:29 
AnswerRe: Get previously active window?? Pin
Dave Kreskowiak28-Dec-05 4:46
mveDave Kreskowiak28-Dec-05 4:46 
QuestionWinForm LifeCycle.. Pin
HakunaMatada27-Dec-05 19:52
HakunaMatada27-Dec-05 19:52 
AnswerRe: WinForm LifeCycle.. Pin
Dave Kreskowiak28-Dec-05 4:37
mveDave Kreskowiak28-Dec-05 4:37 
GeneralRe: WinForm LifeCycle.. Pin
HakunaMatada28-Dec-05 17:24
HakunaMatada28-Dec-05 17:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.