Click here to Skip to main content
15,891,758 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionFolder path Pin
rmedo12-May-09 0:28
rmedo12-May-09 0:28 
AnswerRe: Folder path Pin
Christian Graus12-May-09 1:18
protectorChristian Graus12-May-09 1:18 
GeneralRe: Folder path Pin
rmedo12-May-09 2:29
rmedo12-May-09 2:29 
GeneralRe: Folder path Pin
Zaegra12-May-09 7:51
Zaegra12-May-09 7:51 
GeneralRe: Folder path Pin
rmedo12-May-09 20:13
rmedo12-May-09 20:13 
GeneralRe: Folder path Pin
0x3c012-May-09 22:11
0x3c012-May-09 22:11 
GeneralRe: Folder path Pin
0x3c012-May-09 22:25
0x3c012-May-09 22:25 
Questionremoving controls [modified] Pin
JR21211-May-09 23:55
JR21211-May-09 23:55 
Hi,

I need to remove all buttons on my form. I use now
For n As Integer = Controls.Count - 1 To 0 Step -1
    Dim c As Control = Controls(n)
    If TypeOf c Is Button Then
        Me.Controls.Remove(c)
    End If
Next

but when I use 0 to controls.count or a for each The routine do not remove all the buttons

So the question is what is the best way to remove all buttons on a form? not all the controls on the form are buttons the OK and cancel are on a TableLayoutPanel these 2 has to stay

Thanks

modified on Tuesday, May 12, 2009 6:32 AM

AnswerRe: removing controls Pin
Tom Deketelaere12-May-09 0:05
professionalTom Deketelaere12-May-09 0:05 
AnswerRe: removing controls Pin
Zaegra12-May-09 7:56
Zaegra12-May-09 7:56 
GeneralRe: removing controls Pin
JR21213-May-09 0:49
JR21213-May-09 0:49 
GeneralRe: removing controls Pin
Zaegra13-May-09 0:52
Zaegra13-May-09 0:52 
GeneralRe: removing controls Pin
JR21213-May-09 3:44
JR21213-May-09 3:44 
GeneralRe: removing controls Pin
tiagu8-Jun-09 1:24
tiagu8-Jun-09 1:24 
QuestionRE:How can i get this checkbox to work when it is selected Pin
Lee Mwangi11-May-09 22:59
Lee Mwangi11-May-09 22:59 
AnswerRe: RE:How can i get this checkbox to work when it is selected Pin
Tom Deketelaere11-May-09 23:17
professionalTom Deketelaere11-May-09 23:17 
GeneralRe: RE:How can i get this checkbox to work when it is selected Pin
Lee Mwangi11-May-09 23:42
Lee Mwangi11-May-09 23:42 
AnswerRe: RE:How can i get this checkbox to work when it is selected Pin
Henry Minute12-May-09 0:00
Henry Minute12-May-09 0:00 
AnswerRe: RE:How can i get this checkbox to work when it is selected Pin
Henry Minute12-May-09 0:25
Henry Minute12-May-09 0:25 
Questioncrystal report + vb.net2005 Pin
hrishiS11-May-09 20:26
hrishiS11-May-09 20:26 
AnswerRe: crystal report + vb.net2005 Pin
Tiyani Miyambo11-May-09 20:49
Tiyani Miyambo11-May-09 20:49 
GeneralRe: crystal report + vb.net2005 Pin
hrishiS11-May-09 20:57
hrishiS11-May-09 20:57 
QuestionCrystal Report Error when called from VB 2008 Pin
Ener Leumas11-May-09 20:09
Ener Leumas11-May-09 20:09 
Questionconnection string Pin
hrishiS11-May-09 19:52
hrishiS11-May-09 19:52 
AnswerRe: connection string Pin
specialdreamsin11-May-09 20:11
specialdreamsin11-May-09 20:11 

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.