Click here to Skip to main content
15,894,955 members
Home / Discussions / C#
   

C#

 
GeneralSimple yet unanswered question Pin
hatim_ali28-Jul-04 19:16
hatim_ali28-Jul-04 19:16 
GeneralRe: Simple yet unanswered question Pin
J. Dunlap28-Jul-04 19:30
J. Dunlap28-Jul-04 19:30 
GeneralRe: Simple yet unanswered question Pin
Giles28-Jul-04 20:57
Giles28-Jul-04 20:57 
Questionsave bitmap ? Pin
kendao28-Jul-04 17:33
kendao28-Jul-04 17:33 
AnswerRe: save bitmap ? Pin
mav.northwind28-Jul-04 21:13
mav.northwind28-Jul-04 21:13 
AnswerRe: save bitmap ? Pin
Heath Stewart29-Jul-04 5:14
protectorHeath Stewart29-Jul-04 5:14 
Generaltabbing with text selection Pin
azusakt28-Jul-04 16:45
azusakt28-Jul-04 16:45 
GeneralRe: tabbing with text selection Pin
mikker_12328-Jul-04 23:48
mikker_12328-Jul-04 23:48 
Some of the controls such as TextBox have .SelectAll() method but some like numericUpDown don't. But if you want that behaivor for all of your controls you could go with mass selection of them all and then handling their's .Enter event.

<br />
// Getting all controls<br />
    Control[] GetAllControls() <br />
    {<br />
      ArrayList list = new ArrayList();<br />
      GetAllControls(Controls, list);<br />
      return (Control[])list.ToArray(typeof(Control));<br />
    }<br />
    void GetAllControls(Control.ControlCollection controls, ArrayList list)<br />
    {<br />
      foreach(Control control in controls) {<br />
        if(control.HasChildren) GetAllControls(control.Controls, list);<br />
        list.Add(control);<br />
      }<br />
    }<br />
<br />
// Calling all your controls and making them call same procedure    <br />
    void Form_Load(object sender, System.EventArgs e)<br />
    {<br />
      foreach (Control c in GetAllControls())<br />
	c.Enter += new EventHandler(c_Enter);<br />
    }<br />
<br />
    void c_Enter(object sender, EventArgs e)<br />
    {<br />
      // Control's select isn't same like TextBox's for example. So I guess you <br />
      // should Check and cast your Controls in this manner... I'll do that for just TextBox<br />
      if (c is TextBox)<br />
        ((TextBox)c).Select(0, c.Text.Length);<br />
        // or ((TextBox)c).SelectAll() for this one could be done;<br />
    }<br />


To make it easier you could detect Base classes (for TextBox it is BaseTextBox)... if someone has better solution please correct me...
GeneralHTTP POST with unicode in C# Pin
khchan28-Jul-04 16:32
khchan28-Jul-04 16:32 
GeneralRe: HTTP POST with unicode in C# Pin
Heath Stewart29-Jul-04 5:17
protectorHeath Stewart29-Jul-04 5:17 
QuestionFast way to link items in richTextBoxes with text ? Pin
evdoxos28-Jul-04 14:41
evdoxos28-Jul-04 14:41 
AnswerRe: Fast way to link items in richTextBoxes with text ? Pin
mav.northwind28-Jul-04 21:21
mav.northwind28-Jul-04 21:21 
GeneralRe: Fast way to link items in richTextBoxes with text ? Pin
evdoxos29-Jul-04 0:59
evdoxos29-Jul-04 0:59 
GeneralRe: Fast way to link items in richTextBoxes with text ? Pin
mav.northwind29-Jul-04 1:04
mav.northwind29-Jul-04 1:04 
GeneralRe: Fast way to link items in richTextBoxes with text ? Pin
evdoxos29-Jul-04 2:13
evdoxos29-Jul-04 2:13 
GeneralRe: Fast way to link items in richTextBoxes with text ? Pin
mav.northwind29-Jul-04 2:30
mav.northwind29-Jul-04 2:30 
GeneralRe: Fast way to link items in richTextBoxes with text ? Pin
evdoxos29-Jul-04 18:26
evdoxos29-Jul-04 18:26 
GeneralStarting a GUI app with a windows service in C# Pin
satorical28-Jul-04 14:27
satorical28-Jul-04 14:27 
GeneralRe: Starting a GUI app with a windows service in C# Pin
ChrisAdams28-Jul-04 15:25
ChrisAdams28-Jul-04 15:25 
GeneralRe: Starting a GUI app with a windows service in C# Pin
Heath Stewart29-Jul-04 5:23
protectorHeath Stewart29-Jul-04 5:23 
GeneralRe: Starting a GUI app with a windows service in C# Pin
satorical29-Jul-04 6:13
satorical29-Jul-04 6:13 
GeneralRe: Starting a GUI app with a windows service in C# Pin
Heath Stewart29-Jul-04 6:23
protectorHeath Stewart29-Jul-04 6:23 
Questionhow to get cd information Pin
civc28-Jul-04 13:23
civc28-Jul-04 13:23 
QuestionHow to enumerate windows belong to an instance? Pin
Old Gun28-Jul-04 13:04
Old Gun28-Jul-04 13:04 
AnswerRe: How to enumerate windows belong to an instance? Pin
Dave Kreskowiak28-Jul-04 14:17
mveDave Kreskowiak28-Jul-04 14:17 

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.