Click here to Skip to main content
15,908,111 members
Home / Discussions / C#
   

C#

 
AnswerRe: volatile Pin
OriginalGriff7-Nov-13 0:03
mveOriginalGriff7-Nov-13 0:03 
AnswerRe: volatile Pin
Richard Deeming7-Nov-13 2:28
mveRichard Deeming7-Nov-13 2:28 
QuestionReal world experience with SqlDependency? Pin
Ron Beyer6-Nov-13 15:04
professionalRon Beyer6-Nov-13 15:04 
JokeRe: Real world experience with SqlDependency? Pin
_Maxxx_6-Nov-13 20:04
professional_Maxxx_6-Nov-13 20:04 
Questionerror can't access a doublebuffer class derived from panel class due to protected level Pin
Gene Baptiste6-Nov-13 12:32
Gene Baptiste6-Nov-13 12:32 
AnswerRe: error can't access a doublebuffer class derived from panel class due to protected level Pin
Pete O'Hanlon6-Nov-13 12:44
mvePete O'Hanlon6-Nov-13 12:44 
QuestionIndex of Button Pin
cdpsource6-Nov-13 11:37
cdpsource6-Nov-13 11:37 
AnswerRe: Index of Button Pin
BillWoodruff6-Nov-13 12:29
professionalBillWoodruff6-Nov-13 12:29 
At design-time:

When you drag-drop Controls onto a Form, or into a container Control, like a Panel, they are written into the Designer.cs file in the order put on the Form.

When the WinForm "engine" lays out the Controls, then the last one created is effectively "in front of" the other Controls.

The ControlsCollection of a Form, or other container Control, is ordered by the z-order: so the last Control added, which is in front, is first.

If you change the z-order of a Control at design-time, its order in the ControlsCollection changes. Use 'BringToFront() it goes to the start of the ControlsCollection; use 'SendToBack(), and it goes to the end.

You can observe what happens at design-time by opening the Designer.cs file and examining the place in the file where Controls are added: change the z-order of one of the Controls you've put on the Form, and look at how the Designer.cs file has changed.

At run-time:

Controls you create and add to a Form, or container Control, are added to the end of the ControlsCollection of their container.

If you use 'BringToFront() on a dynamically created Control before you add it to the ControlsCollection of a container, it will have no effect, but will not cause an error.

If you use 'BringToFront() on a dynamically created Control after you add it to the ControlsCollection of a container, the Control will be at the 0th. element of the ControlsCollection.

Google CEO, Erich Schmidt: "I keep asking for a product called Serendipity. This product would have access to everything ever written or recorded, know everything the user ever worked on and saved to his or her personal hard drive, and know a whole lot about the user's tastes, friends and predilections." 2004, USA Today interview

Questionsorting a string Pin
vkEE6-Nov-13 8:13
vkEE6-Nov-13 8:13 
AnswerRe: sorting a string Pin
Richard Deeming6-Nov-13 8:28
mveRichard Deeming6-Nov-13 8:28 
AnswerRe: sorting a string Pin
BillWoodruff6-Nov-13 10:45
professionalBillWoodruff6-Nov-13 10:45 
GeneralRe: sorting a string Pin
vkEE7-Nov-13 3:36
vkEE7-Nov-13 3:36 
GeneralRe: sorting a string Pin
V.7-Nov-13 20:23
professionalV.7-Nov-13 20:23 
AnswerRe: sorting a string Pin
Abhinav S6-Nov-13 18:10
Abhinav S6-Nov-13 18:10 
QuestionSensor handling through coomport Pin
Sanjiv Barnwal6-Nov-13 2:41
Sanjiv Barnwal6-Nov-13 2:41 
AnswerRe: Sensor handling through coomport Pin
Chris Quinn6-Nov-13 3:26
Chris Quinn6-Nov-13 3:26 
SuggestionRe: Sensor handling through coomport Pin
Richard MacCutchan6-Nov-13 4:01
mveRichard MacCutchan6-Nov-13 4:01 
Questionoverlap Pin
Member 103812095-Nov-13 23:10
Member 103812095-Nov-13 23:10 
AnswerRe: overlap Pin
Abhinav S5-Nov-13 23:53
Abhinav S5-Nov-13 23:53 
GeneralRe: overlap Pin
Member 103812095-Nov-13 23:58
Member 103812095-Nov-13 23:58 
AnswerRe: overlap Pin
Abhinav S6-Nov-13 0:13
Abhinav S6-Nov-13 0:13 
AnswerRe: overlap Pin
BillWoodruff6-Nov-13 0:37
professionalBillWoodruff6-Nov-13 0:37 
AnswerRe: overlap Pin
Richard MacCutchan6-Nov-13 0:38
mveRichard MacCutchan6-Nov-13 0:38 
GeneralRe: overlap Pin
Member 1038120911-Nov-13 8:38
Member 1038120911-Nov-13 8:38 
GeneralRe: overlap Pin
Richard MacCutchan11-Nov-13 22:28
mveRichard MacCutchan11-Nov-13 22:28 

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.