Click here to Skip to main content
15,883,760 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# exceptions not showing filename/line numbers (PDB issue?) Pin
Arun Bhalla3-Feb-04 11:08
Arun Bhalla3-Feb-04 11:08 
GeneralRe: C# exceptions not showing filename/line numbers (PDB issue?) Pin
Heath Stewart3-Feb-04 11:15
protectorHeath Stewart3-Feb-04 11:15 
GeneralWinForms app displays differently on different computers. Pin
~michL~2-Feb-04 12:47
~michL~2-Feb-04 12:47 
GeneralRe: WinForms app displays differently on different computers. Pin
Heath Stewart3-Feb-04 5:29
protectorHeath Stewart3-Feb-04 5:29 
GeneralRe: WinForms app displays differently on different computers. Pin
~michL~3-Feb-04 13:44
~michL~3-Feb-04 13:44 
GeneralRe: WinForms app displays differently on different computers. Pin
Heath Stewart3-Feb-04 17:54
protectorHeath Stewart3-Feb-04 17:54 
GeneralProgramatically iterating through controls in C# csharp or VB.net Pin
billoo2-Feb-04 11:51
billoo2-Feb-04 11:51 
GeneralRe: Programatically iterating through controls in C# csharp or VB.net Pin
Heath Stewart2-Feb-04 12:05
protectorHeath Stewart2-Feb-04 12:05 
There are many ways you can do this, such as keeping an array or collection of specific controls you're interested in, or checking the type of the Control in the Controls property of the container Control (like a Form, UserControl, Panel, etc.) like so:
foreach (Control c in Controls)
{
  if (c is Button)
  {
    Button b = (Button)c;
    b.Visible = true;
  }
}
If you only want specific names, make sure the Name property of the Button is assigned and compare that with "B1" through "B5" to make sure it's a Button you want to control.

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: Programatically iterating through controls in C# csharp or VB.net Pin
billoo2-Feb-04 12:33
billoo2-Feb-04 12:33 
GeneralRe: Programatically iterating through controls in C# csharp or VB.net Pin
Colin Angus Mackay2-Feb-04 12:06
Colin Angus Mackay2-Feb-04 12:06 
GeneralUpdating table from datatable Pin
zuhx2-Feb-04 11:38
zuhx2-Feb-04 11:38 
GeneralRe: Updating table from datatable Pin
Heath Stewart2-Feb-04 12:01
protectorHeath Stewart2-Feb-04 12:01 
GeneralListView Pin
Gary Kirkham2-Feb-04 11:23
Gary Kirkham2-Feb-04 11:23 
GeneralRe: ListView Pin
Heath Stewart2-Feb-04 11:57
protectorHeath Stewart2-Feb-04 11:57 
GeneralRe: ListView Pin
Gary Kirkham2-Feb-04 12:02
Gary Kirkham2-Feb-04 12:02 
GeneralRe: ListView Pin
Heath Stewart2-Feb-04 12:06
protectorHeath Stewart2-Feb-04 12:06 
QuestionGood PDF Viewer control? Pin
Alex Korchemniy2-Feb-04 11:04
Alex Korchemniy2-Feb-04 11:04 
GeneralCOM/C# datatype mismatch Pin
KingTermite2-Feb-04 10:26
KingTermite2-Feb-04 10:26 
GeneralRe: COM/C# datatype mismatch Pin
Heath Stewart2-Feb-04 10:29
protectorHeath Stewart2-Feb-04 10:29 
GeneralRe: COM/C# datatype mismatch Pin
KingTermite2-Feb-04 10:59
KingTermite2-Feb-04 10:59 
GeneralRe: COM/C# datatype mismatch Pin
Heath Stewart2-Feb-04 11:01
protectorHeath Stewart2-Feb-04 11:01 
GeneralRe: COM/C# datatype mismatch Pin
KingTermite2-Feb-04 11:09
KingTermite2-Feb-04 11:09 
GeneralRe: COM/C# datatype mismatch Pin
Heath Stewart2-Feb-04 11:14
protectorHeath Stewart2-Feb-04 11:14 
GeneralRe: COM/C# datatype mismatch Pin
KingTermite2-Feb-04 11:40
KingTermite2-Feb-04 11:40 
GeneralRe: COM/C# datatype mismatch Pin
Heath Stewart2-Feb-04 11:49
protectorHeath Stewart2-Feb-04 11:49 

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.