Click here to Skip to main content
15,879,326 members
Home / Discussions / C#
   

C#

 
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 
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 
Two ways:

1) You could add all the buttons to a collection then iterate over the collection.

2) Alternatively, if these are the only buttons on your form then you could just iterate over the existing Controls collection. (You will notice in the "Windows Form Designer generated code" section there is a section that has lots of this.Controls.Add(...);

Example using existing controls collection on the form:
Button btn;
foreach(Control ctrl in this.Controls)
{
    btn = ctrl as Button;
    if(btn == null) // Not a button
        continue;
    btn.Visible=true;
}




--Colin Mackay--

EuroCPian Spring 2004 Get Together[^]
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar


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 
GeneralRe: COM/C# datatype mismatch Pin
KingTermite3-Feb-04 3:24
KingTermite3-Feb-04 3:24 
GeneralRe: COM/C# datatype mismatch Pin
Heath Stewart3-Feb-04 3:44
protectorHeath Stewart3-Feb-04 3:44 

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.