Click here to Skip to main content
15,895,084 members
Home / Discussions / C#
   

C#

 
GeneralRe: Impersonation using C# Pin
Manfred Rudolf Bihy12-Nov-10 2:07
professionalManfred Rudolf Bihy12-Nov-10 2:07 
QuestionServer based on AsyncCallback not running as expected Pin
Tichaona J4-Nov-10 1:08
Tichaona J4-Nov-10 1:08 
AnswerRe: Server based on AsyncCallback not running as expected Pin
jschell4-Nov-10 8:32
jschell4-Nov-10 8:32 
QuestionGot a working ICMP listener; but how does it work? Pin
nebbukadnezzar4-Nov-10 0:28
nebbukadnezzar4-Nov-10 0:28 
QuestionRetrieve Value from TextBox Which is created in the code behind Pin
HatakeKaKaShi3-Nov-10 22:54
HatakeKaKaShi3-Nov-10 22:54 
AnswerRe: Retrieve Value from TextBox Which is created in the code behind Pin
John Gathogo4-Nov-10 1:00
John Gathogo4-Nov-10 1:00 
AnswerRe: Retrieve Value from TextBox Which is created in the code behind Pin
alrosan4-Nov-10 8:05
alrosan4-Nov-10 8:05 
Questionhow to find toolstrip button on a form by name Pin
Tridip Bhattacharjee3-Nov-10 21:27
professionalTridip Bhattacharjee3-Nov-10 21:27 
suppose i have form where toolstrip is there and that toolstrip contain many toolstrip button and other control. how can i find is there any toolstrip button exist or not on the form just by name. can i write any function like findcontrol where i pass the control name means toolstrip button name as string to that function and that function will iterate in all the controls on the form and check any toolstrip button exist having that name which i pass to that function. please help me with sample code.

i have written a code snippet which is not able to find out the toolstrip button. my code as follows


<br />
public static System.Windows.Forms.Control FindControl(string id, System.Windows.Forms.Form.ControlCollection col)<br />
      {<br />
        System.Windows.Forms.Control child = null;<br />
        child = FindControlRecursive(c, id);<br />
          if (child != null)<br />
            return child;<br />
        <br />
        return null;<br />
      }<br />
<br />
      private static System.Windows.Forms.Control FindControlRecursive(System.Windows.Forms.Control root, string id)<br />
      {<br />
        if (root.Name != null &amp;&amp; root.Name == id)<br />
          return root;<br />
<br />
        foreach (System.Windows.Forms.Control c in root.Controls)<br />
        {<br />
          System.Windows.Forms.Control rc = FindControlRecursive(c, id);<br />
          if (rc != null)<br />
            return rc;<br />
        }<br />
        return null;<br />
      }<br />


plzzzz help
tbhattacharjee

AnswerRe: how to find toolstrip button on a form by name [modified] Pin
Eddy Vluggen3-Nov-10 22:30
professionalEddy Vluggen3-Nov-10 22:30 
AnswerRe: how to find toolstrip button on a form by name Pin
_Erik_4-Nov-10 5:47
_Erik_4-Nov-10 5:47 
QuestionAdd Custom Utility Toolbar To VS2010 Pin
Kevin Marois3-Nov-10 12:52
professionalKevin Marois3-Nov-10 12:52 
AnswerRe: Add Custom Utility Toolbar To VS2010 Pin
Henry Minute3-Nov-10 12:56
Henry Minute3-Nov-10 12:56 
Questiondebugging mode behaves differently than final build Pin
kruegs353-Nov-10 6:02
kruegs353-Nov-10 6:02 
AnswerRe: debugging mode behaves differently than final build Pin
_Erik_3-Nov-10 6:14
_Erik_3-Nov-10 6:14 
GeneralRe: debugging mode behaves differently than final build Pin
kruegs353-Nov-10 6:41
kruegs353-Nov-10 6:41 
GeneralRe: debugging mode behaves differently than final build Pin
_Erik_3-Nov-10 6:49
_Erik_3-Nov-10 6:49 
AnswerRe: debugging mode behaves differently than final build Pin
Eddy Vluggen3-Nov-10 22:35
professionalEddy Vluggen3-Nov-10 22:35 
QuestionHow to set pixel into bitmap with Pixel format of Format8bppIndexed ? [modified] Pin
Yanshof3-Nov-10 4:14
Yanshof3-Nov-10 4:14 
AnswerRe: Hot to set pixel into bitmap with Pixel format of Format8bppIndexed ? Pin
Covean3-Nov-10 4:27
Covean3-Nov-10 4:27 
AnswerRe: How to set pixel into bitmap with Pixel format of Format8bppIndexed ? [modified] Pin
_Erik_3-Nov-10 5:02
_Erik_3-Nov-10 5:02 
Questionscreen capture help Pin
ramsayra3-Nov-10 3:38
ramsayra3-Nov-10 3:38 
AnswerRe: screen capture help Pin
Richard MacCutchan3-Nov-10 4:50
mveRichard MacCutchan3-Nov-10 4:50 
AnswerRe: screen capture help Pin
Dave Kreskowiak3-Nov-10 5:16
mveDave Kreskowiak3-Nov-10 5:16 
Questionhow to convert ToolStripButton to control? Pin
Tridip Bhattacharjee3-Nov-10 3:17
professionalTridip Bhattacharjee3-Nov-10 3:17 
AnswerRe: how to convert ToolStripButton to control? Pin
Not Active3-Nov-10 3:34
mentorNot Active3-Nov-10 3:34 

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.