Click here to Skip to main content
15,906,804 members
Home / Discussions / C#
   

C#

 
GeneralRe: Open Child Form and threading Pin
Saamir12-Aug-09 5:27
Saamir12-Aug-09 5:27 
GeneralRe: Open Child Form and threading Pin
Dave Kreskowiak12-Aug-09 6:23
mveDave Kreskowiak12-Aug-09 6:23 
GeneralRe: Open Child Form and threading Pin
Saamir12-Aug-09 6:51
Saamir12-Aug-09 6:51 
GeneralRe: Open Child Form and threading Pin
Luc Pattyn12-Aug-09 7:59
sitebuilderLuc Pattyn12-Aug-09 7:59 
QuestionCut,Copy ,Paste Problem... Pin
Rahul DSG12-Aug-09 3:00
Rahul DSG12-Aug-09 3:00 
AnswerRe: Cut,Copy ,Paste Problem... Pin
ricmil4212-Aug-09 3:46
ricmil4212-Aug-09 3:46 
GeneralRe: Cut,Copy ,Paste Problem... Pin
Rahul DSG12-Aug-09 18:38
Rahul DSG12-Aug-09 18:38 
GeneralRe: Cut,Copy ,Paste Problem... Pin
ricmil4213-Aug-09 3:26
ricmil4213-Aug-09 3:26 
Try something like this (not tested).
public void ProcessLabel ( Control.ControlCollection c )
{
    foreach ( Control control in c )
    {
        if ( control.Controls.Count != 0 )
            ProcessLabel ( control.Controls ) ;

        if ( control is Label )
            {
                // Do something with the label.
            }
    }
}


Call it like
ProcessLabel ( Controls )    // This is the Control array from your main form or Panel or Group control.


If you need to send more parameters, modify the method but be sure you also add them to the recursive call as well.
public void ProcessLabel ( Control.ControlCollection c, bool cut, bool copy, bool paste )
{
    foreach ( Control control in c )
    {
        if ( control.Controls.Count != 0 )
            ProcessLabel ( control.Controls, cut, copy, paste ) ;

        if ( control is Label )
            {
                // Do something with the label.
            }
    }
}

GeneralRe: Cut,Copy ,Paste Problem... Pin
Rahul DSG22-Aug-09 3:11
Rahul DSG22-Aug-09 3:11 
GeneralRe: Cut,Copy ,Paste Problem... Pin
ricmil4224-Aug-09 3:19
ricmil4224-Aug-09 3:19 
GeneralRe: Cut,Copy ,Paste Problem... Pin
Rahul DSG30-Aug-09 18:55
Rahul DSG30-Aug-09 18:55 
AnswerRe: Cut,Copy ,Paste Problem... Pin
Andrew Rissing12-Aug-09 3:47
Andrew Rissing12-Aug-09 3:47 
QuestionConnectionString Problem with MSACCESS Pin
M Riaz Bashir12-Aug-09 2:19
M Riaz Bashir12-Aug-09 2:19 
AnswerRe: ConnectionString Problem with MSACCESS Pin
Mike Ellison12-Aug-09 2:43
Mike Ellison12-Aug-09 2:43 
AnswerRe: ConnectionString Problem with MSACCESS Pin
Luc Pattyn12-Aug-09 2:54
sitebuilderLuc Pattyn12-Aug-09 2:54 
QuestionLimit checkedListBox for maximum values [modified] Pin
bonzaiholding12-Aug-09 2:08
bonzaiholding12-Aug-09 2:08 
AnswerRe: Limit checkedListBox for maximum values Pin
Ashfield12-Aug-09 2:09
Ashfield12-Aug-09 2:09 
GeneralRe: Limit checkedListBox for maximum values Pin
bonzaiholding12-Aug-09 2:11
bonzaiholding12-Aug-09 2:11 
AnswerRe: Limit checkedListBox for maximum values Pin
Alan N12-Aug-09 2:34
Alan N12-Aug-09 2:34 
GeneralRe: Limit checkedListBox for maximum values Pin
bonzaiholding12-Aug-09 2:39
bonzaiholding12-Aug-09 2:39 
Questionbrowse my computer Pin
Vivek Vijayan12-Aug-09 2:02
Vivek Vijayan12-Aug-09 2:02 
AnswerRe: browse my computer Pin
musefan12-Aug-09 2:09
musefan12-Aug-09 2:09 
QuestionUnable To Serialize TabControl . Pin
shaktisinh12-Aug-09 1:50
shaktisinh12-Aug-09 1:50 
AnswerRe: Unable To Serialize TabControl . Pin
Mike Ellison12-Aug-09 2:46
Mike Ellison12-Aug-09 2:46 
AnswerRe: Unable To Serialize TabControl . Pin
Hristo-Bojilov12-Aug-09 5:16
Hristo-Bojilov12-Aug-09 5:16 

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.